My issue is that I am trying to have a column in my datatable show an outputtext by default, and replace that with an inputtext when the commandbutton is pressed. Have not found a solution. First post by the way.
I have an a4j:commandButton that I am looking to reRender this part of my dataTable
<a4j:commandButton reRender="yieldTable" action="#{yieldSearch.activateVisible()}"
id="modify" styleClass="editLargeIcon" value="Modify">
</a4j:commandButton>
<rich:dataTable id="yieldTable" value="#{yieldSearch.yfitem.yielditem}" var="_yield">
<rich:column>
<f:facet name="header">%-YLD</f:facet>
<h:outputText value="#{_yield.yfYield}" rendered="#{not yieldSearch.visible}">
</h:outputText>
<h:inputText rendered="#{yieldSearch.visible}" />
</rich:column>
And I would like activate this method (just shows relevant code)
@Name("yieldSearch")
@Scope(ScopeType.CONVERSATION)
public class YieldSearch implements Serializable{
private Boolean visible;
public void activateVisible(){
this.setVisible(true);
System.out.print(true);
}
public void setVisible(Boolean visible) {
this.visible = visible;
}
public Boolean getVisible() {
return visible;
}
Any help much appreciated.