Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-228

No Update value when "value" option has changed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.1.1
    • None
    • Date
    • None
    • JBoss 4.0.3SP1
      my-faces 1.1.1
      facelets 1.1.12

    Description

      The component InputDate don't change the render value when in backinbean value is changed. To make this i have to use a binding and change the userData property.

      A solution by this issue is:

      In class "HtmlDateRenderer" in method "encodeEnd" put the next code:

      public void encodeEnd(FacesContext facesContext, UIComponent uiComponent) throws IOException {
      RendererUtils.checkParamValidity(facesContext, uiComponent, HtmlInputDate.class);

      HtmlInputDate inputDate = (HtmlInputDate) uiComponent;
      Locale currentLocale = facesContext.getViewRoot().getLocale();

      -----> BEGIN NEW CODE
      Date dateValue = org.apache.myfaces.renderkit.RendererUtils.getDateValue(inputDate);
      UserData userData = null;
      if (dateValue != null)

      { userData = newUserData( dateValue, currentLocale, null); }


      if (userData == null)

      { userData = (UserData) inputDate.getSubmittedValue(); }

      -----> END NEW CODE

      if( userData == null )
      .........

      Attachments

        Activity

          People

            Unassigned Unassigned
            junglika Jorge Rodríguez Pedrianes
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: