I would like to have a checkbox in every row of my list. The user can select the rows he wants to
use and submit this rows. I used the following declaration of the form, but I only get a Checkbox in the header instead of every column: <form name="ListArchive" type="multi" use-row-submit="true" list-name="listIt"> <actions> <set field="entityName" value="Archive"/> <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> <field-map field-name="inputFields" env-name="requestParameters"/> <field-map field-name="entityName" env-name="entityName"/> </service> </actions> <field name="checked" title="Checked"><check/></field> ...more fields... <field name="submitButton" title="Process" widget-style="smallSubmit"><submit/></field> </form> Regards, Michael |
Immi,
try to rename the field named "checked" into "_rowSubmit": <field name="_rowSubmit" title="Checked"><check/></field> Jacopo Immi wrote: > I would like to have a checkbox in every row of my list. The user can select > the rows he wants to > use and submit this rows. > > I used the following declaration of the form, but I only get a Checkbox in > the header instead of every column: > > <form name="ListArchive" type="multi" use-row-submit="true" > list-name="listIt"> > <actions> > <set field="entityName" value="Archive"/> > <service service-name="performFind" result-map-name="result" > result-map-list-name="listIt"> > <field-map field-name="inputFields" > env-name="requestParameters"/> > <field-map field-name="entityName" env-name="entityName"/> > </service> > </actions> > > <field name="checked" title="Checked"><check/></field> > ...more fields... > <field name="submitButton" title="Process" > widget-style="smallSubmit"><submit/></field> > </form> > > Regards, > Michael |
Jacopo,
Hmm, I think I tried this before... Well, whatever, I changed the field and I get the following output: Michael
|
Which revision are you running on?
There was a problem (I think 2-4 weeks ago) about this that has been fixed. For an example of a working form definition, have a look at the form "ApproveRequirements" in: applications/order/webapp/ordermgr/requirement/RequirementFroms.xml Jacopo Immi wrote: > Jacopo, > > Hmm, I think I tried this before... > Well, whatever, I changed the field and I get the following output: > > http://www.nabble.com/file/7853/checked.jpg > > Michael > > Jacopo Cappellato wrote: >> Immi, >> >> try to rename the field named "checked" into "_rowSubmit": >> >> <field name="_rowSubmit" title="Checked"><check/></field> >> >> Jacopo >> >> Immi wrote: >>> I would like to have a checkbox in every row of my list. The user can >>> select >>> the rows he wants to >>> use and submit this rows. >>> >>> I used the following declaration of the form, but I only get a Checkbox >>> in >>> the header instead of every column: >>> >>> <form name="ListArchive" type="multi" use-row-submit="true" >>> list-name="listIt"> >>> <actions> >>> <set field="entityName" value="Archive"/> >>> <service service-name="performFind" result-map-name="result" >>> result-map-list-name="listIt"> >>> <field-map field-name="inputFields" >>> env-name="requestParameters"/> >>> <field-map field-name="entityName" >>> env-name="entityName"/> >>> </service> >>> </actions> >>> >>> <field name="checked" title="Checked"><check/></field> >>> ...more fields... >>> <field name="submitButton" title="Process" >>> widget-style="smallSubmit"><submit/></field> >>> </form> >>> >>> Regards, >>> Michael >> >> >> > |
Ok that seems to be the problem.
My ofbiz is dated on mid of February. But I can't go on the newest revision. I'm only using a minimal OfBiz (cutted down OfBiz to 20 database tables). Unfortunately I had to adapt a lot of framework stuff and now I can't update my OfBiz with the current revision (Well, I tried but the application was no longer running). So now, we have to include necessary changes/bugfixes by hand. Can you tell me something about the fix. In wich class do I have to search. What was the problem?? Thanks for the example. That's exactly what I need!! Michael
|
https://issues.apache.org/jira/browse/OFBIZ-812
Jacopo Immi wrote: > Ok that seems to be the problem. > > My ofbiz is dated on mid of February. But I can't go on the newest revision. > I'm only using a minimal OfBiz (cutted down OfBiz to 20 database tables). > Unfortunately I had to adapt a lot of framework stuff and now I can't update > my OfBiz with the > current revision (Well, I tried but the application was no longer running). > So now, we have to include necessary changes/bugfixes by hand. > > Can you tell me something about the fix. In wich class do I have to search. > What > was the problem?? > > Thanks for the example. That's exactly what I need!! > > Michael > > Jacopo Cappellato wrote: >> Which revision are you running on? >> There was a problem (I think 2-4 weeks ago) about this that has been >> fixed. >> For an example of a working form definition, have a look at the form >> "ApproveRequirements" in: >> >> applications/order/webapp/ordermgr/requirement/RequirementFroms.xml >> >> Jacopo >> >> >> Immi wrote: >>> Jacopo, >>> >>> Hmm, I think I tried this before... >>> Well, whatever, I changed the field and I get the following output: >>> >>> http://www.nabble.com/file/7853/checked.jpg >>> >>> Michael >>> >>> Jacopo Cappellato wrote: >>>> Immi, >>>> >>>> try to rename the field named "checked" into "_rowSubmit": >>>> >>>> <field name="_rowSubmit" title="Checked"><check/></field> >>>> >>>> Jacopo >>>> >>>> Immi wrote: >>>>> I would like to have a checkbox in every row of my list. The user can >>>>> select >>>>> the rows he wants to >>>>> use and submit this rows. >>>>> >>>>> I used the following declaration of the form, but I only get a Checkbox >>>>> in >>>>> the header instead of every column: >>>>> >>>>> <form name="ListArchive" type="multi" use-row-submit="true" >>>>> list-name="listIt"> >>>>> <actions> >>>>> <set field="entityName" value="Archive"/> >>>>> <service service-name="performFind" >>>>> result-map-name="result" >>>>> result-map-list-name="listIt"> >>>>> <field-map field-name="inputFields" >>>>> env-name="requestParameters"/> >>>>> <field-map field-name="entityName" >>>>> env-name="entityName"/> >>>>> </service> >>>>> </actions> >>>>> >>>>> <field name="checked" title="Checked"><check/></field> >>>>> ...more fields... >>>>> <field name="submitButton" title="Process" >>>>> widget-style="smallSubmit"><submit/></field> >>>>> </form> >>>>> >>>>> Regards, >>>>> Michael >>>> >>>> >> >> >> > |
In reply to this post by Jacopo Cappellato
Jacopo,
A related question... I want to add an additional checkbox field to each row. Specifically, in the Approve Requirements screen I want to add a "Reject" checkbox to each row so that if the user selects this row and checks the "Reject" box as well, the requirement state is changed to rejected, instead of the default, approved. Modifying the service to implement this is trivial, but I'm having trouble constructing the UI to capture the extra param and pass it to the service. Based on my experimentation, it looks like I need to add an extra field to the "listIt" so that the form submits this extra field. If that is correct, how do I go about doing this? FWIW, this feature significantly improves the approval process for me because I often have a large percentage of requirements that don't get approved - navigating to the requirement and changing the status to rejected is too slow (relatively speaking). Cheers, Iain Jacopo Cappellato wrote: > Immi, > > try to rename the field named "checked" into "_rowSubmit": > > <field name="_rowSubmit" title="Checked"><check/></field> > > Jacopo > > Immi wrote: >> I would like to have a checkbox in every row of my list. The user can >> select >> the rows he wants to use and submit this rows. >> >> I used the following declaration of the form, but I only get a >> Checkbox in >> the header instead of every column: >> >> <form name="ListArchive" type="multi" use-row-submit="true" >> list-name="listIt"> >> <actions> >> <set field="entityName" value="Archive"/> >> <service service-name="performFind" result-map-name="result" >> result-map-list-name="listIt"> >> <field-map field-name="inputFields" >> env-name="requestParameters"/> >> <field-map field-name="entityName" >> env-name="entityName"/> >> </service> >> </actions> >> <field name="checked" title="Checked"><check/></field> >> ...more fields... >> <field name="submitButton" title="Process" >> widget-style="smallSubmit"><submit/></field> >> </form> >> >> Regards, >> Michael > > > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 269.4.0/759 - Release Date: 12/04/2007 7:58 PM |
I think you would be better off keeping just one check box but find a way of
submitting to different targets depending on the desired action, e.g. "reject selected" button and "approve selected" button Regards Scott On 13/04/07, Iain Fogg <[hidden email]> wrote: > > Jacopo, > > A related question... > > I want to add an additional checkbox field to each row. Specifically, in > the Approve Requirements screen I want to add a "Reject" checkbox to > each row so that if the user selects this row and checks the "Reject" > box as well, the requirement state is changed to rejected, instead of > the default, approved. Modifying the service to implement this is > trivial, but I'm having trouble constructing the UI to capture the extra > param and pass it to the service. > > Based on my experimentation, it looks like I need to add an extra field > to the "listIt" so that the form submits this extra field. If that is > correct, how do I go about doing this? > > FWIW, this feature significantly improves the approval process for me > because I often have a large percentage of requirements that don't get > approved - navigating to the requirement and changing the status to > rejected is too slow (relatively speaking). > > Cheers, Iain > > Jacopo Cappellato wrote: > > Immi, > > > > try to rename the field named "checked" into "_rowSubmit": > > > > <field name="_rowSubmit" title="Checked"><check/></field> > > > > Jacopo > > > > Immi wrote: > >> I would like to have a checkbox in every row of my list. The user can > >> select > >> the rows he wants to use and submit this rows. > >> > >> I used the following declaration of the form, but I only get a > >> Checkbox in > >> the header instead of every column: > >> > >> <form name="ListArchive" type="multi" use-row-submit="true" > >> list-name="listIt"> > >> <actions> > >> <set field="entityName" value="Archive"/> > >> <service service-name="performFind" > result-map-name="result" > >> result-map-list-name="listIt"> > >> <field-map field-name="inputFields" > >> env-name="requestParameters"/> > >> <field-map field-name="entityName" > >> env-name="entityName"/> > >> </service> > >> </actions> > >> <field name="checked" title="Checked"><check/></field> > >> ...more fields... > >> <field name="submitButton" title="Process" > >> widget-style="smallSubmit"><submit/></field> > >> </form> > >> > >> Regards, > >> Michael > > > > > > > > > > > > -- > No virus found in this outgoing message. > Checked by AVG Free Edition. > Version: 7.5.446 / Virus Database: 269.4.0/759 - Release Date: 12/04/2007 > 7:58 PM > > |
In reply to this post by Jacopo Cappellato
Thanks, it works now...
Michael
|
In reply to this post by Michael Imhof
Hi Michael,
This is likely a better question for the user's list. You're likely to get a faster response. The dev list is for discussion around the development of the community project, not so much personal development. That being said, there are two likely solutions. If you want to keep using the form widget, you need to process your list to make sure the list is presented to the form in the order you want it displayed. This can be done through a service or script (side not for the dev list: adding the order-value-list from minilang to the form widget actions might be beneficial for this.) If you don't want to process your list, using freemarker you can use the ?sort_by directive for lists <#list myCollection?sort_by("myField") as myItem> ${myItem.myField} </#list> or if you want to sort by a field that isn't one off of myItem <#list myCollection?sort_by(["parentNode, childNode"]) as myItem> ${myItem.parentNode.childNode} </#list> --- Immi <[hidden email]> wrote: > > I would like to have a checkbox in every row of my list. The user can > select > the rows he wants to > use and submit this rows. > > I used the following declaration of the form, but I only get a > Checkbox in > the header instead of every column: > > <form name="ListArchive" type="multi" use-row-submit="true" > list-name="listIt"> > <actions> > <set field="entityName" value="Archive"/> > <service service-name="performFind" > result-map-name="result" > result-map-list-name="listIt"> > <field-map field-name="inputFields" > env-name="requestParameters"/> > <field-map field-name="entityName" > env-name="entityName"/> > </service> > </actions> > > <field name="checked" title="Checked"><check/></field> > ...more fields... > <field name="submitButton" title="Process" > widget-style="smallSubmit"><submit/></field> > </form> > > Regards, > Michael > -- > View this message in context: > http://www.nabble.com/List-with-checkboxes-tf3570382.html#a9974871 > Sent from the OFBiz - Dev mailing list archive at Nabble.com. > > |
Free forum by Nabble | Edit this page |