You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "vineet semwal (JIRA)" <ji...@apache.org> on 2012/09/08 13:23:07 UTC

[jira] [Created] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

vineet semwal created WICKET-4754:
-------------------------------------

             Summary: make bookmarkablepagelink more flexible/reusable
                 Key: WICKET-4754
                 URL: https://issues.apache.org/jira/browse/WICKET-4754
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: 6.0.0, 1.5.8
            Reporter: vineet semwal
         Attachments: BookmarkablePageLink.patch

bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to have a protected method which user can override to pass his page class.

i am providing the patch for the same .

thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal updated WICKET-4754:
----------------------------------

    Attachment: BookmarkablePageLinkWithPageClassModel.patch

another patch which does a bit more changes but makes bookmarkablepagelink more flexible .
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch, BookmarkablePageLinkWithPageClassModel.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to have a protected method which user can override to pass his page class.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal commented on WICKET-4754:
---------------------------------------

hmm i did that patch in a hurry, pageclassmodel#detach() can be called in bookmarkablepagelink.detach() ,if you see my loadabledetachablemodel implementation ,it doesn't keep any reference to pageclass ,LDM itself doesn't serialize anything.
 
my usecase is simple i want the bookmarkablepagelink to be dynamic that is when class changes ,the url should  change.currently this is not possible.removing final from getpageclass() will solve this but you will still have to resolve the pageclass from the the classname probably you will do that in some other method or may be will provide someother method which user can override.i consider passing a pageclassmodel to be a more elegant solution.
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch, BookmarkablePageLinkWithPageClassModel.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to make it flexible and more reusable.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

Martin Grigorov commented on WICKET-4754:
-----------------------------------------

What is your use case ?Your description is too generic.
Currently Wicket keeps a ref to the class name. This is so to not keep a hard reference to a Class which may lead to ClassLoader memory leaks. With your approach this is broken because you keep a reference to a model which keeps the page itself. Your LDM impl can solve this but you don't call its #detach() method.

All this can be solved by removing 'final' from org.apache.wicket.markup.html.link.BookmarkablePageLink#getPageClass() but as I said your description is too short to understand what flexibilty is missing.
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch, BookmarkablePageLinkWithPageClassModel.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to make it flexible and more reusable.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal commented on WICKET-4754:
---------------------------------------

user should be responsible for his model implementation which is usually the case in wicket .the most i would do if i go by this approach is provide javadoc which says if your model is not detachable pageclass will get serialized and this might lead to problem etc.
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch, BookmarkablePageLinkWithPageClassModel.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to make it flexible and more reusable.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal updated WICKET-4754:
----------------------------------

    Attachment: BookmarkablePageLink.patch

patch added
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to have a protected method which user can override to pass his page class.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal updated WICKET-4754:
----------------------------------

    Description: 
bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to make it flexible and more reusable.

i am providing the patch for the same .

thanks !

  was:
bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to have a protected method which user can override to pass his page class.

i am providing the patch for the same .

thanks !

    
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch, BookmarkablePageLinkWithPageClassModel.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to make it flexible and more reusable.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal updated WICKET-4754:
----------------------------------

    Issue Type: Improvement  (was: Bug)
    
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to have a protected method which user can override to pass his page class.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal commented on WICKET-4754:
---------------------------------------

the provided patch is for 6.x ..
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to have a protected method which user can override to pass his page class.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

vineet semwal commented on WICKET-4754:
---------------------------------------

new patch (BookmarkablePageLinkWithPageClassModel.patch) lets user pass a page class model ,some other code changes done to clean bookmarkablepagelink.
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch, BookmarkablePageLinkWithPageClassModel.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to have a protected method which user can override to pass his page class.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WICKET-4754) make bookmarkablepagelink more flexible/reusable

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

Martin Grigorov commented on WICKET-4754:
-----------------------------------------

BPL#detach() will call IModel<Class<Page>>'s #detach() but this will work *only* if the user uses your LDM. But since it is possible to use *any* IModel<Class<Page>> there is no way Wicket can assure that there wont be a hard ref to a Class.
                
> make bookmarkablepagelink more flexible/reusable
> ------------------------------------------------
>
>                 Key: WICKET-4754
>                 URL: https://issues.apache.org/jira/browse/WICKET-4754
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.8, 6.0.0
>            Reporter: vineet semwal
>         Attachments: BookmarkablePageLink.patch, BookmarkablePageLinkWithPageClassModel.patch
>
>
> bookmarkablepagelink currently only takes page class from constructor which makes it less flexible/reusable in some situations ,it would be good to make it flexible and more reusable.
> i am providing the patch for the same .
> thanks !

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira