You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Andreas Knuth (JIRA)" <de...@myfaces.apache.org> on 2006/01/24 11:18:53 UTC

[jira] Created: (MYFACES-1056) getValue() vs. getLocalValue() in RendererUtils.getStringValue()

getValue() vs. getLocalValue() in RendererUtils.getStringValue()
----------------------------------------------------------------

         Key: MYFACES-1056
         URL: http://issues.apache.org/jira/browse/MYFACES-1056
     Project: MyFaces
        Type: Bug
  Components: General  
    Versions: 1.1.1    
 Environment: all
    Reporter: Andreas Knuth


For the case that any component on the page got a validation error and the value of this component has been changed to empty, these changes will not be visible after rendering !!

HtmlTextRendererBase uses the RendererUtils.getStringValue(...) Method and that class uses the getValue() Method for retrieving the value. To my mind it should use  the getLocalValue() Method, because the user wants the changed value being rendered.

->
"getValue()" get the value from the ValueBinding of this component.
"getLocalValue()" get the value from the Attribut _value of this component



-- 
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


[jira] Commented: (MYFACES-1056) getValue() vs. getLocalValue() in RendererUtils.getStringValue()

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1056?page=comments#action_12363806 ] 

Martin Marinschek commented on MYFACES-1056:
--------------------------------------------

There is no getLocalValue.

If a local value is set, the valuebinding will not be called and getValue will return the local value.

regards,

martin

> getValue() vs. getLocalValue() in RendererUtils.getStringValue()
> ----------------------------------------------------------------
>
>          Key: MYFACES-1056
>          URL: http://issues.apache.org/jira/browse/MYFACES-1056
>      Project: MyFaces
>         Type: Bug
>   Components: General
>     Versions: 1.1.1
>  Environment: all
>     Reporter: Andreas Knuth

>
> For the case that any component on the page got a validation error and the value of this component has been changed to empty, these changes will not be visible after rendering !!
> HtmlTextRendererBase uses the RendererUtils.getStringValue(...) Method and that class uses the getValue() Method for retrieving the value. To my mind it should use  the getLocalValue() Method, because the user wants the changed value being rendered.
> ->
> "getValue()" get the value from the ValueBinding of this component.
> "getLocalValue()" get the value from the Attribut _value of this component

-- 
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


[jira] Closed: (MYFACES-1056) getValue() vs. getLocalValue() in RendererUtils.getStringValue()

Posted by "Andreas Knuth (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-1056?page=all ]
     
Andreas Knuth closed MYFACES-1056:
----------------------------------

    Resolution: Fixed

see MYFACES-1160

> getValue() vs. getLocalValue() in RendererUtils.getStringValue()
> ----------------------------------------------------------------
>
>          Key: MYFACES-1056
>          URL: http://issues.apache.org/jira/browse/MYFACES-1056
>      Project: MyFaces Core
>         Type: Bug
>   Components: General
>     Versions: 1.1.1
>  Environment: all
>     Reporter: Andreas Knuth

>
> For the case that any component on the page got a validation error and the value of this component has been changed to empty, these changes will not be visible after rendering !!
> HtmlTextRendererBase uses the RendererUtils.getStringValue(...) Method and that class uses the getValue() Method for retrieving the value. To my mind it should use  the getLocalValue() Method, because the user wants the changed value being rendered.
> ->
> "getValue()" get the value from the ValueBinding of this component.
> "getLocalValue()" get the value from the Attribut _value of this component

-- 
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


[jira] Commented: (MYFACES-1056) getValue() vs. getLocalValue() in RendererUtils.getStringValue()

Posted by "Andreas Knuth (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1056?page=comments#action_12363821 ] 

Andreas Knuth commented on MYFACES-1056:
----------------------------------------

In validate() of UIInput the setValue() Method and therefore "setLocalValueSet(true); super.setValue(value);" of UIOutput are called.

The valuebinding to this component is created in the Tag Handler (UIComponentTagBase).

You're are right, if there is a valuebinding - the getValue() Method should be normally called in RendererUtils.getStringValue(...) . 

But in the szenario above this lead to the unexpected result.

So, to my minds (a litle bit differentiated) the getLocalValue() must be called in RendererUtils.getStringValue(...) if there is a ValidationError.

regards,

Andreas



> getValue() vs. getLocalValue() in RendererUtils.getStringValue()
> ----------------------------------------------------------------
>
>          Key: MYFACES-1056
>          URL: http://issues.apache.org/jira/browse/MYFACES-1056
>      Project: MyFaces
>         Type: Bug
>   Components: General
>     Versions: 1.1.1
>  Environment: all
>     Reporter: Andreas Knuth

>
> For the case that any component on the page got a validation error and the value of this component has been changed to empty, these changes will not be visible after rendering !!
> HtmlTextRendererBase uses the RendererUtils.getStringValue(...) Method and that class uses the getValue() Method for retrieving the value. To my mind it should use  the getLocalValue() Method, because the user wants the changed value being rendered.
> ->
> "getValue()" get the value from the ValueBinding of this component.
> "getLocalValue()" get the value from the Attribut _value of this component

-- 
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


[jira] Commented: (MYFACES-1056) getValue() vs. getLocalValue() in RendererUtils.getStringValue()

Posted by "Andreas Knuth (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1056?page=comments#action_12363804 ] 

Andreas Knuth commented on MYFACES-1056:
----------------------------------------

To realise the situation the component must have a valid value before !

Here the scenario in short:

1. Component a gets value "a" and will be submitted
2. go back to this page
3. Component b will get an "unvalid value" and the value of component a will be set to "empty"
4. After rendering the input of component a will show the value "a" instead of "empty"

> getValue() vs. getLocalValue() in RendererUtils.getStringValue()
> ----------------------------------------------------------------
>
>          Key: MYFACES-1056
>          URL: http://issues.apache.org/jira/browse/MYFACES-1056
>      Project: MyFaces
>         Type: Bug
>   Components: General
>     Versions: 1.1.1
>  Environment: all
>     Reporter: Andreas Knuth

>
> For the case that any component on the page got a validation error and the value of this component has been changed to empty, these changes will not be visible after rendering !!
> HtmlTextRendererBase uses the RendererUtils.getStringValue(...) Method and that class uses the getValue() Method for retrieving the value. To my mind it should use  the getLocalValue() Method, because the user wants the changed value being rendered.
> ->
> "getValue()" get the value from the ValueBinding of this component.
> "getLocalValue()" get the value from the Attribut _value of this component

-- 
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