jsf 2 - Omnifaces Components#includeCompositeComponent set attribute value -
When dynamically creating a composite component with Omniface, the value of properties (such as attribute However, I can reach Edit: Also in the attribute check: ... Returns: Built-in composite component, if necessary It can be used to set custom attributes or value expressions on it. Therefore, just return the myValue ) so that it is available for pre-render events on composite?
& lt; Composite: interface & gt; & Lt; Composite: attribute name = "myValue" required = "true" /> & Lt; / Mixed: Interface & gt; & Lt; Overall: Implementation & gt; & Lt ;! - Does it work! - & gt; & Lt; H: output text value = "# {cc.attrs.myValue}" /> & Lt ;! - It does not execute - & gt; & Lt; F: event id = "eventId" type = "javax.faces.event.PreRenderComponentEvent" listener = "# {b. Asmat.myValue}}" /> & Lt ;! - luggage - & gt; & Lt; / Mixed: Implementation & gt;
myValue on XHTML (via
# cc.attrs.myValue} ) But this is not available for pre-render (I used to specify the value of
myValue .)
(by managed-asset) will also do this.
public static UIComponent includeCompositeComponent (UIComponent Parent, string string name, string resource name, string id)
UIComponent example and use the static value or to set the EL expression.
UIComponent composite = Components.includeCompositeComponent (parent, library, name, id); Composite.getAttributes (). Put ("myValue", myStaticValue); // or: composite.setvalue expression ("myValue", Components.createValueExpression ("# {bean.myValue}", String.class)); // ...
Comments
Post a Comment