Thursday, 15 September 2011

java - how to trigger ajax update with radio button in Tapestry 4.0? -


I have two radio buttons (value A or B) and the bottom palette area. I see the palette of the show when value A is selected and it is hidden when B is selected, so Ajax updates. how to do this?

Markup:

  & lt; Span jwcid = "model @ radio group" selected = "ognl: modelOption" & gt; & Lt; TR & gt; & Lt; Td square = "data labels" width = "15%" & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Input type = "radio" jwcid = "@ radio" value = "ognl: @ com.example.MyPage @ ALL" /> All models (default) & lt; / Td> & Lt; / TR & gt; & Lt; TR & gt; & Lt; Td square = "data labels" width = "15%" & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Input type = "radio" jwcid = "@ radio" value = "ognl: @ com.example.MyPage @ SPECIFIC" /> Specific models & lt; / Td> & Lt; / TR & gt; & Lt; / Span & gt; & Lt; Span jwcid = "@ if" condition = "ognl: specific device model" & gt; & Lt; TR & gt; & Lt; Td square = "data labels" width = "15%" & gt; & Lt; Span key = "Supported Device Model Labels" & gt; Supported device models: & lt; / Span & gt;: & lt; / Td> & Lt; TD & gt; & Lt; Div class = "bundle_palette" & gt; & Lt; Span jwcid = "palette" /> & Lt; / Div & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Span & gt;   

Java:

  public static final integer ALL = new integer (1); Public stable final integer SPECIFIC = new integer (2); Public essence integer affable options (); Public abstract list & lt; DeviceModel & gt; GetSelectedDeviceModels (); Public Summary Zero Setchord Device Models (List & lt; DeviceModel & gt; Device Models); Public abstract zero set device models (list & lt; DeviceModel & gt; device models); Public abstract list & lt; DeviceModel & gt; GetDeviceModels (); @ Compantant (type = "contrib: palette", bindings = {"selected = selected divvy models", "model = device model"}) public abstract palette (); Public IPProT SelectionModel Received Device Modell () {New Option Value SelectModel (getDeviceModels ()). Sorted (); } Public Zero PagebirdRender (PageEvent Event) {SetDevice Models (getDeviceService (.). FindDeviceModels (empty)); } Get a Public Boolean asset device model () {// Here I need to set the calling value and return it to the right / wrong; } As a solution for this older version of TapeStory, I had to use tecos libraries.    



No comments:

Post a Comment