javaserverfaces
  1. javaserverfaces
  2. JAVASERVERFACES-2216

using a workaround for datasets not beeing updated correctly with the <cc:insertChildren/> and wrapping with <h:panelGroup> and using workspace

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Incomplete
    • Affects Version/s: 2.0.0-b04
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      there is a problem with an object selector connected to a dataset consisting of composite components fields, when using insertChildren tag creating a new record, validation exception causes the fields to be cleared,
      but there is a work around for it wrap around a <h:panelGroup>, however this panelGroup creates another bug which makes another validation error not updating the fields accordingly to the object selector where you store all the data records in the data sets and updates the UIInput components iun this case TextInput.

      when reselecting object. when debugging all the input components look correct according to the data in the data set, but the fields in the browser are never updated. so how do I make the h:panelGroup refreshed, or is there a better way to fix the cc:insertChildren bug. With other words the cc:insertChildren removes an error that a valication exception causes all the fields to be cleared from input text, and not keeping the input values, but when using this workaround, the UIInputs are not responding anylonger to the changes in the selected record in the data set. even though I refresh the data set in the code, the browser is not updating. I read that the listener state was broken in the cc:insertChildren, and it might be correct because in the code we invokeListener to the selected object.

      <!-- <h:panelGroup> -->
      <cc:insertChildren/>
      <!-- </h:panelGroup> -->

      similar bug:
      http://java.net/jira/browse/JAVASERVERFACES-1991

      1. before_validation.png
        279 kB
      2. record_validation_error.png
        216 kB
      3. record21_data_input.png
        214 kB
      4. using_recordselector.png
        321 kB
      5. validation_error.png
        343 kB

        Activity

        Hide
        Mathias Werlitz added a comment -

        If I understand your problem correctly you are describing a normal behavior of JSF.

        1. You submit the form.
        2. You get an validation error.
        3. The data set displayed in the view gets updated on the server and is rerendered.
        4. You see the old invalid data.

        Thats a normal behavior of JSF. UIInput redisplays the "submitted value".
        One solution is to navigate to the same view or to clear the submitted value of the UIInput components.

        Show
        Mathias Werlitz added a comment - If I understand your problem correctly you are describing a normal behavior of JSF. 1. You submit the form. 2. You get an validation error. 3. The data set displayed in the view gets updated on the server and is rerendered. 4. You see the old invalid data. Thats a normal behavior of JSF. UIInput redisplays the "submitted value". One solution is to navigate to the same view or to clear the submitted value of the UIInput components.
        Hide
        conpem added a comment -

        Hi Mathias!

        Actually the record selector is not updating the textfields only the record name, not the dataset with its data and wich puts the values in the UInputComponent (UIInput). Iam adding pictures for you to see the difference
        using:
        <!-- <ui:fragment> --> or <h:panelGroup>
        <cc:insertChildren/>
        <!-- </ui:fragment> -->

        Show
        conpem added a comment - Hi Mathias! Actually the record selector is not updating the textfields only the record name, not the dataset with its data and wich puts the values in the UInputComponent (UIInput). Iam adding pictures for you to see the difference using: <!-- <ui:fragment> --> or <h:panelGroup> <cc:insertChildren/> <!-- </ui:fragment> -->
        Hide
        conpem added a comment -

        as you see the text input fields are not updated accordingly to the record selector choosing new records.

        Show
        conpem added a comment - as you see the text input fields are not updated accordingly to the record selector choosing new records.
        Hide
        conpem added a comment -

        the fields are never rerendered in the jsf components. something is broken in the state or not updating the fields from the dataset in the connected fields

        Show
        conpem added a comment - the fields are never rerendered in the jsf components. something is broken in the state or not updating the fields from the dataset in the connected fields
        Hide
        Manfred Riem added a comment -

        Can you please attach a simple example application (with sources) that demonstrates the problem?

        Show
        Manfred Riem added a comment - Can you please attach a simple example application (with sources) that demonstrates the problem?
        Hide
        Manfred Riem added a comment -

        Lowering priority because of no response

        Show
        Manfred Riem added a comment - Lowering priority because of no response
        Hide
        Manfred Riem added a comment -

        Lowering priotiy because of no response

        Show
        Manfred Riem added a comment - Lowering priotiy because of no response
        Hide
        Manfred Riem added a comment -

        Closing because of inactivity

        Show
        Manfred Riem added a comment - Closing because of inactivity

          People

          • Assignee:
            Unassigned
            Reporter:
            conpem
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: