On 24 Oct 2008, at 12:48, Christian Bauer wrote:
On Oct 24, 2008, at 13:21 , Pete Muir wrote:
> As Christian said, <f:param name="whatever" /> is probably the
> wrong syntax for this, as it implies you are adding a parameter,
> not removing it. Maybe we need an <s:suppressPageParameter
> name="foo" /> instead.
-1, just document <f:param name="foo" value="#{null}"/> and
that's
it for suppressing a page parameter. Overriding is then consistent
with <f:param name="foo" value="#{override}"/>. This would be
the
easiest solution. Any syntax we come up with to do the same in a
different way is going to be more complex.
Or/and we do this:
<page view-id="one.xhtml">
<param name="foo" value="#{binding.getterAndSetter"/>
<param name="bar" value="#{binding.getterAndSetter"/>
</page>
Regular link that evaluates #{binding.getterAndSetter} to get the
"foo" and "bar" parameter values (that's the (current) default):
<s:link view-id="one.xhtml" page-parameters="override"/>
Link that only contains the "bar" parameter with
#{binding.getterAndSetter} value:
<s:link view-id="one.xhtml" page-parameters="override">
<f:param name="foo"/>
</s:link:
Link that only contains the "bar" parameter with #{binding.other}
value:
<s:link view-id="one.xhtml" page-parameters="override">
<f:param name="foo"/>
<f:param name="bar" value="#{binding.other}"/>
</s:link:
Link that only contains the "foo" parameter with
#{binding.getterAndSetter} value:
<s:link view-id="one.xhtml" page-parameters="ignore">
<f:param name="foo"/>
</s:link>
Link that only includes the "foo" parameter with #{binding.other}
value:
<s:link view-id="one.xhtml" page-parameters="ignore">
<f:param name="foo" value="#{binding.other}"/>
</s:link>
The advantage here is that we can keep it backwards compatible, if
you have the default page-parameters="override", the #{null} trick,
the "" value trick, and the no-value-attribute all continue to work
as before.
I like this.
But really, this is not so much an absolutely necessary code
feature, it's foremost a documentation change. Even an FAQ entry
would be OK.
_______________________________________________
seam-dev mailing list
seam-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/seam-dev