You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Gili (JIRA)" <ji...@apache.org> on 2008/06/17 18:27:45 UTC

[jira] Created: (WICKET-1705) Wicket pages should be injectable

Wicket pages should be injectable
---------------------------------

                 Key: WICKET-1705
                 URL: https://issues.apache.org/jira/browse/WICKET-1705
             Project: Wicket
          Issue Type: New Feature
          Components: wicket
    Affects Versions: 1.3.3
            Reporter: Gili


Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1705) Wicket pages should be injectable

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

Gili resolved WICKET-1705.
--------------------------

    Resolution: Invalid

My mistake. Igor just pointed out IPageFactory already exists.

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.3.3
>            Reporter: Gili
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) GuiceComponentInjector mishandles static fields

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

Gili updated WICKET-1705:
-------------------------

    Description: GuiceComponentInjector mistakenly wraps static fields with serializable proxies. These CGLIB proxies impose limitations (must have default constructor, may not have final methods, etc) on fields which are not strictly necessary. The new implementation allows the use of Binder.requestStaticInjection() which is more flexible.  (was: Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.)
     Issue Type: Bug  (was: New Feature)
        Summary: GuiceComponentInjector mishandles static fields  (was: Wicket pages should be injectable)

> GuiceComponentInjector mishandles static fields
> -----------------------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice2.patch
>
>
> GuiceComponentInjector mistakenly wraps static fields with serializable proxies. These CGLIB proxies impose limitations (must have default constructor, may not have final methods, etc) on fields which are not strictly necessary. The new implementation allows the use of Binder.requestStaticInjection() which is more flexible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) Wicket pages should be injectable

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

Gili updated WICKET-1705:
-------------------------

    Attachment: guice2.patch

- GuiceComponentInjector no longer injects into static fields (this was breaking Binder.requestStaticInjection())
- Error reports are now more verbose

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice1.patch, guice2.patch
>
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1705) Wicket pages should be injectable

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

Gili commented on WICKET-1705:
------------------------------

Turns out this patch isn't complete yet and I've run into technical problems LazyInitProxyFactory. I'll post an update as soon as I get this fixed.

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice1.patch
>
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1705) Wicket pages should be injectable

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

Gili commented on WICKET-1705:
------------------------------

Please Include GuicePageInjector.java in wicket-guice and insert the following line in GuiceWebApplicationFactory.java:

app.getSessionSettings().setPageFactory(new GuicePageInjector(injector));

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: GuicePageInjector.java
>
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) Wicket pages should be injectable

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

Gili updated WICKET-1705:
-------------------------

    Attachment:     (was: guice1.patch)

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice2.patch
>
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) Wicket pages should be injectable

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

Gili updated WICKET-1705:
-------------------------

    Attachment: GuicePageInjector.java

Injects Wicket Pages using Google Guice

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: GuicePageInjector.java
>
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (WICKET-1705) Wicket pages should be injectable

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

Gili reopened WICKET-1705:
--------------------------


> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 1.3.3
>            Reporter: Gili
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WICKET-1705) GuiceComponentInjector mishandles static fields

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

Igor Vaynberg resolved WICKET-1705.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-M3
                   1.3.4
         Assignee: Igor Vaynberg

> GuiceComponentInjector mishandles static fields
> -----------------------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>            Assignee: Igor Vaynberg
>             Fix For: 1.3.4, 1.4-M3
>
>         Attachments: guice2.patch
>
>
> GuiceComponentInjector mistakenly wraps static fields with serializable proxies. These CGLIB proxies impose limitations (must have default constructor, may not have final methods, etc) on fields which are not strictly necessary. The new implementation allows the use of Binder.requestStaticInjection() which is more flexible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) Wicket pages should be injectable

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

Gili updated WICKET-1705:
-------------------------

    Attachment: guice1.patch

Patch against revision 668773

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice1.patch, GuicePageInjector.java
>
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) Wicket pages should be injectable

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

Gili updated WICKET-1705:
-------------------------

    Attachment:     (was: GuicePageInjector.java)

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice1.patch
>
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-1705) GuiceComponentInjector mishandles static fields

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

Gili commented on WICKET-1705:
------------------------------

Here is a more detailed explanation of the problem:

http://google-guice.googlecode.com/files/Guice%201.0%20User%27s%20Guide.pdf page 19/22 states "Guice never performs static injection automatically. You must use Binder to explicitly request that the Injector inject your static members after startup:

binder.requestStaticInjection(User.class);"

and the example code right above this paragraph clearly shows that they're talking about static fields marked with @Inject. The problem is that the existing implementation of GuiceComponentInjector does not check whether a field is static or not before injecting its value. This patch adds the necessary check so only non-static fields are injected.

> GuiceComponentInjector mishandles static fields
> -----------------------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice2.patch
>
>
> GuiceComponentInjector mistakenly wraps static fields with serializable proxies. These CGLIB proxies impose limitations (must have default constructor, may not have final methods, etc) on fields which are not strictly necessary. The new implementation allows the use of Binder.requestStaticInjection() which is more flexible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) Wicket pages should be injectable

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

Gili updated WICKET-1705:
-------------------------

    Component/s:     (was: wicket)
                 wicket-guice

> Wicket pages should be injectable
> ---------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>
> Currently Wicket expects a specific signature when constructing new pages. Introducing a WebPage factory would enable us to inject pages using Google Guice or construct pages with arbitrary constructor signatures.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-1705) GuiceComponentInjector mishandles static fields

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

Gili updated WICKET-1705:
-------------------------

    Comment: was deleted

> GuiceComponentInjector mishandles static fields
> -----------------------------------------------
>
>                 Key: WICKET-1705
>                 URL: https://issues.apache.org/jira/browse/WICKET-1705
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-guice
>    Affects Versions: 1.3.3
>            Reporter: Gili
>         Attachments: guice2.patch
>
>
> GuiceComponentInjector mistakenly wraps static fields with serializable proxies. These CGLIB proxies impose limitations (must have default constructor, may not have final methods, etc) on fields which are not strictly necessary. The new implementation allows the use of Binder.requestStaticInjection() which is more flexible.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.