Hello, I have a pobleme with page parameters.

I have generated a very simple CRUD application with seam-gen from a database 
containing 2 tables : col and typecol (which means the sort of col).
The link between the two tables is : col.type = typecol.id
typecol.id is an Integer


The generation is ok. The col class contain a property Typecol typecol. A 
colList.xhtml was generated too. 

Now, I want to search for col of a certain type. So I've had a selectBox in 
colList.xtml :

  | <s:decorate template="layout/display.xhtml">
  |     <ui:define name="label">Type de collectivité</ui:define>
  |     <h:selectOneMenu id="typecol" value="#{colList.col.typecol}" >
  |             <s:selectItems value="#{typecolList.resultList}" var="untypcol"
  |                     label="#{untypcol.nom}" noSelectionLabel="Select..." 
  |                     hideNoSelectionLabel="false"/>
  |             <s:convertEntity />
  |     </h:selectOneMenu>      
  | </s:decorate>
  | 


In ColList.page.xml, I've added the param :
<param name="typecol" value="#{colList.col.typecol}" 
converter="EntityConverter" />

In RESTRICTION property of ColList.java, I've added this :
"col.typecol = #{colList.col.typecol}", 

When I tried the new selectBox, nothing happend. 
I put a conversation scope to colList class, then the search was ok. Was-it 
good to add conversation scope ?

Nevertheless, all is not perfect, as I cannot use links (to order the list, or 
to navigate between the pages of results) because my param typecol is then not 
written in the url( 
http://localhost.../ColList.seam?firstResult=25&nom=&cid=4). 

Am I wrong from the beginning ? Am I wrong with the param in page.xml ?
Thank you for having a look a fiew second at my issue.
Adrien





View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057709#4057709

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057709

_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to