Hy there...

its my first post on this list and I haven't found anything regarding my
actual Tapestry 4.1.2 Problem.

See the example below.

HTML-Template:
<html jwcid="@Shell" title="Test" debugEnabled="false">
<head>
</head>
<body jwcid="@Body">
<form jwcid="@Form" id="testForm">
<a href="" jwcid="change">change</a>
<select jwcid="selection"></select>
</form>
</body>
</html>


Page:
<page-specification>

        <property name="testArray" initial-value='new java.lang.String[]
{"A","B","C"}'/>

        <component id="change" type="DirectLink">
                <binding name="listener" value="listener:onChange"/>
                <binding name="async" value="true"/>
                <binding name="updateComponents"
value="ognl:{'selection'}"/>
        </component>

        <component id="selection" type="PropertySelection">
                <binding name="model" value="model"/>
                <binding name="value" value="name"/>
        </component>

</page-specification>


Java:
public abstract class Test extends BasePage {

        public abstract String[] getTestArray();
        public abstract void setTestArray(String[] testArray);

        public IPropertySelectionModel getModel() {
                return new StringPropertySelectionModel(getTestArray());
        }

        public void onChange() {
                setTestArray(new String[]{"1","2","3","4"});
        }
}

The test consists of a DirectLink Component and a PropertySelection.
The PropertySelection is initialized with a StringPropertySelectionModel
and should change its options when the DirectLink is clicked.

The first call of the Page shows that the PropertySelection is working:
...
<select name="selection" id="selection">
<option value="0">A</option>
<option value="1">B</option>
<option value="2">C</option>
</select>
...

But after the DirectLink is triggered, something went wrong:
...
<select name="selection" id="selection">1234</select>
...

No OPTION Tags were rendered.

--
This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify our systems manager at 
[EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to