You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2018/08/06 15:52:00 UTC

[jira] [Commented] (WICKET-6577) Introduce class GenericWebMarkupContainer

    [ https://issues.apache.org/jira/browse/WICKET-6577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16570390#comment-16570390 ] 

ASF subversion and git services commented on WICKET-6577:
---------------------------------------------------------

Commit 7552557fb2fcec53da21889e4eec0007b092adc3 in wicket's branch refs/heads/wicket-8.x from [~svenmeier]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=7552557 ]

WICKET-6577 GenericWebMarkupContainer

for convenience


> Introduce class GenericWebMarkupContainer
> -----------------------------------------
>
>                 Key: WICKET-6577
>                 URL: https://issues.apache.org/jira/browse/WICKET-6577
>             Project: Wicket
>          Issue Type: New Feature
>          Components: wicket
>    Affects Versions: 8.0.0
>            Reporter: Michael Gerhards
>            Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Wicket provides a GenericPanel. Why does it not provide a GenericWebMarkupContainer?
> The code itself is trivial:
> public class GenericWebMarkupContainer<T> extends WebMarkupContainer implements IGenericComponent<T, GenericWebMarkupContainer<T>> {
>     public GenericWebMarkupContainer(String wicketId) {
>         this(wicketId, null);
>     }
>     public GenericWebMarkupContainer(String wicketId, IModel<T> model) {
>         super(wicketId, model);
>     }
> }
>  
> My usage scenario is the following:
> GenericWebMarkupContainer<String> loggedInUser = new GenericWebMarkupContainer<String>("loggedInUser", loggedInUserIDModel) {
>     @Override
>     protected void onConfigure() {
>         super.onConfigure();
>         String loggedInUserID = getModelObject(); // IGenericComponent
>         setVisibilityAllowed(notNullAndNotEmpty(loggedInUserID));
>     }
> };
> The GenericWebMarkupContainer here is just used as a visibility-container since HTML enclosures not always work fine. It references its own ModelObject to determine visibility. To be type-save, we need to implement IGenericComponent.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)