Examples of HtmlGraphicImage


Examples of javax.faces.component.html.HtmlGraphicImage

            link_remove.setActionExpression(mb);
            link_remove.setId("removeLink" + key);
            link_remove.setTitle("Remove this file."); // FIXME Localise this!
            //send along an helper attribute to identify which component triggered the event
            link_remove.getAttributes().put("IDint", key);
            HtmlGraphicImage image = (HtmlGraphicImage) facesContext
                    .getApplication().createComponent(
                            HtmlGraphicImage.COMPONENT_TYPE);
            image.setUrl("../graphics/user_trash.png");
            image.setAlt("delete-image");
            image.setId("graphicRemove" + key);
            link_remove.getChildren().add(image);

            //add all three components
            panel.getChildren().add(link_remove);
            link_src.getChildren().add(outputText);
View Full Code Here

Examples of javax.faces.component.html.HtmlGraphicImage

       
        HtmlOutcomeTargetButton button2 = (HtmlOutcomeTargetButton) form.findComponent("button2");
        Assert.assertNotNull(button2);
        Assert.assertEquals("rollback", button2.getOutcome());
       
        HtmlGraphicImage img1 = (HtmlGraphicImage) form.findComponent("img1");
        Assert.assertNotNull(img1);
        Assert.assertEquals("/my/image.png", img1.getUrl());
       
        HtmlCommandButton input1 = (HtmlCommandButton) form.findComponent("input1");
        Assert.assertNotNull(input1);
       
        HtmlSelectBooleanCheckbox input2 = (HtmlSelectBooleanCheckbox) form.findComponent("input2");
View Full Code Here

Examples of javax.faces.component.html.HtmlGraphicImage

  HtmlPanelGroup toolbar = new HtmlPanelGroup();
  toolbar.setId("mapToolbar");
  toolbar.setStyleClass("mapToolbar");
  panel.getChildren().add(toolbar);
 
  HtmlGraphicImage btn;
  String sMsg;
   
  btn = new HtmlGraphicImage();
  sMsg = msgBroker.retrieveMessage("catalog.general.map.zoomToInputEnvelope");
  btn.setId("mapButton-zoomToInputEnvelope");
  btn.setAlt(sMsg);
  btn.setTitle(sMsg);
  btn.setUrl("/catalog/images/btn-zoomToInputEnvelope-off.gif");
  toolbar.getChildren().add(btn);
 
  // make the map component
  StringBuffer sb = new StringBuffer();
  String sMapId = "interactiveMap";
View Full Code Here

Examples of javax.faces.component.html.HtmlGraphicImage

      HtmlOutputText space = new HtmlOutputText();
      space.setEscape(false);
      space.setValue(" ");
      panel.getChildren().add(space);
     
      HtmlGraphicImage img = new HtmlGraphicImage();
      img.setStyleClass("hintIcon");
      img.setUrl("/catalog/images/hint.gif");
      img.setOnclick("mdeToggleHint(this);");
      panel.getChildren().add(img);
     
      HtmlPanelGroup hintSection = new HtmlPanelGroup();
      hintSection.setStyle("display:none;");
      hintSection.setStyleClass("hintSection");
View Full Code Here

