Hi,

I have a problem--more of an annoyance, really--with struts s:url tag. It
adds parameters into the result url without my say-so and I don't really
understand on what grounds. For example, I had the following in my jsp page:
<s:url id="addNewContract" action="ajaxEditContract">
    <s:param name="decorate" value="false" />
</s:url>

It evaluated to this:
ajaxEditContract.html?id=-3&amp;amp;decorate=false&amp;amp;dojo.preventCache=1209372598206&amp;amp;committerId=-7
&amp;dojo.preventCache=1209372600172&amp;decorate=false

I can understand it adds the ajax stuff automatically (although I don't know
why and when). What I don't understand is, why does it add committerId and
id as parameters. Both are available via getters in my action, and
committerId is used in the form that comes after I define the url. Id,
however, is not used at all in the page. To avoid problems, I have to create
the url like this:

<s:url id="addNewContract" action="ajaxEditContract">
    <s:param name="decorate" value="false" />
    <s:param name="id" value="null" />
</s:url>


To avoid problems in the future, I'd like to understand why exactly does the
url tag behave like this. I understand includeParams attribute is used to
set how the tag behaves with parameters, but there is no explanation in the
tag reference what "all" and "get" are supposed to do.

Can anyone tell me why does the url tag behave the way it does, or where I
could find an explanation?

Reply via email to