Thank you for answering my question. I assume setting includeParams to
'none' means it will not automatically set any parameters at all, including
ajax parameters?

On Mon, Apr 28, 2008 at 10:52 PM, Laurie Harper <[EMAIL PROTECTED]> wrote:

> Jukka Välimaa wrote:
>
> > 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?
> >
>
> The parameters in the generated URL come from the current request -- i.e.
> the request that results in the tag being called. With includeParams set to
> 'get', the URL includes the current request's GET parameters -- i.e. those
> from the query string -- but not any POST parameters that may be present.
> With 'all' the URL will include both GET and POST parameters.
>
> As you're probably aware, the default is 'get' and can be overridden in
> your struts.xml / struts.properties.
>
> L.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to