-
1. Re: EL enhancements in Seam 1.2.1
christian.bauer May 9, 2007 12:24 PM (in response to neoko)This is not how doStuff(argument) works. What you are trying to do is a common error.
Think about when #{projectPlanHome.edit(pp.id)} will be evaluated: During rendering of the page. However, if you check the source of the rendered HTML, you will see that pp.id has not been replaced with a value, it is still pp.id. So when you click the link, Seam will on the server call your projectPlanHome.edit() method and it will resolve "pp.id" as an argument to that method. At that time, "pp" is long gone.
What you want is @DataModelSelection, see the Seam documentation and examples. -
2. Re: EL enhancements in Seam 1.2.1
christian.bauer May 9, 2007 12:27 PM (in response to neoko)In other words, and as the documentation says, what you just wrote is equivalent to this:
@In("#{pp.di}") Long projectPlanId; public String edit() { ... }
That also doesn't work because at call time of edit(), no #{pp.id} can be resolved - pp is just the loop variable that is used during rendering of the previous page. -
3. Re: EL enhancements in Seam 1.2.1
neoko May 9, 2007 12:43 PM (in response to neoko)Thanks! Let me ask you another question related to the last one:
What about if I don't have a dataTable? In other pages I have links like this one:<s:link id="ppPhase" value="#{projectPlan.phases['i'].name}" view="/phase.xhtml" propagation="nest"> <f:param name="phaseId" value="#{projectPlan.phases['i'].id}"/> </s:link>
which is trying to access other page with the information of an existing entityBean.
I achieved this using "seam-gen new-entity" and all my pages are RESTful, but I'd like them to beheave with an "action" behaviour (or push-style). How can I do that? Can I keep the EntityHomes and tranform them to be push-style?
Thanks for your time. -
4. Re: EL enhancements in Seam 1.2.1
neoko May 9, 2007 1:59 PM (in response to neoko)I've already tried what i was planning to do, and yeah, it works! Now, I understand the previous posts. It's needed an object in the scope of the conversation in order to evaluate the argument of the expression.
Thanks! All of you, the staff of JBoss are very helpful.