Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlPanelGroup


// constructors ================================================================

/** Default constructor. */
public SearchController() {
  detailsPanelGroup = new HtmlPanelGroup();
}
View Full Code Here


// constructors ================================================================

/** Default constructor. */
public EditMetadataController() {
  _sectionsPanelGroup = new HtmlPanelGroup();
  _selectablePublishers = new SelectablePublishers();
  FacesContext fc = FacesContext.getCurrentInstance();
  if (fc!=null) {
    ExternalContext ec = fc.getExternalContext();

View Full Code Here

  String testResourceKey = getTestResourceKey();
  if(sMeaningType != null && sMeaningType.equalsIgnoreCase(Meaning.MEANINGTYPE_RESOURCE_URL)
      && testResourceKey.length()>0){
    String testResourceLabel = msgBroker.retrieveMessage(testResourceKey);
    UIComponent inputComponent = applyHint(context,component);     
    HtmlPanelGroup panel = new HtmlPanelGroup();
    panel.getChildren().add(inputComponent);
    HtmlCommandButton testBtn = new HtmlCommandButton();
    String inputComponentId = getFacesId();
    testBtn.setId(inputComponentId +"_testBtn");
    testBtn.setOnclick("window.open(document.getElementById('mdEditor:"+inputComponentId+"').value)");
    testBtn.setValue(testResourceLabel);
    panel.getChildren().add(testBtn);
    return panel;
  }else{
    return applyHint(context,component);
  }
}
View Full Code Here

  panelGrid.setColumns(2);
  panelGrid.setWidth("100%");
  panelGrid.setColumnClasses("nav,count");

  // create navigation panel
  HtmlPanelGroup navigationPanelGroup = new HtmlPanelGroup();
  panelGrid.getChildren().add(navigationPanelGroup);

  outText = makeResultText(facesContext, sMsg);
  navigationPanelGroup.getChildren().add(outText);

  int linkCount = 0;

  // add page navigation links
  if (nTotalPageCount > 1) {

    // first and previous pages
    if (cursor.getHasPreviousPage()) {
      if (nStartPage != 1) {
        sMsg = msgBroker.retrieveMessage(sKeyPfx + "first");
        cmdLink = makePageLink(facesContext, 1, sMsg, isBottom, ++linkCount);
        navigationPanelGroup.getChildren().add(cmdLink);
      }
      nPage = cursor.getPreviousPage();
      sMsg = msgBroker.retrieveMessage(sKeyPfx + "previous");
      cmdLink = makePageLink(facesContext, nPage, sMsg, isBottom, ++linkCount);
      navigationPanelGroup.getChildren().add(cmdLink);
    }

    // pages
    for (int i = nStartPage; i <= nEndPage; i++) {
      cmdLink = makePageLink(facesContext, i, "" + i, isBottom, ++linkCount);
      navigationPanelGroup.getChildren().add(cmdLink);
    }

    // next and last pages
    if (cursor.getHasNextPage()) {
      nPage = cursor.getNextPage();
      sMsg = msgBroker.retrieveMessage(sKeyPfx + "next");
      cmdLink = makePageLink(facesContext, nPage, sMsg, isBottom, ++linkCount);
      navigationPanelGroup.getChildren().add(cmdLink);
      if (nEndPage != nTotalPageCount) {
        sMsg = msgBroker.retrieveMessage(sKeyPfx + "last");
        cmdLink = makePageLink(facesContext, nTotalPageCount, sMsg, isBottom, ++linkCount);
        navigationPanelGroup.getChildren().add(cmdLink);
      }
    }
  }

  // create records per page panel
  if (!isBottom && getChangeListenerExpression().length()>0) {
    HtmlPanelGroup resultsPerPagePanelGroup = new HtmlPanelGroup();
    panelGrid.getChildren().add(resultsPerPagePanelGroup);

    // listbox id
    String listBoxId = "recsPerPage";
   
    // Display label
    HtmlOutputLabel resultsPerPageLabel =
      makeResultsLabel(facesContext, sRecordsPerPageMsg);
    resultsPerPagePanelGroup.getChildren().add(resultsPerPageLabel);
    resultsPerPageLabel.setFor(listBoxId);

    // Create lisbox
    HtmlSelectOneListbox listBox = new HtmlSelectOneListbox();
    resultsPerPagePanelGroup.getChildren().add(listBox);
    listBox.setId(listBoxId);

    listBox.setSize(1);
    listBox.setValue(Integer.toString(cursor.getRecordsPerPage()));
    UIComponent form = findForm(masterPanelGroup);
View Full Code Here

                                      Section section,
                                      Parameter parameter) {
 
  // initialize the panel
  MessageBroker msgBroker = context.extractMessageBroker();
  HtmlPanelGroup panel = new HtmlPanelGroup();
  String sIdPfx = getFacesId();
  panel.setId(sIdPfx);
 
  // build a map of values
  HashMap<String,String> valuesMap = new HashMap<String,String>();
  for (ContentValue value: parameter.getContent().getMultipleValues()) {
    valuesMap.put(value.getValue(),"");
  }
 
  // add a checkbox for each code
  Codes codes = parameter.getContent().getCodes();
  for (Code code: codes.values()) {
   
    // make the checkbox
    String sKey = code.getKey();
    String sFKey = sKey.replace('.','_');
    sFKey = sKey.replace(':','_');
    String sId  = sIdPfx+"-"+sFKey;
    HtmlSelectBooleanCheckbox checkBox = new HtmlSelectBooleanCheckbox();
    checkBox.setId(sId);
    checkBox.setDisabled(!getEditable());
    checkBox.setSelected(valuesMap.containsKey(sKey));
    checkBox.setOnchange(getOnChange());
    checkBox.setOnclick(getOnClick());
    panel.getChildren().add(checkBox);
   
    // make the label
    String sLabel = sKey;
    String sResKey = code.getResourceKey();
    if (sResKey.length() > 0) {
      sLabel = msgBroker.retrieveMessage(sResKey);
    }
    HtmlOutputLabel outLabel = new HtmlOutputLabel();
    // even label has to have unique id (for GlassFish)
    outLabel.setId(sId+"label");
    outLabel.setFor(sId);
    outLabel.setValue(sLabel);
    panel.getChildren().add(outLabel);
    panel.getChildren().add(makeBR());
  }

  return panel;
}
View Full Code Here

TOP

Related Classes of javax.faces.component.html.HtmlPanelGroup

Copyright © 2018 www.massapicom. 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.