Hello Frens,
I am trying to implement <a4j:commandLink>, but I am not able to get the action (eRecor) fired with a click on the command link
The code snippet is
<f:loadBundle basename="pck.messages" var="msgs"/>
<f:view>
<h:form>
<h:panelGrid columns="2" columnClasses="gridContent" >
<h:outputLabel value="Add" for="add"></h:outputLabel>
<h:inputText id="addrerendered" value="#{edit.add}" />
</h:panelGrid>
<rich:dataTable onRowMouseOver="this.style.backgroundColor='#F1F1F1'"
onRowMouseOut="this.style.backgroundColor='# {a4jSkin.tableBackgroundColor}'" cellpadding="0" cellspacing="0" id="row" var="row1" value="" >
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<h:outputText value="#{msgs['add']}" />
</rich:column><rich:column>
<h:outputText value="#{msgs['solve']}" />
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:subTable onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" var="record" value="#{query.adds}">
<rich:column style="white-space: nowrap;" >
<h:outputText value="#{record.add}"></h:outputText>
</rich:column>
<rich:column>
<a4j:commandLink id="link" reRender="addrerendered" value="#{msgs.solve}" action="#{edit.eRecor}" ajaxSingle="true">
</a4j:commandLink>
</rich:column>
</rich:subTable>
</rich:dataTable>
</h:form>
</f:view>
ANd my bean edit.java is
public class Edit {
private String add;
public Edit() {
}
public String eRecor() {
add="XXXX";
return add;
}
public String getAdd() {
return add;
}
public void setAdd(String add) {
this.add = add;
}
}
Please advise howto make this snippet working.
Thank you in advance