You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Antoine van Wel (JIRA)" <ji...@apache.org> on 2011/04/22 20:31:06 UTC

[jira] [Created] (WICKET-3636) BookmarkablePageLink :: setParameter int versions missing

BookmarkablePageLink :: setParameter int versions missing
---------------------------------------------------------

                 Key: WICKET-3636
                 URL: https://issues.apache.org/jira/browse/WICKET-3636
             Project: Wicket
          Issue Type: Bug
    Affects Versions: 1.5-RC3
            Reporter: Antoine van Wel
            Priority: Trivial


the new URL handling & page parameters allow to use an integer index (great!)
however this has not been implemented in BookmarkablePageLink, so this needs to be added

	private void setParameterImpl(int key, Object value)
	{
		if (parameters == null)
		{
			parameters = new PageParameters();
		}
		parameters.set(key, value);
	}

and 

	public MyBookmarkablePageLink<T> setParameter(final int property, final String value)
	{
		setParameterImpl(property, value);
		return this;
	}


(and the same for int and long values)





--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3636) BookmarkablePageLink :: setParameter int versions missing

Posted by "Antoine van Wel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027347#comment-13027347 ] 

Antoine van Wel commented on WICKET-3636:
-----------------------------------------

Martin, good point, I agree.





> BookmarkablePageLink :: setParameter int versions missing
> ---------------------------------------------------------
>
>                 Key: WICKET-3636
>                 URL: https://issues.apache.org/jira/browse/WICKET-3636
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-RC3
>            Reporter: Antoine van Wel
>            Priority: Trivial
>
> the new URL handling & page parameters allow to use an integer index (great!)
> however this has not been implemented in BookmarkablePageLink, so this needs to be added
> 	private void setParameterImpl(int key, Object value)
> 	{
> 		if (parameters == null)
> 		{
> 			parameters = new PageParameters();
> 		}
> 		parameters.set(key, value);
> 	}
> and 
> 	public MyBookmarkablePageLink<T> setParameter(final int property, final String value)
> 	{
> 		setParameterImpl(property, value);
> 		return this;
> 	}
> (and the same for int and long values)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3636) BookmarkablePageLink :: setParameter int versions missing

Posted by "Antoine van Wel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028424#comment-13028424 ] 

Antoine van Wel commented on WICKET-3636:
-----------------------------------------

Ah great, thanks! 





> BookmarkablePageLink :: setParameter int versions missing
> ---------------------------------------------------------
>
>                 Key: WICKET-3636
>                 URL: https://issues.apache.org/jira/browse/WICKET-3636
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-RC3
>            Reporter: Antoine van Wel
>            Assignee: Martin Grigorov
>            Priority: Trivial
>             Fix For: 1.5-RC4
>
>
> the new URL handling & page parameters allow to use an integer index (great!)
> however this has not been implemented in BookmarkablePageLink, so this needs to be added
> 	private void setParameterImpl(int key, Object value)
> 	{
> 		if (parameters == null)
> 		{
> 			parameters = new PageParameters();
> 		}
> 		parameters.set(key, value);
> 	}
> and 
> 	public MyBookmarkablePageLink<T> setParameter(final int property, final String value)
> 	{
> 		setParameterImpl(property, value);
> 		return this;
> 	}
> (and the same for int and long values)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3636) BookmarkablePageLink :: setParameter int versions missing

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025120#comment-13025120 ] 

Martin Grigorov commented on WICKET-3636:
-----------------------------------------

I'd rather deprecate current setParameter() method (all its overloaded versions).
There is getPageParameters() which can be used instead.
No need to duplicate methods.

> BookmarkablePageLink :: setParameter int versions missing
> ---------------------------------------------------------
>
>                 Key: WICKET-3636
>                 URL: https://issues.apache.org/jira/browse/WICKET-3636
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-RC3
>            Reporter: Antoine van Wel
>            Priority: Trivial
>
> the new URL handling & page parameters allow to use an integer index (great!)
> however this has not been implemented in BookmarkablePageLink, so this needs to be added
> 	private void setParameterImpl(int key, Object value)
> 	{
> 		if (parameters == null)
> 		{
> 			parameters = new PageParameters();
> 		}
> 		parameters.set(key, value);
> 	}
> and 
> 	public MyBookmarkablePageLink<T> setParameter(final int property, final String value)
> 	{
> 		setParameterImpl(property, value);
> 		return this;
> 	}
> (and the same for int and long values)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3636) BookmarkablePageLink :: setParameter int versions missing

