So the @Parameter can only be used to passed user-defined data structure to the custom component...
Is there a way such that the page that displays the custom component can have access to the componet's properties (public getter functions) in order to retrieve the user-defined data structure? For example, in the page's onSuccess method, I want to retrieve a List<MyDataStructure> from my custom component, how can I do that? thx! Ronald Josh Canfield-2 wrote: > >> For @Parameter attributes of custom components, can it be user-defined >> data >> structure? Or it has to be simple java-defined ones? >> > > Yes. > > <t:mycustomcomponent data="${customDataStructure}"/> >> > > Yes, but you don't need the ${}, the default binding is property > > <t:mycustomcomponent data="customDataStructure"/> > > > Josh > > On Nov 12, 2007 3:01 PM, ronaldlee <[EMAIL PROTECTED]> wrote: > >> >> >> For @Parameter attributes of custom components, can it be user-defined >> data >> structure? Or it has to be simple java-defined ones? >> >> For example, can I have this in my custom component: >> >> @Parameter >> MyOwnDataStructure data >> >> And in my main page I will feed that param using the page's property >> function >> >> <t:mycustomcomponent data="${customDataStructure}"/> >> >> where "getCustomDataStructure" of that page will return an instance of >> MyOwnDataStructure? >> >> thx! >> Ronald >> >> >> Chris Lewis-5 wrote: >> > >> > Ronald, >> > >> > Tapestry receives input (and fires events) using its Form component, >> > which is used for creating html forms. Checkboxes are themselves >> > components and are tied to boolean properties of the containing page >> (or >> > component in your case). If you have declared the checkboxes as 'raw' >> > html tags, you must first change those to proper tapestry components >> > ( >> http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#orgapachetapestrycorelibcomponentscheckbox >> ). >> > When you declare checkbox components you specify the value to which it >> > is tied. So if you have the following in your template: >> > >> > <input t:type="checkbox" value="wantsMail"/> >> > >> > Then you must have a boolean property named 'wantsMail' in your >> > component/page class, with appropriate getters/setters (getWantsMail, >> > setWantsMail). >> > >> > chris >> > >> > ronaldlee wrote: >> >> Hi, >> >> >> >> I wrote a simple component which contain a check list (using >> checkboxes). >> >> I >> >> put it in a page where it has a function to listen to the submit >> event. >> >> Inside my onSuccess function, how can I access that component's check >> >> list >> >> that user has set? >> >> >> >> thx. >> >> Ronald >> >> >> > >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/T5%3A-How-to-access-user-defined-component%27s-properties-tf4794190.html#a13716244 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > > -- > -- > TheDailyTube.com. Sign up and get the best new videos on the internet > delivered fresh to your inbox. > > -- View this message in context: http://www.nabble.com/T5%3A-How-to-access-user-defined-component%27s-properties-tf4794190.html#a13717098 Sent from the Tapestry - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]