[
http://issues.apache.org/jira/browse/MYFACES-749?page=comments#action_12355972
]
markus willinger commented on MYFACES-749:
------------------------------------------
We have nearly the same problem (myfaces 1.0.9):
We have a <x:dataTable> with some <h:commandLink> tags. By clicking on this
<h:commandLink> tags, we take the datas (user datas) out of the DataModel
(processing in the backing bean) an put this datas into <h:inputText
required="true" id="Last_Name"
value="#{userHandlingBackingBean._userObj._lastName}"> (for example) located in
the same view and in the same form. Inside of this <h:inputText > tags we have
validators, which validate, that these fields are not empty.
Everything is fine. But when I left one textField empty, the validator brings
up the error message. That's ok. But from now on, all the INPUTTEXT fields
remain the OLD datas - although I click on the the next <h:commandLink> that
shall display the new users preferences. This not wanted effect occurs only on
<h:inputText > tags. The <h:outputText > tags are working like they want to do
-> they "refresh" their texts.
I've tried all that stuff posted on the familiar bug reports like deleting the
immediate="true" property of the <h:commandLink> tag or of the <h:inputText >
tag and so on. But nothing works!
What we want is: WHENEVER clicking on the <h:commandLink> the <h:inputText >
get the datas out of the <x:dataTable> (dataModel) - EVEN when a validator has
was previously activated.
Question: Is this a bug? I have debugged the system with eclipse and I found,
that the user object, that is mapped to these <h:inputText > tags has the right
datas but the <h:inputText > fields don't show these datas although they are
mapped with the users attributes.
I have found a pseudo solution: When clicking on <h:commandLink> the system has
to do a whole redirect to the same jsf-site. But there must be another
solution. In fact the immediate="true" in the <h:commandLink> tag should work,
because it forces ignoreing the validators, but it doesn't!
> inputText refresh problem
> -------------------------
>
> Key: MYFACES-749
> URL: http://issues.apache.org/jira/browse/MYFACES-749
> Project: MyFaces
> Type: Bug
> Components: General
> Versions: 1.1.0, 1.0.9m9
> Environment: Windows XP, Tomcat5.x
> Reporter: JagMohan
>
> I have a drop down LEVELS with an valueChangeListener and an inputText field
> that is supposed to change when the drop down is changed. The inputText field
> is bound to a simple String object.
> When the value of the drop down changes, request submits and upon processing
> the value of the backing bean changes. when comes to UI, its not showing the
> changed value in the <h:inputText> field, but its showing the updated value
> in <h:outputText> field.
> REFERENCES
> ---------------------
> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
> <h:selectOneMenu id="SELECTlevel"
> immediate="true"
> value="#{irisRequestQueueBean.currentRequest.level}"
> disabled="#{empty irisRequestQueueBean.levels}"
> valueChangeListener="#{irisRequestQueueBean.changedLevel}"
> onchange="this.form.submit( );">
> <f:selectItems value="#{irisRequestQueueBean.levels}" />
> <j4j:idProxy id="levelId" />
> </h:selectOneMenu>
> upon changing the level, backing bean value changes. but the below inputText
> not showing the updated value. but outputText is showing the correct value.
> <h:inputText id="checked" size="30"
> value="#{irisRequestQueueBean.currentRequest.title}">
> </h:inputText>
> <h:outputText value="(#{irisRequestQueueBean.currentRequest.title})"/>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira