Hi.
Does the form-widget support a "select all" for multi-form with row- submit which some of the older FTL forms support? Also, is there a way to set the default to "checked" for all the rows? Si |
judging by HtmlFormRender.java and ModelFormField.java
setting field element's attribute - entry-name="Y" should make it checked. As far as the select all option, perhaps there's potential with the the hide-header attribute and a small template before it. otherwise you would need to extend ModelForm.renderHeaderRow to add the checkbox in the header row with the javascript onChange and then get that script into the page --- Si Chen <[hidden email]> wrote: > Hi. > > Does the form-widget support a "select all" for > multi-form with row- > submit which some of the older FTL forms support? > > Also, is there a way to set the default to > "checked" for all the rows? > > Si > > > |
In reply to this post by Si Chen-2
On Aug 24, 2006, at 6:00 PM, Si Chen wrote: > Hi. > > Does the form-widget support a "select all" for multi-form with row- > submit which some of the older FTL forms support? Interesting. It sounds like something may be broken. The form widget should really do this automatically. > Also, is there a way to set the default to "checked" for all the rows? Chris mentioned in his reply setting a value in the form def. I'm not sure about the attribute he mentioned, but setting a default value should have this effect. -David |
David, Chris -
There is no reference to a select all javascript i the HtmlFormRender. Also, I tried Chris's suggestion of doing entry- name="Y" and it did not work. I might implement a default value for checkbox myself -- if nobody knows how it's supposed to work, and nobody objects to my changing it. Si On Aug 25, 2006, at 11:39 AM, David E Jones wrote: > > On Aug 24, 2006, at 6:00 PM, Si Chen wrote: > >> Hi. >> >> Does the form-widget support a "select all" for multi-form with >> row-submit which some of the older FTL forms support? > > Interesting. It sounds like something may be broken. The form > widget should really do this automatically. > >> Also, is there a way to set the default to "checked" for all the >> rows? > > Chris mentioned in his reply setting a value in the form def. I'm > not sure about the attribute he mentioned, but setting a default > value should have this effect. > > -David |
Si, I think you're right that this is broken. I just looked around for anything in the form widget code referring to the "toggleAll" method and it's not there... So, yeah, in the HtmlFormRenderer we should add the normal checkbox to the header as is used elsewhere, like this: <input type="checkbox" name="selectAll" value="Y" onclick="javascript:toggleAll(this, 'selectAllForm');"/> The "selectAllForm" string should be replaced dynamically with the form name, and then that should do it... The rowSubmit fields should already be going in with the use-row-submit attribute set to true. -David On Sep 7, 2006, at 4:59 PM, Si Chen wrote: > David, Chris - > > There is no reference to a select all javascript i the > HtmlFormRender. Also, I tried Chris's suggestion of doing entry- > name="Y" and it did not work. I might implement a default value > for checkbox myself -- if nobody knows how it's supposed to work, > and nobody objects to my changing it. > > Si > > > On Aug 25, 2006, at 11:39 AM, David E Jones wrote: > >> >> On Aug 24, 2006, at 6:00 PM, Si Chen wrote: >> >>> Hi. >>> >>> Does the form-widget support a "select all" for multi-form with >>> row-submit which some of the older FTL forms support? >> >> Interesting. It sounds like something may be broken. The form >> widget should really do this automatically. >> >>> Also, is there a way to set the default to "checked" for all the >>> rows? >> >> Chris mentioned in his reply setting a value in the form def. I'm >> not sure about the attribute he mentioned, but setting a default >> value should have this effect. >> >> -David > |
Free forum by Nabble | Edit this page |