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 vineetsemwal1...@gmail.com yeah not needed for toOptionalString() but why not for toOptionalBoolean()? On Wed, Nov 16, 2011 at 3:39 PM, Martin Grigorov

Re: StringValue.toOptionalLong incorrect behavior

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

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 mgrigo...@apache.org Ticket please! 2011/12/20 Илья Нарыжный phan...@ydn.ru: Hello, Up this topic. Are you planning to fix this functionality with

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

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 at

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 :

Re: StringValue.toOptionalLong incorrect behavior

2011-11-16 Thread Martin Grigorov
Hi, On Wed, Nov 16, 2011 at 11:50 AM, vineet semwal vineetsemwal1...@gmail.com 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=bc=e=f is a valid query string and

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 mgrigo...@apache.org wrote: Hi, On Wed, Nov 16, 2011 at 11:50 AM, vineet semwal vineetsemwal1...@gmail.com wrote: martin i too think tooptionalMethods in StringValue