Package javax.faces.component.html

Examples of javax.faces.component.html.HtmlOutputLink


       
        HtmlCommandLink link2 = (HtmlCommandLink) form.findComponent("link2");
        Assert.assertNotNull(link2);
        Assert.assertEquals(1, link2.getActionListeners().length);
       
        HtmlOutputLink link3 = (HtmlOutputLink) form.findComponent("link3");
        Assert.assertNotNull(link3);
        Assert.assertEquals("/my/new/location.txt", link3.getValue());
       
        HtmlOutcomeTargetLink link4 = (HtmlOutcomeTargetLink) form.findComponent("link4");
        Assert.assertNotNull(link4);
        Assert.assertEquals("rollback", link4.getOutcome());
       
View Full Code Here


        super.setUp();

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);
View Full Code Here

{
  if (!(component instanceof HtmlOutputLink))
  {
    throw new IllegalArgumentException("Component " + component.getClass().getName() + " is no HtmlOutputLink");
  }
  HtmlOutputLink comp = (HtmlOutputLink)component;

  super.setProperties(component);

  if (_onfocus != null)
  {
    comp.setValueExpression("onfocus", _onfocus);
  }
  if (_accesskey != null)
  {
    comp.setValueExpression("accesskey", _accesskey);
  }
  if (_coords != null)
  {
    comp.setValueExpression("coords", _coords);
  }
  if (_tabindex != null)
  {
    comp.setValueExpression("tabindex", _tabindex);
  }
  if (_charset != null)
  {
    comp.setValueExpression("charset", _charset);
  }
  if (_value != null)
  {
    comp.setValueExpression("value", _value);
  }
  if (_onmousedown != null)
  {
    comp.setValueExpression("onmousedown", _onmousedown);
  }
  if (_onclick != null)
  {
    comp.setValueExpression("onclick", _onclick);
  }
  if (_dir != null)
  {
    comp.setValueExpression("dir", _dir);
  }
  if (_target != null)
  {
    comp.setValueExpression("target", _target);
  }
  if (_lang != null)
  {
    comp.setValueExpression("lang", _lang);
  }
  if (_onmouseout != null)
  {
    comp.setValueExpression("onmouseout", _onmouseout);
  }
  if (_onmousemove != null)
  {
    comp.setValueExpression("onmousemove", _onmousemove);
  }
  if (_onmouseup != null)
  {
    comp.setValueExpression("onmouseup", _onmouseup);
  }
  if (_type != null)
  {
    comp.setValueExpression("type", _type);
  }
  if (_rev != null)
  {
    comp.setValueExpression("rev", _rev);
  }
  if (_style != null)
  {
    comp.setValueExpression("style", _style);
  }
  if (_styleClass != null)
  {
    comp.setValueExpression("styleClass", _styleClass);
  }
  if (_onblur != null)
  {
    comp.setValueExpression("onblur", _onblur);
  }
  if (_shape != null)
  {
    comp.setValueExpression("shape", _shape);
  }
  if (_rel != null)
  {
    comp.setValueExpression("rel", _rel);
  }
  if (_ondblclick != null)
  {
    comp.setValueExpression("ondblclick", _ondblclick);
  }
  if (_onmouseover != null)
  {
    comp.setValueExpression("onmouseover", _onmouseover);
  }
  if (_onkeyup != null)
  {
    comp.setValueExpression("onkeyup", _onkeyup);
  }
  if (_title != null)
  {
    comp.setValueExpression("title", _title);
  }
  if (_onkeydown != null)
  {
    comp.setValueExpression("onkeydown", _onkeydown);
  }
  if (_disabled != null)
  {
    comp.setValueExpression("disabled", _disabled);
  }
  if (_hreflang != null)
  {
    comp.setValueExpression("hreflang", _hreflang);
  }
  if (_converter != null)
  {
    if (!_converter.isLiteralText())
    {
      comp.setValueExpression("converter", _converter);
    }
    else
    {
      String s = _converter.getExpressionString();
      if (s != null)
      {
        Converter converter = getFacesContext().getApplication().
          createConverter(s);
        comp.setConverter(converter);
      }
    }
  }
  if (_onkeypress != null)
  {
    comp.setValueExpression("onkeypress", _onkeypress);
  }
}
View Full Code Here


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutputLink();
    }
View Full Code Here

        super.setUp();

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);
View Full Code Here

        super.setUp();

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);
View Full Code Here


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutputLink();
    }
View Full Code Here


    @Override
    protected UIComponent createComponentToTest()
    {
        return new HtmlOutputLink();
    }
View Full Code Here

        super.setUp();

        UIForm form = new UIForm();

        commandLink = new HtmlCommandLink();
        outputLink = new HtmlOutputLink();
        outputLink.setValue("http://someurl");
        outcomeTargetLink = new HtmlOutcomeTargetLink();

        form.getChildren().add(commandLink);
View Full Code Here

                            HtmlOutputText.COMPONENT_TYPE);
            DigitalObjectRefBean dobr = dh.get(fileRef);
            outputText.setValue(" "+dobr.getName());
            outputText.setId("fileName" + key);
            //file name
            HtmlOutputLink link_src = (HtmlOutputLink) facesContext
                    .getApplication().createComponent(
                            HtmlOutputLink.COMPONENT_TYPE);
            link_src.setId("fileRef" + key);
            URI URIFileRef = dobr.getDownloadUri();
            link_src.setValue(URIFileRef);
            link_src.setTarget("_new");

            //CommandLink+Icon allowing to delete this entry
            HtmlCommandLink link_remove = (HtmlCommandLink) facesContext
                    .getApplication().createComponent(
                            HtmlCommandLink.COMPONENT_TYPE);
            //set the ActionMethod to the method: "commandRemoveAddedFileRef(ActionEvent e)"
            Class<?>[] parms = new Class<?>[] { ActionEvent.class };
            ExpressionFactory ef = FacesContext.getCurrentInstance().getApplication().getExpressionFactory();
            MethodExpression mb = ef.createMethodExpression(FacesContext.getCurrentInstance().getELContext(),
                    "#{NewExp_Controller.commandRemoveAddedFileRef}", null, parms);
            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);
            panel.getChildren().add(link_src);
           
        } catch (Exception e) {
            log.error("error building components for file removal "+e.toString());
        }
View Full Code Here

TOP

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

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.