Reputation: 617
I developed a form which includes table and commandButton. Some input items are required. I want them to validate while just button pressed. And everything was ok, this scenario was working well. But when table presents only one row, selecting row does not work. See alsa plz: https://forums.oracle.com/forums/thread.jspa?threadID=960512&start=0&tstart=0 --> might be 9th post
I applied to my jsff the solution which is told in above link. It works previous issue but this time, javascript caused another problem that is inconsistent validation. As i understood java script overrides af table immediate="true" property. plz see : http://www4.picturepush.com/photo/a/11897217/640/11897217.png How can i resolve that? Any suggestion? Plz help me Thanks in advance
<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
xmlns:trh="http://myfaces.apache.org/trinidad/html"
xmlns:f="http://java.sun.com/jsf/core">
<trh:script>
function tableLoad(event)
{
AdfCustomEvent.queue(event.getSource(), "refreshTables",
{
},
true);
event.cancel();
}
</trh:script>
......
<af:table var="row" rowBandingInterval="1" id="entityT"
value="#{pageFlowScope.incomingPaperworkBean.baseRowCollection}"
partialTriggers="::cb_incPaperDef_commit ::cb_incPaperDef_filter"
rowSelection="single" columnBandingInterval="0"
disableColumnReordering="true" columnStretching="column:c3"
styleClass="AFStretchWidth" autoHeightRows="20"
contentDelivery="immediate" immediate="true"
binding="#{pageFlowScope.incomingPaperworkBean.richTable}">
<af:clientListener method="tableLoad" type="click"/>
<af:serverListener type="refreshTables"
method="#{pageFlowScope.incomingPaperworkBean.refreshTables}"/>
<af:column id="c5" width="105">
<af:inputText id="registrationText"
value="#{row.baseEntity.registrationNumber.registrationNumber}"
required="true" readOnly="true" autoSubmit="true"
disabled="true"/>
<f:facet name="header">
<af:panelGroupLayout id="panelGroupLayout1" layout="vertical">
<af:inputText id="filterRegistrationNumber"
value="#{pageFlowScope.incomingPaperworkBean.filterTemplate.incomingPaperwork.registrationNumber.registrationNumber}"
simple="true" autoSubmit="true"/>
<af:spacer width="10" height="10" id="spacer1"/>
<af:outputText value="Kayit Numarasi" id="outputText6"/>
</af:panelGroupLayout>
</f:facet>
</af:column>
......
Upvotes: 0
Views: 2064
Reputation: 5803
Set the immediate parameter on the component clicking on which fires the validation.
Upvotes: 1