Dynamic input fields generation using the @Loop component
---------------------------------------------------------

                 Key: TAP5-420
                 URL: https://issues.apache.org/jira/browse/TAP5-420
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.0.17
            Reporter: Toby


Currently the @Loop component for dynamic input field generation only works if 
the data is saved back into the source data list.

But if the source contains a list of "configurations" read from a database, the 
generated input fields are unrelated to the "source" objects.

So there is missing a solution to read the values back in other scenarios.

Example:

<t:loop source="configObjects" value="configObjects" encoder="encoder">
..
</t:loop>


public GenericSelectModel<Value> getValueSelectModel() {
                Category category = configObject.getCategory(); // for every 
Select model in the loop, different values are shown, depending on the context
                List<Value> list = getValues(category);
                GenericSelectModel<Value> model = new 
GenericSelectModel<Value>(list, Value.class, "name", "id", _access);
                return model;
}

However encoder only refers to the mapping between the source/value and the 
values shown in the select model are only derived from the "value" but
can not be stored back there.....

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to