How to reorder input field
I haved generated simple CRUD application from seam-gen using seam generate-ui command, but the edit page for insert data into database was genated and orderd by name.
For example if entity class contain name,lastname
and age
. Seam-gen will generate and ordered field list to age,lastname, and name (order by name).
The question is how do I开发者_如何学Python config to reorder those input field to my requirement. such as from age,lastname,name
to name, lastname
and age.
Thank you for the answer.
I am not sure I understand what you mean. Do you mean the list that is returned from resultList is ordered according to the wrong column?
If that is the case you can override the default ejbql in your SomeTableList EntityQuery
@Override
public String getEjbql() {
return "select s from SomeTable s order by s.name";
}
You can also use the
@OrderByannotation in your entity Look here for more detail
You should write your custom order in <YOUR_APP_HOME>/resources/seamgen. reveng.xml. Here you can see how you can edit this file. After editing, you can generate your User Interface in the <SEAM_HOME> directory by using
seam generate-ui restart
regards,
精彩评论