So, I created the 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 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 fileattachmentsview.xhtml I use the component:
<owncomponents:fileadder type="MEMO" />
But this does not indicate the value of typeString in the bean base as "MEMO". It remains equal to zero. I tested it with a button that displays a value.
How to backup bean get value for typeStringI installed the type-attribute composite component as "memo"? Why is this nulland not "MEMO"?
source
share