Generating Select-Form Layout in Same Page
By Steven Davelaar on Oct 12, 2006
Ting Rung writes in to ask how he can generate a select-form layout with the select list displayed in the same page as the form items.
Using a custom velocity template, this is easy to generate. Here are the steps:
- Create a custom template "selectFormGroup.vm" that merges the content of the selectGroup.vm which is used for the select page, and formGroup.vm used for the form page. Click here to download a sample of such a template that uses partial page rendering to refresh the form items when the user selects another entry in the select list.
- Change the layout style of the group from "select=form" to "form".
- While selecting the correct group in the navigator, select the templates tab and set the FORM_GROUP template to your newly created template, for example "default/pageComponent/selectFormGroup.vm".
- Run the JHeadstart Application Generator.
- Run your application.