Posted by "Antoine van Wel (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028418#comment-13028418 ] 

Antoine van Wel commented on WICKET-3636:
-----------------------------------------

One issue that pops up now is that you always need to initialize PageParameters when calling the constructor since there is no setPageParameters method, ie super(id, clazz, new PageParameters()); which is a bit inconvenient. 






> BookmarkablePageLink :: setParameter int versions missing
> ---------------------------------------------------------
>
>                 Key: WICKET-3636
>                 URL: https://issues.apache.org/jira/browse/WICKET-3636
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-RC3
>            Reporter: Antoine van Wel
>            Assignee: Martin Grigorov
>            Priority: Trivial
>             Fix For: 1.5-RC4
>
>
> the new URL handling & page parameters allow to use an integer index (great!)
> however this has not been implemented in BookmarkablePageLink, so this needs to be added
> 	private void setParameterImpl(int key, Object value)
> 	{
> 		if (parameters == null)
> 		{
> 			parameters = new PageParameters();
> 		}
> 		parameters.set(key, value);
> 	}
> and 
> 	public MyBookmarkablePageLink<T> setParameter(final int property, final String value)
> 	{
> 		setParameterImpl(property, value);
> 		return this;
> 	}
> (and the same for int and long values)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WICKET-3636) BookmarkablePageLink :: setParameter int versions missing

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-3636.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5-RC4
         Assignee: Martin Grigorov

The existing methods #setParameter() are deprecated since r1099169.
The new way is: getPageParameters().set(). This way there is no need to duplicate the API in two places

> BookmarkablePageLink :: setParameter int versions missing
> ---------------------------------------------------------
>
>                 Key: WICKET-3636
>                 URL: https://issues.apache.org/jira/browse/WICKET-3636
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-RC3
>            Reporter: Antoine van Wel
>            Assignee: Martin Grigorov
>            Priority: Trivial
>             Fix For: 1.5-RC4
>
>
> the new URL handling & page parameters allow to use an integer index (great!)
> however this has not been implemented in BookmarkablePageLink, so this needs to be added
> 	private void setParameterImpl(int key, Object value)
> 	{
> 		if (parameters == null)
> 		{
> 			parameters = new PageParameters();
> 		}
> 		parameters.set(key, value);
> 	}
> and 
> 	public MyBookmarkablePageLink<T> setParameter(final int property, final String value)
> 	{
> 		setParameterImpl(property, value);
> 		return this;
> 	}
> (and the same for int and long values)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-3636) BookmarkablePageLink :: setParameter int versions missing

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-3636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13028421#comment-13028421 ] 

Martin Grigorov commented on WICKET-3636:
-----------------------------------------

First call of #getPageParameters() will initialize it for you if it is not already.
See the change in "Subversion Commits" tab.

> BookmarkablePageLink :: setParameter int versions missing
> ---------------------------------------------------------
>
>                 Key: WICKET-3636
>                 URL: https://issues.apache.org/jira/browse/WICKET-3636
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 1.5-RC3
>            Reporter: Antoine van Wel
>            Assignee: Martin Grigorov
>            Priority: Trivial
>             Fix For: 1.5-RC4
>
>
> the new URL handling & page parameters allow to use an integer index (great!)
> however this has not been implemented in BookmarkablePageLink, so this needs to be added
> 	private void setParameterImpl(int key, Object value)
> 	{
> 		if (parameters == null)
> 		{
> 			parameters = new PageParameters();
> 		}
> 		parameters.set(key, value);
> 	}
> and 
> 	public MyBookmarkablePageLink<T> setParameter(final int property, final String value)
> 	{
> 		setParameterImpl(property, value);
> 		return this;
> 	}
> (and the same for int and long values)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira