no way to do this? is it even possible to have a select field and a custom eventlink like component that fires an event with the selected value from select field?
----- Original Message ---- From: Dave Greggory <[email protected]> To: Tapestry users <[email protected]> Sent: Wednesday, March 11, 2009 4:55:32 PM Subject: Getting value of field in Add Row section in AddRow event for Ajax Form Loop I have this ajax form loop with a select field in the AddRow section. <t:form> <t:ajaxformloop t:id="urlLoop" t:source="selectedUrls" t:value="currentUrl" t:encoder="urlKeyEncoder"> ${currentUrl} <t:parameter name="addRow"> <t:select t:id="urlSelectField" t:blankLabel="--Select--" t:blankOption="ALWAYS" t:model="urlSelectModel" t:encoder="urlValueEncoder" t:value="selectedUrl"/> <t:addrowlink>Add URL</t:addrowlink> </t:parameter> </t:ajaxformloop> </t:form> and in the component class I have: @Property private String selectedUrl; @Property private String currentUrl; @Property private List<String> selectedUrls; @OnEvent (value = EventConstants.ADD_ROW, component = "urlLoop") public String addNewUrl() { selectedUrls.add(selectedUrl); return selectedUrl; } But unfortunately, selectedUrl is null when the event fires. I guess the value of the select field in the AddRow section is not passed in. Is this even possible to do with AjaxFormLoop or am I doing something wrong? --------------------------------------------------------------------- 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]
