Re: t5: Link s addParameter and null

2009-11-09 Thread Thiago H. de Paula Figueiredo
Em Mon, 09 Nov 2009 11:24:21 -0200, Angelo Chen escreveu: Hi, Hi! 2) if I do a lnk.addParameter("country", null) and I got following: RequestExceptionHandler Unexpected runtime exception: Parameter value was null or contained only whitespace. Please post a JIRA about it. I think that

Re: t5: Link s addParameter and null

2009-11-09 Thread Angelo Chen
I need that to be in the url so it can be captured by Google Analytics. Alexey Hanin wrote: > > Don't have an opportunity to check this but as I know Tapestry treats > empty parameters as nulls. Just curious, why do you want empty > parameter in query string? Conceptually, parameters not being s

Re: t5: Link s addParameter and null

2009-11-09 Thread Alexey Hanin
Don't have an opportunity to check this but as I know Tapestry treats empty parameters as nulls. Just curious, why do you want empty parameter in query string? Conceptually, parameters not being set makes it null. On Mon, Nov 9, 2009 at 3:50 PM, Angelo Chen wrote: > > Hi, > Thanks for the reply,

Re: t5: Link s addParameter and null

2009-11-09 Thread Angelo Chen
Hi, Thanks for the reply, but it does not work, still same error, i check the LinkImpl: public void addParameter(String parameterName, String value) { Defense.notBlank(parameterName, "parameterName"); Defense.notBlank(value, "value"); if (parameters == null)

Re: t5: Link s addParameter and null

2009-11-09 Thread Alexey Hanin
Just make it empty string when it's null: lnk.addParameter("country", country == null ? "" : country); On Mon, Nov 9, 2009 at 3:24 PM, Angelo Chen wrote: > > Hi, > > I have a query string that I need to append to a  Link object, the query > string is: > > ?gender=M&country= > > I got two questio

t5: Link s addParameter and null

2009-11-09 Thread Angelo Chen
Hi, I have a query string that I need to append to a Link object, the query string is: ?gender=M&country= I got two questions: 1) is there a simple way to append this string to a Link object instead of using addParameter? 2) if I do a lnk.addParameter("country", null) and I got following: