Re: PageParameters request-for-enhancement

2008-05-09 Thread Johan Compagner
I will look at it this weekend

On 5/9/08, Doug Donohoe <[EMAIL PROTECTED]> wrote:
>
> What is the likelihood that we can get this patch included in the next 1.4
> milestone?
>
> Again, I'll repeat my offer to submit it myself if given commit access.  I
> updated the JIRA issue with the API javadoc to show what I added.
>
> -Doug
>
>
> Doug Donohoe wrote:
>>
>> I created https://issues.apache.org/jira/browse/WICKET-1596 and submitted
>> a patch with test cases.  I'd be happy to commit if given commit access if
>> that is easier.
>>
>> Perhaps my work on wicketstuff-annotation demonstrates my attention to
>> detail in code and documentation.
>>
>> Thanks,
>>
>> -Doug
>>
>>
>> Eelco Hillenius wrote:
>>>
>>> Hi,
>>>
>>> You can best file an RFE in JIRA for things like this. The list is
>>> primarily for questions and discussions, and adding it to JIRA will at
>>> least make sure it stays on the list of things to look at.
>>>
>>> Cheers,
>>>
>>> Eelco
>>>
>>> On Thu, Apr 24, 2008 at 3:00 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote:
>>>>
>>>>  Hi Wicket team:
>>>>
>>>>  I'd like to be able to call getInt(name, default) and not have to worry
>>>>  about catching exceptions.  If the number can't be parsed, just return
>>>> the
>>>>  default.
>>>>
>>>>  I have a utility method which I use:
>>>>
>>>> public static int getInt(PageParameters params, String name, int
>>>> def)
>>>> {
>>>> try
>>>> {
>>>> return params.getInt(name, def);
>>>> }
>>>> catch (StringValueConversionException ignored)
>>>> {
>>>> return def;
>>>> }
>>>> }
>>>>
>>>>  Basically for my bookmarkable pages, I don't care if a user mucks with
>>>> the
>>>>  URL - this would let me default to something reasonable.
>>>>
>>>>  It would be nice if there were a comparable method on PageParameters
>>>> ...
>>>>  like getIntSafe(name, def) or some something similar (and for other
>>>>  number-based getters).
>>>>
>>>>  In addition, it would be nice to have a getInteger() object method that
>>>>  returns null if not defined or an Integer object.  The way it is now, I
>>>> have
>>>>  to pick a default value that I assume won't ever be valid (usually -1).
>>>>  There are valid use cases where null is an expected value.
>>>>
>>>>  -Doug
>>>>
>>>>  -Doug
>>>>
>>>>
>>>>  --
>>>>  View this message in context:
>>>> http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p16853545.html
>>>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>>>
>>>>
>>>>  -
>>>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p17152141.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageParameters request-for-enhancement

2008-05-09 Thread Doug Donohoe

What is the likelihood that we can get this patch included in the next 1.4
milestone?

Again, I'll repeat my offer to submit it myself if given commit access.  I
updated the JIRA issue with the API javadoc to show what I added.

-Doug


Doug Donohoe wrote:
> 
> I created https://issues.apache.org/jira/browse/WICKET-1596 and submitted
> a patch with test cases.  I'd be happy to commit if given commit access if
> that is easier.
> 
> Perhaps my work on wicketstuff-annotation demonstrates my attention to
> detail in code and documentation.
> 
> Thanks,
> 
> -Doug
> 
> 
> Eelco Hillenius wrote:
>> 
>> Hi,
>> 
>> You can best file an RFE in JIRA for things like this. The list is
>> primarily for questions and discussions, and adding it to JIRA will at
>> least make sure it stays on the list of things to look at.
>> 
>> Cheers,
>> 
>> Eelco
>> 
>> On Thu, Apr 24, 2008 at 3:00 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote:
>>>
>>>  Hi Wicket team:
>>>
>>>  I'd like to be able to call getInt(name, default) and not have to worry
>>>  about catching exceptions.  If the number can't be parsed, just return
>>> the
>>>  default.
>>>
>>>  I have a utility method which I use:
>>>
>>> public static int getInt(PageParameters params, String name, int
>>> def)
>>> {
>>> try
>>> {
>>> return params.getInt(name, def);
>>> }
>>> catch (StringValueConversionException ignored)
>>> {
>>> return def;
>>> }
>>> }
>>>
>>>  Basically for my bookmarkable pages, I don't care if a user mucks with
>>> the
>>>  URL - this would let me default to something reasonable.
>>>
>>>  It would be nice if there were a comparable method on PageParameters
>>> ...
>>>  like getIntSafe(name, def) or some something similar (and for other
>>>  number-based getters).
>>>
>>>  In addition, it would be nice to have a getInteger() object method that
>>>  returns null if not defined or an Integer object.  The way it is now, I
>>> have
>>>  to pick a default value that I assume won't ever be valid (usually -1).
>>>  There are valid use cases where null is an expected value.
>>>
>>>  -Doug
>>>
>>>  -Doug
>>>
>>>
>>>  --
>>>  View this message in context:
>>> http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p16853545.html
>>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>>
>>>
>>>  -
>>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>> 
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p17152141.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageParameters request-for-enhancement

