Hi, I have a written a component and a mixin to form a 'checkbox group'. If you are interested, there is online demo at http://lombok.demon.co.uk/tapestry5Demo/test/components/checkboxgroupdemo
Source code download instruction is on http://lombok.demon.co.uk/tapestry5Demo/ Shing --- On Wed, 19/1/11, dwi ardi irawan <penyihirke...@gmail.com> wrote: > From: dwi ardi irawan <penyihirke...@gmail.com> > Subject: Q: Java Script Check All The CheckBox? > To: users@tapestry.apache.org > Date: Wednesday, 19 January, 2011, 2:15 > Okay, it might be old question, but > I've searched through mailing list > archive, but haven't found the solution yet. > > I have 2 checkbox. and I want to create a checkbox > master(when I click this > checkbox, all the checkbox will be checked). > I can't use the common js algorithm here, cos I can't get > the id of the > checkbox. > > CheckBoxPage.tml > > this is my simple code: > <script type="text/javascript" > language="JavaScript"> > function checkAllDetail(){ > > } > </script> > <form t:type="form" t:id="newspaperForm"> > <input t:type="checkbox" > t:value="subscribeYahoo"/>Yahoo > <input t:type="checkbox" > t:value="subscribeGoogle"/>Google > <input type="checkbox" > id="checkAllRemove" > onclick="checkAllDetail()"/>Check All > <input type="submit" > value="Submit"/><br/> > Result : <b>${value}</b> > </form> > > CheckBoxPage.java > > public class CheckBoxPage { > @Property > private boolean subscribeYahoo; > @Property > private boolean subscribeGoogle; > @Persist(PersistenceConstants.FLASH) > @Property > private String value; > > void onSuccessFromNewspaperForm(){ > value = ""; > if(subscribeYahoo){ > value += "Yahoo > "; > } > if(subscribeGoogle) { > value += "Google > "; > } > } > } > > can anyone help me? > > thnx you > > dwi ardi irawan > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org