is equals() implemented accordingly for your domain object? On Fri, Aug 29, 2008 at 7:09 AM, Mohammad Irfan <[EMAIL PROTECTED]> wrote: > Hi, getting the selected object from the list is not a problem. The > problem is if I want to edit an object where it has a property > selection on it's form, I want to set it according to the object's > value. > > The code: > <select jwcid="@PropertySelection" value="ognl:myValue" model="ognl:myValues" > /> > > I have a setter and geter for both model and value object: > > public abstract Value getMyValue(); > public abstract void setMyValue(Value val); > > public abstract IPropertySelectionModel getMyValues(){ > ... > } > > and on the page begin render, I have set the default value if I'm > editting the object: > > public void pageBeginRender(PageEvent event) { > ..... > setMyValue( getObject().getValue() ); > } > > But, nothing is happened. The list is always selecting the first > value, not the object's value that I want. > > Thanks. > > On Wed, Aug 27, 2008 at 10:06 PM, Norman Franke <[EMAIL PROTECTED]> wrote: >> This is handled automatically based on the "value" parameter for the >> tapestry object. >> >> <select jwcid="@PropertySelection" value="ognl:myValue" >> model="ognl:myValues" /> >> >> You can use an existing model, or implement IPropertySelectionModel which >> Tapestry uses to translate values and the like. >> >> Norman Franke >> Answering Service for Directors, Inc. >> www.myasd.com >> >> On Aug 27, 2008, at 5:54 AM, Mohammad Irfan wrote: >> >>> Hi, >>> >>> I have success in using Property selection component but I found a >>> problem. I'd like to ask, how can I set a selected value for the >>> Selection list? >>> So I can have this html output: >>> >>> <select name="reportTypeSelection" id="reportTypeSelection"> >>> <option value="0">CSV</option> >>> <option value="1">DBF</option> >>> <option value="2" selected>DELIM</option> >>> <option value="3">TXT</option> >>> <option value="4">XLS</option> >>> >>> </select> >>> >>> Thanks. >>> -- >>> Mohammad Irfan >>> >>> --- >>> www.doktermaya.com >>> www.L-Ads.com (classifieds ads, iklan baris) >>> www.komplain.org (complain about product) >>> www.akarprima.com >>> >>> --------------------------------------------------------------------- >>> 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] >> >> > > > > -- > Wassalamu'alaikum wr. wb. > Mohammad Irfan > > --- > www.doktermaya.com > www.L-Ads.com (classifieds ads, iklan baris) > www.komplain.org (complain about product) > www.akarprima.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
-- Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]