2008-05-07 Thread Doug Donohoe

I created https://issues.apache.org/jira/browse/WICKET-1596 and submitted a
patch with test cases.  I'd be happy to commit if given commit access if
that is easier.

Perhaps my work on wicketstuff-annotation demonstrates my attention to
detail in code and documentation.

Thanks,

-Doug


Eelco Hillenius wrote:
> 
> Hi,
> 
> You can best file an RFE in JIRA for things like this. The list is
> primarily for questions and discussions, and adding it to JIRA will at
> least make sure it stays on the list of things to look at.
> 
> Cheers,
> 
> Eelco
> 
> On Thu, Apr 24, 2008 at 3:00 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote:
>>
>>  Hi Wicket team:
>>
>>  I'd like to be able to call getInt(name, default) and not have to worry
>>  about catching exceptions.  If the number can't be parsed, just return
>> the
>>  default.
>>
>>  I have a utility method which I use:
>>
>> public static int getInt(PageParameters params, String name, int def)
>> {
>> try
>> {
>> return params.getInt(name, def);
>> }
>> catch (StringValueConversionException ignored)
>> {
>> return def;
>> }
>> }
>>
>>  Basically for my bookmarkable pages, I don't care if a user mucks with
>> the
>>  URL - this would let me default to something reasonable.
>>
>>  It would be nice if there were a comparable method on PageParameters ...
>>  like getIntSafe(name, def) or some something similar (and for other
>>  number-based getters).
>>
>>  In addition, it would be nice to have a getInteger() object method that
>>  returns null if not defined or an Integer object.  The way it is now, I
>> have
>>  to pick a default value that I assume won't ever be valid (usually -1).
>>  There are valid use cases where null is an expected value.
>>
>>  -Doug
>>
>>  -Doug
>>
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p16853545.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>>  -
>>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>>  For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p17114188.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PageParameters request-for-enhancement

2008-05-07 Thread Eelco Hillenius
Hi,

You can best file an RFE in JIRA for things like this. The list is
primarily for questions and discussions, and adding it to JIRA will at
least make sure it stays on the list of things to look at.

Cheers,

Eelco

On Thu, Apr 24, 2008 at 3:00 PM, Doug Donohoe <[EMAIL PROTECTED]> wrote:
>
>  Hi Wicket team:
>
>  I'd like to be able to call getInt(name, default) and not have to worry
>  about catching exceptions.  If the number can't be parsed, just return the
>  default.
>
>  I have a utility method which I use:
>
> public static int getInt(PageParameters params, String name, int def)
> {
> try
> {
> return params.getInt(name, def);
> }
> catch (StringValueConversionException ignored)
> {
> return def;
> }
> }
>
>  Basically for my bookmarkable pages, I don't care if a user mucks with the
>  URL - this would let me default to something reasonable.
>
>  It would be nice if there were a comparable method on PageParameters ...
>  like getIntSafe(name, def) or some something similar (and for other
>  number-based getters).
>
>  In addition, it would be nice to have a getInteger() object method that
>  returns null if not defined or an Integer object.  The way it is now, I have
>  to pick a default value that I assume won't ever be valid (usually -1).
>  There are valid use cases where null is an expected value.
>
>  -Doug
>
>  -Doug
>
>
>  --
>  View this message in context: 
> http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p16853545.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



PageParameters request-for-enhancement

2008-04-24 Thread Doug Donohoe

Hi Wicket team:

I'd like to be able to call getInt(name, default) and not have to worry
about catching exceptions.  If the number can't be parsed, just return the
default.

I have a utility method which I use:

public static int getInt(PageParameters params, String name, int def)
{
try
{
return params.getInt(name, def);
}
catch (StringValueConversionException ignored)
{
return def;
}
}

Basically for my bookmarkable pages, I don't care if a user mucks with the
URL - this would let me default to something reasonable.

It would be nice if there were a comparable method on PageParameters ...
like getIntSafe(name, def) or some something similar (and for other
number-based getters).

In addition, it would be nice to have a getInteger() object method that
returns null if not defined or an Integer object.  The way it is now, I have
to pick a default value that I assume won't ever be valid (usually -1). 
There are valid use cases where null is an expected value.

-Doug

-Doug


-- 
View this message in context: 
http://www.nabble.com/PageParameters-request-for-enhancement-tp16853545p16853545.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]