[jboss-user] [JBoss Seam] - Page parameter question

limousyf do-not-reply at jboss.com
Wed Sep 26 10:30:18 EDT 2007


Hello,

I have trouble passing a simple parameter to a page.
I read the example on page 159 of Michael Yuan's book :
anonymous wrote : 
  | So when you load a URL such as person.seam?pid=3, Seam automatically invokes the ManagerAction.setPid(3) method (...)
  | 

But my implementation seems nto to work.
I re-created the exact same situation (I first tried with a boolean value without any success ...)

Well here's a bunch of my code :


  | @Name("activitesByCollaborateurCrossData")
  | public class activitesByCollaborateurCrossDataBean implements
  | 		activitesByCollaborateurCrossData {
  | 
  | (bla)
  | 
  | 	@Out(scope = ScopeType.CONVERSATION)
  | 	private Long realise;
  | 
  | (blabla)
  | 
  | 	public void setRealise(Long realise) {
  | 		this.realise = realise;
  | 	}
  | (blablabla)
  | }
  | 

Then I created my page parameter in .page.xml file


  | <page>
  |    <param name="collaborateurFrom"/>
  |    <param name="collaborateurCollaborateurId" value="#{collaborateurHome.collaborateurCollaborateurId}"/>
  |    <param name="societeSocieteId" value="#{societeHome.societeSocieteId}"/>
  |    <param name="firstResult" value="#{collaborateurList.firstResult}"/>
  |    <param name="realise" value="#{activitesByCollaborateurCrossData.realise}" converterId="javax.faces.long"/>
  | </page>
  | 

And finally I call the page using a s:link 


  | <s:link view="/PageactivitesByCollaborateurCrossData.xhtml"	id="SaisieActivites" >
  | <f:param name="collaborateurCollaborateurId" value="1" />
  | <f:param name="realise"  value="1" />
  | <h:graphicImage value="/img/application_form.png" />
  | </s:link>
  | 

But my "realise" attribute is aways null.
I put a breakpoint on the set setRealise(Long realise) method but it's never toogled.

The more unexpected stuff is that the other params, pointing on EntityHome objects are actually working fine !
In fact, I never succeeded in passing a parameter on a field created by me :/

What is wrong in my code ?

(PS: I haven't forgot to put the setRealise signature in the interface)

Thanks for your help on this

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

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



More information about the jboss-user mailing list