I see two things off the top:
- DirectLink won't rewind the form. You should really be using LinkSubmit if you want to capture the selected value. - The updateComponents property of the DirectLink might work, but it's not guaranteed if you have multiple instances of this component or a name collision. The good way to pass a component to this list is with "components.selection.clientId" rather than hardcoding the name.

I don't think either of these problems should be causing the breakage you're seeing. One thing to try would be to wrap "selection" in a <span jwcid="[EMAIL PROTECTED]"><select jwcid="selection"/></span> and pass the span for update. No idea if it'll help, but just something to try.

-Steve

Schips Markus wrote:
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]


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

Reply via email to