Examples of javax.faces.component.html.HtmlGraphicImage

    // handle a thumbnail
    if (parameter.getMeaningType().equalsIgnoreCase(Meaning.MEANINGTYPE_THUMBNAIL_URL)) {
      HtmlPanelGroup panel = new HtmlPanelGroup();
      panel.getChildren().add(component);
      panel.getChildren().add(makeBR());
      HtmlGraphicImage img = new HtmlGraphicImage();
      img.setUrl(sValue);
      img.setStyle("border: 1px solid silver");
      panel.getChildren().add(img);
      return panel;
     
    } else {
     
View Full Code Here

Examples of javax.faces.component.html.HtmlGraphicImage

  checkBox.setId(sCheckboxId);
  checkBox.setSelected(getOpen());
  checkBox.setStyle("display:none;");
  headerTable.getChildren().add(checkBox);
 
  HtmlGraphicImage img = new HtmlGraphicImage();
  img.setId(sImgId);
  setGraphicUrl(img);
  headerTable.getChildren().add(img);
 
  HtmlOutputText caption = new HtmlOutputText();
  caption.setValue(sCaption);
View Full Code Here

Examples of javax.faces.component.html.HtmlGraphicImage

    checkBox.setSelected(getOpen());
    //checkBox.setOnclick(sbOnclick.toString());
    checkBox.setStyle("display:none;");
    headerTable.getChildren().add(checkBox);
   
    HtmlGraphicImage img = new HtmlGraphicImage();
    img.setId(sImgId);
    setGraphicUrl(img);
    headerTable.getChildren().add(img);
   
    HtmlOutputText caption = new HtmlOutputText();
    caption.setValue(sCaption);
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlGraphicImage

            //out.writeURIAttribute("background", getImageSrc(context, tree, "line-trunk.gif", true), null);
            out.writeURIAttribute(HTML.STYLE_ATTR, "background-image:url('" + getImageSrc(context, tree, "line-trunk.gif", true) + "');", null);
        }

