[JBoss Seam] - Re: Question: Can static parameters be used in *.page.xml?
by anescu
Yes, here it is:
It is a Seam generated application, with some modifications, so we have
AbcList & AbcEdit for some of the entities.
It was required that the AbcList be ordered when you open the page by the first column.
So I have 3 way to open AbcList:
1) From the menu (s:link)
2) From the AbcEdit screen, by clicking the "back" button (also s:link)
3) From the AbcEdit screen, by clicking the "delete" button (which is a h:commandButton), this returns to the AbcList by using a navigation rule defined in AbcEdit.page.xml
In cases 1) & 2) I can add this:
<f:param name="order" value="name asc"/>
And it works fine.
For 3) I tried to use the same but it is ignored. Then I placed the parameter in the AbcEdit.page.xml as in the first post, with the static value and it doesn't work. So I defined a Java bean with an attribute to keep the defeult order and now it works. But, as I said, it is so damn complicated to do.
Since there is no alternative I'll guess we'll stick with this solution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055188#4055188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055188
18Â years, 10Â months
[JBoss Seam] - Question: Can static parameters be used in *.page.xml?
by anescu
Hi,
I would like to use this code.
<navigation from-action="#{abcHome.remove}">
| <end-conversation/>
| <redirect view-id="/AbcList.xhtml">
| <param name="order" value="name asc"/>
| </redirect>
| </navigation>
But the framework throws an exception about the "value" in the param tag:
anonymous wrote : javax.faces.el.ReferenceSyntaxException: Invalid expression: 'name asc'. Parsed Expression of unexpected type java.lang.String
If I use this code instead it works fine (where listOrder is a bean in application scope):
<param name="order" value="#{listOrder.abcListOrder}"/>
But it seems so damn complicated, I need to define a Java component/attribute for each parameter I want to use in an XML file.
Is there possible to use a static parameter, like I want to? Am I doing something wrong?
I'm using Seam 1.2.1.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055182#4055182
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055182
18Â years, 10Â months