Hi,
I wish send to OFBiz a fonctionnality on submit button, ask to user a confirmation before send form (or call link on hyperlink). This is appreciable for end user when he do a delete or not reverse operation. To operate, I add a new attribut on submit and hyperlink field : confirm Exemple : <field name="closeTmpPeriod" title=" "> <hyperlink target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" description="[${uiLabelMap.AccountingCloseTmpPeriod}]" confirm="${uiLabelMap.AccountingConfirmCloseTmpPeriod}"/> </field> Now in ofbiz we can use event and action to do this, but for me : 1. dedicated attribut is more easier to read and understand quickly the field 2. if I use event and action the field contains javascript : <field name="closeTmpPeriod" title=" " event="onClick" action="if (! window.confirm("${uiLabelMap.AccountingConfirmCloseTmpPeriod}"))> <hyperlink target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" description="[${uiLabelMap.AccountingCloseTmpPeriod}]"/> </field> So it is specific to the html renderer, and confirm an operation is possible on all interface language. Do you have suggestions on the issue ? Nicolas -- Nicolas MALIN Consultant Tél : 06.17.66.40.06 Site projet : http://www.neogia.org/ ------- Société LibrenBerry Tél : 02.48.02.56.12 Site : http://www.librenberry.net/ |
No suggestions ?
I will create a Jira for this new feature ? Nicolas Malin Nicolas a écrit : > Hi, > > I wish send to OFBiz a fonctionnality on submit button, ask to user a > confirmation before send form (or call link on hyperlink). This is > appreciable for end user when he do a delete or not reverse operation. > > To operate, I add a new attribut on submit and hyperlink field : confirm > Exemple : > <field name="closeTmpPeriod" title=" "> > <hyperlink > target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" > description="[${uiLabelMap.AccountingCloseTmpPeriod}]" > confirm="${uiLabelMap.AccountingConfirmCloseTmpPeriod}"/> > </field> > > Now in ofbiz we can use event and action to do this, but for me : > 1. dedicated attribut is more easier to read and understand quickly > the field > 2. if I use event and action the field contains javascript : > <field name="closeTmpPeriod" title=" " event="onClick" > action="if (! > window.confirm("${uiLabelMap.AccountingConfirmCloseTmpPeriod}"))> > <hyperlink > target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" > description="[${uiLabelMap.AccountingCloseTmpPeriod}]"/> > </field> > So it is specific to the html renderer, and confirm an operation > is possible on all interface language. > > Do you have suggestions on the issue ? > > Nicolas > > > > ------------------------------------------------------------------------ > > -- Nicolas MALIN Consultant Tél : 06.17.66.40.06 Site projet : http://www.neogia.org/ ------- Société LibrenBerry Tél : 02.48.02.56.12 Site : http://www.librenberry.net/ |
Administrator
|
Hi Nicolas,
Sounds like a good idea to me Jacques From: "Malin Nicolas" <[hidden email]> > No suggestions ? > > I will create a Jira for this new feature ? > > Nicolas > > Malin Nicolas a écrit : >> Hi, >> >> I wish send to OFBiz a fonctionnality on submit button, ask to user a confirmation before send form (or call link on hyperlink). >> This is appreciable for end user when he do a delete or not reverse operation. >> >> To operate, I add a new attribut on submit and hyperlink field : confirm >> Exemple : >> <field name="closeTmpPeriod" title=" "> >> <hyperlink target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >> description="[${uiLabelMap.AccountingCloseTmpPeriod}]" confirm="${uiLabelMap.AccountingConfirmCloseTmpPeriod}"/> >> </field> >> >> Now in ofbiz we can use event and action to do this, but for me : >> 1. dedicated attribut is more easier to read and understand quickly the field >> 2. if I use event and action the field contains javascript : >> <field name="closeTmpPeriod" title=" " event="onClick" action="if (! >> window.confirm("${uiLabelMap.AccountingConfirmCloseTmpPeriod}"))> >> <hyperlink target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >> description="[${uiLabelMap.AccountingCloseTmpPeriod}]"/> >> </field> >> So it is specific to the html renderer, and confirm an operation is possible on all interface language. >> >> Do you have suggestions on the issue ? >> >> Nicolas >> >> >> >> ------------------------------------------------------------------------ >> >> > > > -- > Nicolas MALIN > Consultant > Tél : 06.17.66.40.06 > Site projet : http://www.neogia.org/ > ------- > Société LibrenBerry > Tél : 02.48.02.56.12 > Site : http://www.librenberry.net/ > |
In reply to this post by Malin Nicolas
Hi Nicolas....
there are examples how to do that in OFBiz.... try to cancel an invoice in accounting..... Regards, Hans On Thu, 2008-10-30 at 11:45 +0100, Malin Nicolas wrote: > No suggestions ? > > I will create a Jira for this new feature ? > > Nicolas > > Malin Nicolas a écrit : > > Hi, > > > > I wish send to OFBiz a fonctionnality on submit button, ask to user a > > confirmation before send form (or call link on hyperlink). This is > > appreciable for end user when he do a delete or not reverse operation. > > > > To operate, I add a new attribut on submit and hyperlink field : confirm > > Exemple : > > <field name="closeTmpPeriod" title=" "> > > <hyperlink > > target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" > > description="[${uiLabelMap.AccountingCloseTmpPeriod}]" > > confirm="${uiLabelMap.AccountingConfirmCloseTmpPeriod}"/> > > </field> > > > > Now in ofbiz we can use event and action to do this, but for me : > > 1. dedicated attribut is more easier to read and understand quickly > > the field > > 2. if I use event and action the field contains javascript : > > <field name="closeTmpPeriod" title=" " event="onClick" > > action="if (! > > window.confirm("${uiLabelMap.AccountingConfirmCloseTmpPeriod}"))> > > <hyperlink > > target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" > > description="[${uiLabelMap.AccountingCloseTmpPeriod}]"/> > > </field> > > So it is specific to the html renderer, and confirm an operation > > is possible on all interface language. > > > > Do you have suggestions on the issue ? > > > > Nicolas > > > > > > > > ------------------------------------------------------------------------ > > > > > > Antwebsystems.com: Quality OFBiz services for competitive prices |
Hi Hans,
Ok I found it :) <menu-item name="statusToCancelled" title="${uiLabelMap.AccountingInvoiceStatusToCancelled}"> <condition> ... </condition> <link target="javascript:confirmActionLink('You want to cancel this invoice number ${invoice.invoiceId}?','setInvoiceStatus?invoiceId=${invoice.invoiceId}&statusId=INVOICE_CANCELLED')" url-mode="plain"/> </menu-item> With confirm attribute the result will be : <link target="setInvoiceStatus?invoiceId=${invoice.invoiceId}&statusId=INVOICE_CANCELLED')" confirm="${uiLabelMap.AcccountingYouWantCancelInvoiceNumber} ${invoice.invoiceId} ?" url-mode="plain"/> The javascript call is create by the renderer, not direcly define in xml file. I try to separate the html technology from the xml sreen engine definition. But I am maybe in the wrong. Nicolas Hans Bakker a écrit : > Hi Nicolas.... > there are examples how to do that in OFBiz.... > > try to cancel an invoice in accounting..... > > Regards, > Hans > > On Thu, 2008-10-30 at 11:45 +0100, Malin Nicolas wrote: > >> No suggestions ? >> >> I will create a Jira for this new feature ? >> >> Nicolas >> >> Malin Nicolas a écrit : >> >>> Hi, >>> >>> I wish send to OFBiz a fonctionnality on submit button, ask to user a >>> confirmation before send form (or call link on hyperlink). This is >>> appreciable for end user when he do a delete or not reverse operation. >>> >>> To operate, I add a new attribut on submit and hyperlink field : confirm >>> Exemple : >>> <field name="closeTmpPeriod" title=" "> >>> <hyperlink >>> target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >>> description="[${uiLabelMap.AccountingCloseTmpPeriod}]" >>> confirm="${uiLabelMap.AccountingConfirmCloseTmpPeriod}"/> >>> </field> >>> >>> Now in ofbiz we can use event and action to do this, but for me : >>> 1. dedicated attribut is more easier to read and understand quickly >>> the field >>> 2. if I use event and action the field contains javascript : >>> <field name="closeTmpPeriod" title=" " event="onClick" >>> action="if (! >>> window.confirm("${uiLabelMap.AccountingConfirmCloseTmpPeriod}"))> >>> <hyperlink >>> target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >>> description="[${uiLabelMap.AccountingCloseTmpPeriod}]"/> >>> </field> >>> So it is specific to the html renderer, and confirm an operation >>> is possible on all interface language. >>> >>> Do you have suggestions on the issue ? >>> >>> Nicolas >>> >>> >>> >>> ------------------------------------------------------------------------ >>> >>> >>> >> -- Nicolas MALIN Consultant Tél : 06.17.66.40.06 Site projet : http://www.neogia.org/ ------- Société LibrenBerry Tél : 02.48.02.56.12 Site : http://www.librenberry.net/ |
Administrator
|
Hi Nicolas,
At least for the sake of i18n I'd say : create a Jira if not already done. I will take care of it. I know we can do l10n also within javascript but Nicolas's propositoin it much more consistent with the way we usually deal with it in OFBiz Thanks Jacques From: "Malin Nicolas" <[hidden email]> > Hi Hans, > > Ok I found it :) > > <menu-item name="statusToCancelled" title="${uiLabelMap.AccountingInvoiceStatusToCancelled}"> > <condition> > ... > </condition> > <link target="javascript:confirmActionLink('You want to cancel this invoice number > ${invoice.invoiceId}?','setInvoiceStatus?invoiceId=${invoice.invoiceId}&statusId=INVOICE_CANCELLED')" url-mode="plain"/> > </menu-item> > > With confirm attribute the result will be : > <link target="setInvoiceStatus?invoiceId=${invoice.invoiceId}&statusId=INVOICE_CANCELLED')" > confirm="${uiLabelMap.AcccountingYouWantCancelInvoiceNumber} ${invoice.invoiceId} ?" url-mode="plain"/> > > The javascript call is create by the renderer, not direcly define in xml file. I try to separate the html technology from the xml > sreen engine definition. But I am maybe in the wrong. > > Nicolas > > Hans Bakker a écrit : >> Hi Nicolas.... >> there are examples how to do that in OFBiz.... >> >> try to cancel an invoice in accounting..... >> >> Regards, >> Hans >> >> On Thu, 2008-10-30 at 11:45 +0100, Malin Nicolas wrote: >> >>> No suggestions ? >>> >>> I will create a Jira for this new feature ? >>> >>> Nicolas >>> >>> Malin Nicolas a écrit : >>> >>>> Hi, >>>> >>>> I wish send to OFBiz a fonctionnality on submit button, ask to user a confirmation before send form (or call link on >>>> hyperlink). This is appreciable for end user when he do a delete or not reverse operation. >>>> >>>> To operate, I add a new attribut on submit and hyperlink field : confirm >>>> Exemple : >>>> <field name="closeTmpPeriod" title=" "> >>>> <hyperlink target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >>>> description="[${uiLabelMap.AccountingCloseTmpPeriod}]" confirm="${uiLabelMap.AccountingConfirmCloseTmpPeriod}"/> >>>> </field> >>>> >>>> Now in ofbiz we can use event and action to do this, but for me : >>>> 1. dedicated attribut is more easier to read and understand quickly the field >>>> 2. if I use event and action the field contains javascript : >>>> <field name="closeTmpPeriod" title=" " event="onClick" action="if (! >>>> window.confirm("${uiLabelMap.AccountingConfirmCloseTmpPeriod}"))> >>>> <hyperlink target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >>>> description="[${uiLabelMap.AccountingCloseTmpPeriod}]"/> >>>> </field> >>>> So it is specific to the html renderer, and confirm an operation is possible on all interface language. >>>> >>>> Do you have suggestions on the issue ? >>>> >>>> Nicolas >>>> >>>> >>>> >>>> ------------------------------------------------------------------------ >>>> >>>> >>>> >>> > > > -- > Nicolas MALIN > Consultant > Tél : 06.17.66.40.06 > Site projet : http://www.neogia.org/ > ------- > Société LibrenBerry > Tél : 02.48.02.56.12 > Site : http://www.librenberry.net/ > |
Hi Jacques,
Ok, I create the jira, and attach the patch when I come back in France ;) Nicolas Jacques Le Roux a écrit : > Hi Nicolas, > > At least for the sake of i18n I'd say : create a Jira if not already > done. I will take care of it. > I know we can do l10n also within javascript but Nicolas's propositoin > it much more consistent with the way we usually deal with it in OFBiz > > Thanks > > Jacques > > From: "Malin Nicolas" <[hidden email]> >> Hi Hans, >> >> Ok I found it :) >> >> <menu-item name="statusToCancelled" >> title="${uiLabelMap.AccountingInvoiceStatusToCancelled}"> >> <condition> >> ... >> </condition> >> <link target="javascript:confirmActionLink('You want to >> cancel this invoice number >> ${invoice.invoiceId}?','setInvoiceStatus?invoiceId=${invoice.invoiceId}&statusId=INVOICE_CANCELLED')" >> url-mode="plain"/> >> </menu-item> >> >> With confirm attribute the result will be : >> <link >> target="setInvoiceStatus?invoiceId=${invoice.invoiceId}&statusId=INVOICE_CANCELLED')" >> confirm="${uiLabelMap.AcccountingYouWantCancelInvoiceNumber} >> ${invoice.invoiceId} ?" url-mode="plain"/> >> >> The javascript call is create by the renderer, not direcly define in >> xml file. I try to separate the html technology from the xml sreen >> engine definition. But I am maybe in the wrong. >> >> Nicolas >> >> Hans Bakker a écrit : >>> Hi Nicolas.... >>> there are examples how to do that in OFBiz.... >>> >>> try to cancel an invoice in accounting..... >>> >>> Regards, >>> Hans >>> >>> On Thu, 2008-10-30 at 11:45 +0100, Malin Nicolas wrote: >>> >>>> No suggestions ? >>>> >>>> I will create a Jira for this new feature ? >>>> >>>> Nicolas >>>> >>>> Malin Nicolas a écrit : >>>> >>>>> Hi, >>>>> >>>>> I wish send to OFBiz a fonctionnality on submit button, ask to >>>>> user a confirmation before send form (or call link on hyperlink). >>>>> This is appreciable for end user when he do a delete or not >>>>> reverse operation. >>>>> >>>>> To operate, I add a new attribut on submit and hyperlink field : >>>>> confirm >>>>> Exemple : >>>>> <field name="closeTmpPeriod" title=" "> >>>>> <hyperlink >>>>> target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >>>>> description="[${uiLabelMap.AccountingCloseTmpPeriod}]" >>>>> confirm="${uiLabelMap.AccountingConfirmCloseTmpPeriod}"/> >>>>> </field> >>>>> >>>>> Now in ofbiz we can use event and action to do this, but for me : >>>>> 1. dedicated attribut is more easier to read and understand >>>>> quickly the field >>>>> 2. if I use event and action the field contains javascript : >>>>> <field name="closeTmpPeriod" title=" " event="onClick" >>>>> action="if (! >>>>> window.confirm("${uiLabelMap.AccountingConfirmCloseTmpPeriod}"))> >>>>> <hyperlink >>>>> target="EditGlPeriodStatus?idNum=${formsData.idNum}&statusId=PS_CLOSETMP" >>>>> description="[${uiLabelMap.AccountingCloseTmpPeriod}]"/> >>>>> </field> >>>>> So it is specific to the html renderer, and confirm an >>>>> operation is possible on all interface language. >>>>> >>>>> Do you have suggestions on the issue ? >>>>> >>>>> Nicolas >>>>> >>>>> >>>>> >>>>> ------------------------------------------------------------------------ >>>>> >>>>> >>>>> >>>>> >>>> >> >> >> -- >> Nicolas MALIN >> Consultant >> Tél : 06.17.66.40.06 >> Site projet : http://www.neogia.org/ >> ------- >> Société LibrenBerry >> Tél : 02.48.02.56.12 >> Site : http://www.librenberry.net/ >> > > |
Free forum by Nabble | Edit this page |