[ https://issues.apache.org/jira/browse/WICKET-6577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16570393#comment-16570393 ]
ASF subversion and git services commented on WICKET-6577: --------------------------------------------------------- Commit 2647daba6de492e5be856a0cb99a470bd0e41dda in wicket's branch refs/heads/wicket-8.x from [~svenmeier] [ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=2647dab ] 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)