Package org.richfaces.component

Examples of org.richfaces.component.UIPanelBar


  public boolean getRendersChildren() {
    return true;
  }

  public String expanded(FacesContext context, UIComponent component) throws IOException {
    UIPanelBar panelbar = (UIPanelBar) component;
    String value = (String)panelbar.getValue();
        ValueBinding valueBinding = panelbar.getValueBinding("selectedPanel");
    if (value != null && valueBinding == null) {
      return value;
    } else {
            Object selected = panelbar.getSelectedPanel();
            if (selected != null) {
                List items = panelbar.getChildren();
                for(Iterator it = items.iterator();it.hasNext();) {
                    UIComponent comp = (UIComponent)it.next();
                    if (comp instanceof UIPanelBarItem) {
                        UIPanelBarItem item = (UIPanelBarItem) comp;
                        if (item.getName().equals(selected)) {
View Full Code Here


  }
 
  public void encodeScript(FacesContext context, UIComponent component) throws IOException{
   
    if(component instanceof UIPanelBar){
      UIPanelBar panelBar = (UIPanelBar)component;
     
      List items = getScriptPanelBarItems(context, panelBar);
       
      ScriptOptions options = new ScriptOptions(component);
     
      AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
     
      Object changeScript = panelBar.getAttributes().get("onitemchange");
     
      if (changeScript != null && !changeScript.equals("")) {
        JSFunctionDefinition function =  new JSFunctionDefinition();
        function.addParameter("event");
        function.addToBody(changeScript);
        options.addOption("onitemchange",function);
      } else {
        options.addOption("onitemchange","");
      }
         
      options.addOption("onclick", panelBar.getAttributes().get("onclick"));
      options.addOption("mouseover", panelBar.getAttributes().get("onmouseover"));
      options.addOption("mouseout", panelBar.getAttributes().get("onmouseout"));
      options.addOption("mousemove", panelBar.getAttributes().get("onmousemove"));
      options.addOption("items", items);
      options.addOption("ajax", ajaxContext.isAjaxRequest());
     
         
      StringBuffer script = new StringBuffer();
      JSFunction function = new JSFunction("new Richfaces.PanelBar");
      function.addParameter(panelBar.getClientId(context));
      function.addParameter(options);
      function.appendScript(script);
     
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement(HTML.SCRIPT_ELEM, panelBar);
View Full Code Here

  public boolean getRendersChildren() {
    return true;
  }

  public String expanded(FacesContext context, UIComponent component) throws IOException {
    UIPanelBar panelbar = (UIPanelBar) component;
    String value = (String)panelbar.getValue();
        ValueBinding valueBinding = panelbar.getValueBinding("selectedPanel");
    if (value != null && valueBinding == null) {
      UIComponent item = component.findComponent(value);
      if (item != null) {
        panelbar.setValue(item.getClientId(context));
        return item.getClientId(context);
      }
    } else {
            Object selected = panelbar.getSelectedPanel();
            if (selected != null) {
                List items = panelbar.getChildren();
                for(Iterator it = items.iterator();it.hasNext();) {
                    UIComponent comp = (UIComponent)it.next();
                    if (comp instanceof UIPanelBarItem) {
                        UIPanelBarItem item = (UIPanelBarItem) comp;
                        if (item.getName().equals(selected)) {
View Full Code Here

  }
 
  public void encodeScript(FacesContext context, UIComponent component) throws IOException{
   
    if(component instanceof UIPanelBar){
      UIPanelBar panelBar = (UIPanelBar)component;
     
      List items = getScriptPanelBarItems(context, panelBar);
       
      ScriptOptions options = new ScriptOptions(component);
     
     
      Object changeScript = panelBar.getAttributes().get("onitemchange");
     
      if (changeScript != null && !changeScript.equals("")) {
        JSFunctionDefinition function =  new JSFunctionDefinition();
        function.addParameter("event");
        function.addToBody(changeScript);
        options.addOption("onitemchange",function);
      } else {
        options.addOption("onitemchange","");
      }
         
      options.addOption("onclick", panelBar.getAttributes().get("onclick"));
      options.addOption("mouseover", panelBar.getAttributes().get("onmouseover"));
      options.addOption("mouseout", panelBar.getAttributes().get("onmouseout"));
      options.addOption("mousemove", panelBar.getAttributes().get("onmousemove"));
      options.addOption("items", items);
     
         
      StringBuffer script = new StringBuffer();
      JSFunction function = new JSFunction("new Richfaces.PanelBar");
      function.addParameter(panelBar.getClientId(context));
      function.addParameter(options);
      function.appendScript(script);
     
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement(HTML.SCRIPT_ELEM, panelBar);
View Full Code Here

  public boolean getRendersChildren() {
    return true;
  }

  public String expanded(FacesContext context, UIComponent component) throws IOException {
    UIPanelBar panelbar = (UIPanelBar) component;
    String value = (String)panelbar.getValue();
        ValueBinding valueBinding = panelbar.getValueBinding("selectedPanel");
    if (value != null && valueBinding == null) {
      return value;
    } else {
            Object selected = panelbar.getSelectedPanel();
            if (selected != null) {
                List items = panelbar.getChildren();
                for(Iterator it = items.iterator();it.hasNext();) {
                    UIComponent comp = (UIComponent)it.next();
                    if (comp instanceof UIPanelBarItem) {
                        UIPanelBarItem item = (UIPanelBarItem) comp;
                        if (item.getName().equals(selected)) {
View Full Code Here

  }

  public void encodeScript(FacesContext context, UIComponent component) throws IOException{
   
    if(component instanceof UIPanelBar){
      UIPanelBar panelBar = (UIPanelBar)component;
     
      List<?> items = getScriptPanelBarItems(context, panelBar);
       
      ScriptOptions options = new ScriptOptions(component);
     
      AjaxContext ajaxContext = AjaxContext.getCurrentInstance(context);
   
      addHandlerOption(panelBar, options, "onitemchange");
      addHandlerOption(panelBar, options, "onitemchanged");
         
      options.addOption("onclick", panelBar.getAttributes().get("onclick"));
      options.addOption("mouseover", panelBar.getAttributes().get("onmouseover"));
      options.addOption("mouseout", panelBar.getAttributes().get("onmouseout"));
      options.addOption("mousemove", panelBar.getAttributes().get("onmousemove"));
      options.addOption("items", items);
      options.addOption("ajax", ajaxContext.isAjaxRequest());
     
         
      StringBuffer script = new StringBuffer();
      JSFunction function = new JSFunction("new Richfaces.PanelBar");
      function.addParameter(panelBar.getClientId(context));
      function.addParameter(options);
      function.appendScript(script);
     
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement(HTML.SCRIPT_ELEM, panelBar);
View Full Code Here

  public boolean getRendersChildren() {
    return true;
  }

  public String expanded(FacesContext context, UIComponent component) throws IOException {
    UIPanelBar panelbar = (UIPanelBar) component;
    String value = (String)panelbar.getValue();
        ValueBinding valueBinding = panelbar.getValueBinding("selectedPanel");
    if (value != null && valueBinding == null) {
      UIComponent item = component.findComponent(value);
      if (item != null) {
        panelbar.setValue(item.getClientId(context));
        return item.getClientId(context);
      }
    } else {
            Object selected = panelbar.getSelectedPanel();
            if (selected != null) {
                List items = panelbar.getChildren();
                for(Iterator it = items.iterator();it.hasNext();) {
                    UIComponent comp = (UIComponent)it.next();
                    if (comp instanceof UIPanelBarItem) {
                        UIPanelBarItem item = (UIPanelBarItem) comp;
                        if (item.getName().equals(selected)) {
View Full Code Here

  public boolean getRendersChildren() {
    return true;
  }

  public String expanded(FacesContext context, UIComponent component) throws IOException {
    UIPanelBar panelbar = (UIPanelBar) component;
    String value = (String)panelbar.getValue();
        ValueBinding valueBinding = panelbar.getValueBinding("selectedPanel");
    if (value != null && valueBinding == null) {
      UIComponent item = component.findComponent(value);
      if (item != null) {
        panelbar.setValue(item.getClientId(context));
        return item.getClientId(context);
      }
    } else {
            Object selected = panelbar.getSelectedPanel();
            if (selected != null) {
                List items = panelbar.getChildren();
                for(Iterator it = items.iterator();it.hasNext();) {
                    UIComponent comp = (UIComponent)it.next();
                    if (comp instanceof UIPanelBarItem) {
                        UIPanelBarItem item = (UIPanelBarItem) comp;
                        if (item.getName().equals(selected)) {
View Full Code Here

  }
 
  public void encodeScript(FacesContext context, UIComponent component) throws IOException{
   
    if(component instanceof UIPanelBar){
      UIPanelBar panelBar = (UIPanelBar)component;
     
      List items = getScriptPanelBarItems(context, panelBar);
       
      ScriptOptions options = new ScriptOptions(component);
     
     
      Object changeScript = panelBar.getAttributes().get("onitemchange");
     
      if (changeScript != null && !changeScript.equals("")) {
        JSFunctionDefinition function =  new JSFunctionDefinition();
        function.addParameter("event");
        function.addToBody(changeScript);
        options.addOption("onitemchange",function);
      } else {
        options.addOption("onitemchange","");
      }
         
      options.addOption("onclick", panelBar.getAttributes().get("onclick"));
      options.addOption("mouseover", panelBar.getAttributes().get("onmouseover"));
      options.addOption("mouseout", panelBar.getAttributes().get("onmouseout"));
      options.addOption("mousemove", panelBar.getAttributes().get("onmousemove"));
      options.addOption("items", items);
     
         
      StringBuffer script = new StringBuffer();
      JSFunction function = new JSFunction("new Richfaces.PanelBar");
      function.addParameter(panelBar.getClientId(context));
      function.addParameter(options);
      function.appendScript(script);
     
      ResponseWriter writer = context.getResponseWriter();
      writer.startElement(HTML.SCRIPT_ELEM, panelBar);
View Full Code Here

TOP

Related Classes of org.richfaces.component.UIPanelBar

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.