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 <angelochen...@yahoo.com.hk> 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 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: > >  RequestExceptionHandler Unexpected runtime exception: Parameter value was > null or contained only whitespace. > > and I need to make the country part of query string even it is null, any > idea? thanks, > > A.C. > -- > View this message in context: > http://old.nabble.com/t5%3A-Link-s-addParameter-and-null-tp26266356p26266356.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org