Examples of TabGroupModel


Examples of org.lazan.t5.stitch.model.TabGroupModel

  @Property
  private String currentName;

  void setup() {
    tabModels = new LinkedHashMap<String, TabModel>();
    TabGroupModel tabGroupModel = new TabGroupModel() {
      public void addTab(String name, String label, Block body) {
        tabModels.put(name, new TabModel(name, label, body));
      }
    };
    request.setAttribute(ATTRIBUTE_MODEL, tabGroupModel);
View Full Code Here

Examples of org.lazan.t5.stitch.model.TabGroupModel

  @Inject
  private ComponentResources resources;
 
  @BeforeRenderBody
  boolean beforeRenderBody(MarkupWriter writer) {
    TabGroupModel tabModel = (TabGroupModel) request.getAttribute(TabGroup.ATTRIBUTE_MODEL);
    if (tabModel == null) {
      throw new IllegalStateException("Tab must be nested inside a TabGroup");
    }
    tabModel.addTab(name, label, resources.getBody());
   
    // don't render the body, it will be rendered by the TabGroup
    return false;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.