So I made a composite component FileAdder.xhtml
<composite:interface>
<composite:attribute name="type" value="#{editoriCompositeController.typeString}"/>
</composite:interface>
<composite:implementation>
<h:form>
<p:editor id="editor" widgetVar="editorWidget" value="some text" width="600" />
</h:form>
</composite:implementation>
And then I have the EditoriCompositeController ManagedBean:
@ViewScoped
@ManagedBean
public class EditoriCompositeController {
String typeString;
public void setTypeString(String typeStringParameter) {
this.typeString = typeStringParameter;
}
public String getTypeString() {
return typeString;
}
}
And then in my fileattachmentsview.xhtml I use the component:
<owncomponents:fileadder type="MEMO" />
But that is not setting the typeString value in the backing bean as "MEMO". It remains as null I tested it with a button that prints the value.
How can I make the backing bean get the value for typeString
I set to the composite component's type
-attribute as "MEMO"? Why it's null
and not "MEMO"?