Re: StringValue.toOptionalLong incorrect behavior

2011-12-20 Thread Илья Нарыжный
OK:) Please find it here: https://issues.apache.org/jira/browse/WICKET-4309 Thank you! Regards, Ilia 2011/12/20 Martin Grigorov > Ticket please! > > 2011/12/20 Илья Нарыжный : > > Hello, > > > > Up this topic. Are you planning to fix this functionality with > > toOptionalString? > > > > Thanks,

Re: StringValue.toOptionalLong incorrect behavior

2011-12-20 Thread Martin Grigorov
Ticket please! 2011/12/20 Илья Нарыжный : > Hello, > > Up this topic. Are you planning to fix this functionality with > toOptionalString? > > Thanks, > > Ilis > > 2011/11/16 vineet semwal > >>  yeah not needed for toOptionalString() but why not for >> toOptionalBoolean()? >> >> On Wed, Nov 16, 20

Re: StringValue.toOptionalLong incorrect behavior

2011-12-20 Thread Илья Нарыжный
Hello, Up this topic. Are you planning to fix this functionality with toOptionalString? Thanks, Ilis 2011/11/16 vineet semwal > yeah not needed for toOptionalString() but why not for > toOptionalBoolean()? > > On Wed, Nov 16, 2011 at 3:39 PM, Martin Grigorov > wrote: > > Hi, > > > > On Wed,

Re: StringValue.toOptionalLong incorrect behavior

2011-11-16 Thread vineet semwal
yeah not needed for toOptionalString() but why not for toOptionalBoolean()? On Wed, Nov 16, 2011 at 3:39 PM, Martin Grigorov wrote: > Hi, > > On Wed, Nov 16, 2011 at 11:50 AM, vineet semwal > wrote: >> martin i too think tooptionalMethods in StringValue should behave the >> way llia is saying i

Re: StringValue.toOptionalLong incorrect behavior

2011-11-16 Thread Martin Grigorov
Hi, On Wed, Nov 16, 2011 at 11:50 AM, vineet semwal wrote: > martin i too think tooptionalMethods in StringValue should behave the > way llia is saying ie. they should return null if text is empty or > null.. Hm. Not quite convinced. ?a=b&c=&e=f is a valid query string and 'c' has value "" while

Re: StringValue.toOptionalLong incorrect behavior

2011-11-16 Thread vineet semwal
martin i too think tooptionalMethods in StringValue should behave the way llia is saying ie. they should return null if text is empty or null.. for eg. currently public final Long toOptionalLong() throws StringValueConversionException { return (text == null) ? null : toLong

Re: StringValue.toOptionalLong incorrect behavior

2011-11-16 Thread Martin Grigorov
Hi, At least this is what the javadoc says: "Convert to object types, returning null if text is null." I think the more appropriate method for you is org.apache.wicket.util.string.StringValue.toLong(long) but it also throws exceptions if the provided value is empty string. On Wed, Nov 16, 2011 a

StringValue.toOptionalLong incorrect behavior

2011-11-16 Thread Илья Нарыжный
Hello, I have page mounted as @MountPath("/page/#{pageId}") Also I have following code: public ViewPagePage(PageParameters params) { this(getEntityPkFor(params, Page.class, 1)); //1 - is default ID if PK in url was not found } and: protected static Long getEntityPkFor(PageParam