//      add the appropriate image for the nav control
        UIGraphic image = new HtmlGraphicImage();
        String imageId = IMAGE_PREFIX+(counter++);
        image.setId(imageId);
        image.setUrl(navSrcUrl);
       
        Map imageAttrs = image.getAttributes();
        imageAttrs.put(HTML.WIDTH_ATTR, "19");
        imageAttrs.put(HTML.HEIGHT_ATTR, "18");
        imageAttrs.put(HTML.BORDER_ATTR, "0");
        imageAttrs.put(HTML.ALT_ATTR, "Nav control image"); // placing a suitable description for the alt.

        if (clientSideToggle)
        {
            /**
             * With client side toggle, user has the option to specify open/closed images for the node (in addition to
             * the navigtion ones provided by the component.)
             */
            String expandImgSrc = "";
            String collapseImgSrc = "";
            String nodeImageId = "";

            UIComponent expandFacet = nodeTypeFacet.getFacet("expand");
            if (expandFacet != null)
            {
                UIGraphic expandImg = (UIGraphic)expandFacet;
                expandImgSrc = context.getApplication().getViewHandler().getResourceURL(context, expandImg.getUrl());
                if (expandImg.isRendered())
                {
                    expandImg.setId(imageId + NODE_STATE_EXPANDED);
                    expandImg.setParent(tree);
                    nodeImageId = expandImg.getClientId(context);
                    nodeImgFacet = expandFacet;
                }
            }

            UIComponent collapseFacet = nodeTypeFacet.getFacet("collapse");
            if (collapseFacet != null)
            {
                UIGraphic collapseImg = (UIGraphic)collapseFacet;
                collapseImgSrc = context.getApplication().getViewHandler().getResourceURL(context, collapseImg.getUrl());
                if (collapseImg.isRendered())
                {
                    collapseImg.setId(imageId + NODE_STATE_CLOSED);
                    collapseImg.setParent(tree);
                    nodeImageId = collapseImg.getClientId(context);
                    nodeImgFacet = collapseFacet;
                }
            }

            image.setParent(tree);
            if (node.getChildCount() > 0)
            {
                String onClick = new StringBuffer()
                    .append("treeNavClick('")
                    .append(spanId)
                    .append("', '")
                    .append(image.getClientId(context))
                    .append("', '")
                    .append(navSrc)
                    .append("', '")
                    .append(altSrc)
                    .append("', '")
View Full Code Here

Examples of org.apache.myfaces.component.html.ext.HtmlGraphicImage

            //out.writeURIAttribute("background", getImageSrc(context, tree, "line-trunk.gif", true), null);
            out.writeURIAttribute(HTML.STYLE_ATTR, "background-image:url('" + getImageSrc(context, tree, "line-trunk.gif", true) + "');", null);
        }

//      add the appropriate image for the nav control
        UIGraphic image = new HtmlGraphicImage();
        image.setTransient(true);
        String imageId = IMAGE_PREFIX+tree.createUniqueId(context, null).substring(UIViewRoot.UNIQUE_ID_PREFIX.length());//IMAGE_PREFIX+(counter++);
        image.setId(imageId);
        image.setUrl(navSrcUrl);
       
        Map imageAttrs = image.getAttributes();
        imageAttrs.put(HTML.WIDTH_ATTR, "19");
        imageAttrs.put(HTML.HEIGHT_ATTR, "18");
        imageAttrs.put(HTML.BORDER_ATTR, "0");
        imageAttrs.put(HTML.ALT_ATTR, "Nav control image"); // placing a suitable description for the alt.

        if (clientSideToggle)
        {
            /**
             * With client side toggle, user has the option to specify open/closed images for the node (in addition to
             * the navigtion ones provided by the component.)
             */
            String expandImgSrc = "";
            String collapseImgSrc = "";
            String nodeImageId = "";

            UIComponent expandFacet = nodeTypeFacet.getFacet("expand");
            if (expandFacet != null)
            {
                UIGraphic expandImg = (UIGraphic)expandFacet;
                expandImgSrc = context.getApplication().getViewHandler().getResourceURL(context, expandImg.getUrl());
                if (expandImg.isRendered())
                {
                    nodeImageId = expandImg.getClientId(context);
                    nodeImgFacet = expandFacet;
                }
            }

            UIComponent collapseFacet = nodeTypeFacet.getFacet("collapse");
            if (collapseFacet != null)
            {
                UIGraphic collapseImg = (UIGraphic)collapseFacet;
                collapseImgSrc = context.getApplication().getViewHandler().getResourceURL(context, collapseImg.getUrl());
                if (collapseImg.isRendered())
                {
                    nodeImageId = collapseImg.getClientId(context);
                    nodeImgFacet = collapseFacet;
                }
            }

            image.setParent(tree);
            if (node.getChildCount() > 0)
            {
                String onClick = new StringBuffer()
                    .append("treeNavClick('")
                    .append(spanId)
                    .append("', '")
                    .append(image.getClientId(context))
                    .append("', '")
                    .append(navSrc)
                    .append("', '")
                    .append(altSrc)
                    .append("', '")
View Full Code Here

Examples of org.jboss.seam.ui.component.html.HtmlGraphicImage

     */
    protected void setProperties(UIComponent component)
    {
        // TODO Auto-generated method stub
        super.setProperties(component);
    HtmlGraphicImage comp = (HtmlGraphicImage) component;
            
            if (this._alt != null) {
        if (this._alt.isLiteralText()) {
          try {
                       
            java.lang.String __alt = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._alt.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setAlt(__alt);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("alt", this._alt);
        }
      }
                         setConverterProperty(comp, this._converter);
                  
            if (this._dir != null) {
        if (this._dir.isLiteralText()) {
          try {
                       
            java.lang.String __dir = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._dir.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setDir(__dir);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("dir", this._dir);
        }
      }
                         
            if (this._fileName != null) {
        if (this._fileName.isLiteralText()) {
          try {
                       
            java.lang.String __fileName = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._fileName.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setFileName(__fileName);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("fileName", this._fileName);
        }
      }
                        
            if (this._height != null) {
        if (this._height.isLiteralText()) {
          try {
                       
            java.lang.String __height = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._height.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setHeight(__height);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("height", this._height);
        }
      }
                         
            if (this._ismap != null) {
        if (this._ismap.isLiteralText()) {
          try {
                       
            Boolean __ismap = (Boolean) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._ismap.getExpressionString(),
                      Boolean.class);
         
                        comp.setIsmap(__ismap.booleanValue());
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("ismap", this._ismap);
        }
      }
                        
            if (this._lang != null) {
        if (this._lang.isLiteralText()) {
          try {
                       
            java.lang.String __lang = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._lang.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setLang(__lang);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("lang", this._lang);
        }
      }
                        
            if (this._longdesc != null) {
        if (this._longdesc.isLiteralText()) {
          try {
                       
            java.lang.String __longdesc = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._longdesc.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setLongdesc(__longdesc);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("longdesc", this._longdesc);
        }
      }
                        
            if (this._onclick != null) {
        if (this._onclick.isLiteralText()) {
          try {
                       
            java.lang.String __onclick = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onclick.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnclick(__onclick);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onclick", this._onclick);
        }
      }
                        
            if (this._ondblclick != null) {
        if (this._ondblclick.isLiteralText()) {
          try {
                       
            java.lang.String __ondblclick = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._ondblclick.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOndblclick(__ondblclick);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("ondblclick", this._ondblclick);
        }
      }
                        
            if (this._onkeydown != null) {
        if (this._onkeydown.isLiteralText()) {
          try {
                       
            java.lang.String __onkeydown = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onkeydown.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnkeydown(__onkeydown);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onkeydown", this._onkeydown);
        }
      }
                        
            if (this._onkeypress != null) {
        if (this._onkeypress.isLiteralText()) {
          try {
                       
            java.lang.String __onkeypress = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onkeypress.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnkeypress(__onkeypress);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onkeypress", this._onkeypress);
        }
      }
                        
            if (this._onkeyup != null) {
        if (this._onkeyup.isLiteralText()) {
          try {
                       
            java.lang.String __onkeyup = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onkeyup.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnkeyup(__onkeyup);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onkeyup", this._onkeyup);
        }
      }
                        
            if (this._onmousedown != null) {
        if (this._onmousedown.isLiteralText()) {
          try {
                       
            java.lang.String __onmousedown = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onmousedown.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnmousedown(__onmousedown);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onmousedown", this._onmousedown);
        }
      }
                        
            if (this._onmousemove != null) {
        if (this._onmousemove.isLiteralText()) {
          try {
                       
            java.lang.String __onmousemove = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onmousemove.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnmousemove(__onmousemove);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onmousemove", this._onmousemove);
        }
      }
                        
            if (this._onmouseout != null) {
        if (this._onmouseout.isLiteralText()) {
          try {
                       
            java.lang.String __onmouseout = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onmouseout.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnmouseout(__onmouseout);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onmouseout", this._onmouseout);
        }
      }
                        
            if (this._onmouseover != null) {
        if (this._onmouseover.isLiteralText()) {
          try {
                       
            java.lang.String __onmouseover = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onmouseover.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnmouseover(__onmouseover);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onmouseover", this._onmouseover);
        }
      }
                        
            if (this._onmouseup != null) {
        if (this._onmouseup.isLiteralText()) {
          try {
                       
            java.lang.String __onmouseup = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._onmouseup.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setOnmouseup(__onmouseup);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("onmouseup", this._onmouseup);
        }
      }
                         
            if (this._style != null) {
        if (this._style.isLiteralText()) {
          try {
                       
            java.lang.String __style = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._style.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setStyle(__style);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("style", this._style);
        }
      }
                        
            if (this._styleClass != null) {
        if (this._styleClass.isLiteralText()) {
          try {
                       
            java.lang.String __styleClass = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._styleClass.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setStyleClass(__styleClass);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("styleClass", this._styleClass);
        }
      }
                        
            if (this._title != null) {
        if (this._title.isLiteralText()) {
          try {
                       
            java.lang.String __title = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._title.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setTitle(__title);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("title", this._title);
        }
      }
                        
            if (this._url != null) {
        if (this._url.isLiteralText()) {
          try {
                       
            java.lang.String __url = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._url.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setUrl(__url);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("url", this._url);
        }
      }
                        
            if (this._usemap != null) {
        if (this._usemap.isLiteralText()) {
          try {
                       
            java.lang.String __usemap = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._usemap.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setUsemap(__usemap);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("usemap", this._usemap);
        }
      }
                        
            if (this._value != null) {
        if (this._value.isLiteralText()) {
          try {
                       
            java.lang.Object __value = (java.lang.Object) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._value.getExpressionString(),
                      java.lang.Object.class);
         
                        comp.setValue(__value);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("value", this._value);
        }
      }
                        
            if (this._width != null) {
        if (this._width.isLiteralText()) {
          try {
                       
            java.lang.String __width = (java.lang.String) getFacesContext().
              getApplication().
                getExpressionFactory().
                  coerceToType(this._width.getExpressionString(),
                      java.lang.String.class);
         
                        comp.setWidth(__width);
                      } catch (ELException e) {
            throw new FacesException(e);
          }
        } else {
          component.setValueExpression("width", this._width);
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.