Thank you Arno Haase for your continuous help...

I will check encoder method in my code for correct implementation, however I
have used this in previous app without any issues... Also I just removed
that encoder and directly assigned the string values to the list and display
it in the tml page *it works*

*Test.tml*

<!DOCTYPE html>
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd";
      xmlns:p="tapestry:parameter">
<body>

<t:form>
<t:loop t:source="videoDatas" t:value="videoItem">
<table width="100%" cellpadding="2" cellspacing="0">
<tr>
<td width="100%">
<t:submit t:id="topLevel" t:value="${videoItem}" t:context="videoItem"
t:defer="false" /> 
</td>
</tr>
</table>
<br />
</t:loop>
</t:form>

</body>
</html>

*Test.java*

public class Test {

        @SuppressWarnings("unused")
        @Property
        private String videoItem;

        private List<String> videoItems;

        public List<String> getVideoDatas() {
                final String levelOneItems[] = new String[] {"Animation", 
"Education",
"Music", "Solutions", "Tech"};
                videoItems = new ArrayList<String>();
                for(String item : levelOneItems) {
                        videoItems.add(item);
                }
                return videoItems;
        }

        public void onSelectedFromTopLevel(final String item) {
                System.out.println("Selected item is --> " + item);
        } 

}

--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/How-to-send-the-selected-button-value-from-tml-page-to-corr-java-page-tp5709890p5710542.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

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

Reply via email to