English 中文(简体)
A. 建立共同财产基金习俗组成部分的快速途径
原标题:Quick way to create JSF custom component

I know of two ways of creating custom JSF components: 1. Native JSF way: creating JSF component class, tag, etc. 2. Facelets way: defining component in a xhtml file and then creating appropriate decrption in facelets taglib.

目前,我开展了一个项目,在该项目中,引入面纱令人遗憾地被排除在外。 另一方面,建立习俗成分,共同财产基金的标准方式似乎与痛苦一样。

是否可能有一个第三方图书馆,能够以类似于面纱的方式创建习俗成分,但并不一定需要使用非标准化物?

最佳回答

http://java.sun.com/products/jsp/syntax/2.0/syntaxref209.html#1003408“rel=“nofollow noreferer”>jsp:include:。

或者,你可以提供 。 这仍然需要对组成部分发展(以及这一选择的后果)有合理的详细了解,但可以大量减少档案/法典数量。

这种办法只是一个黑板,但可能是短期 st脚石。 你们想要分发的图书馆或需要长期维修的部件不这样做。

新构成部分:

public class QuickComponent extends HtmlOutputText {
  @Override public void encodeAll(FacesContext context) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.writeText("I m not really a HtmlOutputText", null);
    for (UIComponent kid : getChildren()) {
      if (kid instanceof UIParameter) {
        UIParameter param = (UIParameter) kid;
        writer.startElement("br", this);
        writer.endElement("br");
        writer.writeText(param.getName() + "=" + param.getValue(), null);
      }
    }
  }
}

律师:

/**Request-scope managed bean defined in faces-config.xml*/
public class QuickComponentProviderBean {
  private QuickComponent quick;

  public void setQuick(QuickComponent quick) {
    this.quick = quick;
  }

  public QuickComponent getQuick() {
    if (quick == null) {
      quick = new QuickComponent();
    }
    return quick;
  }
}

<>注:在您看来,不要再重复一对多个标的单质,或指同个标的。

添加新的内容,以便:

<h:outputText binding="#{quickComponentProviderBean.quick}">
  <f:param name="Hello" value="World" />
</h:outputText>

<>说明:可以界定的属性没有改变。 编号:

问题回答

暂无回答




相关问题
JSF a4j:support with h:selectManyCheckbox

I m having trouble with a JSF selectManyCheckbox and A4J support. The purpose is to run some action when a checkbox is selected. This works perfectly in Firefox. Yet, when testing in any IE (ie6 / ie7 ...

Mojarra for JSF Encoding

Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with

如何拦截要求终止?

在共同基金中,如果用户要求终止,就需要采取一些行动。 我需要某种拦截器,但我不知道如何这样做。 我需要帮助。 增 编

ICEFaces inputFile getting the file content without upload

Is there any way of just getting the content of the browsed file without any upload/file transfer operations? I currently use ICEFaces inputFile component but I do not need the default uploading ...

Weird behaviour of h:commandLink action (MethodExpression)

I have two JSPs where I am displaying some info from database in a h:dataTable. One of them is showing all the info, and one of them user specifically. I have showXML.jsp that shows the "XML" column ...

How to correctly use ResultSet with h:dataTable

The problem is, that after displaying the ResultSet with <h:dataTable>, the connection is left open. If I close it, it closes the ResultSet too. I m thinking about copying the ResultSet data ...

热门标签