skip validation but apply values to model?
deanhiller Nov 3, 2008 12:44 PMI am using a:commandButton and a table of fields. Each time you hit the button, it adds a new row with new fields to fill in. When I write text into the fields and then click the button, all my text dissappears. The button I am using is this...
<a:commandButton id="addField" value="Add an Input Field"
action="#{editScript.addVariable()}" reRender="variables"
ajaxSingle="true" bypassUpdates="false" />
None of my values in the table are applied. I see them being fetched though, and I see the server going through all the phases including update model values!!!...
Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker beforePhase INFO: BEFORE RESTORE_VIEW 1 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker afterPhase INFO: AFTER RESTORE_VIEW 1 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker beforePhase INFO: BEFORE APPLY_REQUEST_VALUES 2 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker afterPhase INFO: AFTER APPLY_REQUEST_VALUES 2 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker beforePhase INFO: BEFORE PROCESS_VALIDATIONS 3 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker afterPhase INFO: AFTER PROCESS_VALIDATIONS 3 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker beforePhase INFO: BEFORE UPDATE_MODEL_VALUES 4 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker afterPhase INFO: AFTER UPDATE_MODEL_VALUES 4 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker beforePhase INFO: BEFORE INVOKE_APPLICATION 5 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker afterPhase INFO: AFTER INVOKE_APPLICATION 5 Nov 3, 2008 10:38:22 AM org.exadel.jsf.PhaseTracker beforePhase INFO: BEFORE RENDER_RESPONSE 6 Nov 3, 2008 10:38:55 AM org.exadel.jsf.PhaseTracker afterPhase INFO: AFTER RENDER_RESPONSE 6
Here is my table....
<s:div id="variables">
<s:div rendered="#{node.variables.size==0}">
Currently, this question has no input fields.<br/>
Please click Add an Input Field to add one.
</s:div>
<h:dataTable id="variablesTable" border="1" value="#{node.variables}"
var="field" rendered="#{node.variables.size>0}">
<h:column>
<f:facet name="header">Label</f:facet>
<!-- we should dcorate this to add error messages??? -->
<h:inputText id="label" value="#{field.label}" required="true">
</h:inputText>
</h:column>
<h:column>
<f:facet name="header">Stored as</f:facet>
<!-- we should dcorate this to add error messages??? -->
<h:inputText id="name" value="#{field.name}" required="true">
</h:inputText>
</h:column>
<h:column>
<f:facet name="header">Actions</f:facet>
<a:commandButton id="removeField" value="Remove"
action="#{editScript.removeVariable(field)}" reRender="variables"
ajaxSingle="true" bypassUpdates="true" />
</h:column>
</h:dataTable>
</s:div>
The getLabel and getName are called exactly for how many rows I have in the table but setLabel and setName are not called at all...why is this?
thanks,
Dean