You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Swapnil Mane <sw...@hotwaxsystems.com> on 2016/06/04 11:14:16 UTC

Support of passing placeholder values in while using UiLabels for error reporting

Dear team,

As per the current OOTB code, In <fail-property> tag, we don't have support
for fetching the property message along with updated value of placeholder.
for e.g. We have UiLabel AccountingInvoiceUpdateOnlyWithInProcessStatus


{code}

<property key="AccountingInvoiceUpdateOnlyWithInProcessStatus">

<value xml:lang="en">Can only update Invoice, when status is
> in-process...current status: ${lookedUpValue.statusId}</value>

{code}



(*Here placeholder is  ${lookedUpValue.statusId}*)

Now, In simple method 'InvoiceStatusInProgress'
(accounting/widget/InvoiceScreens.xml), we used fail-property

{code}

<fail-property resource="AccountingUiLabels"
> property="AccountingInvoiceUpdateOnlyWithInProcessStatus" />

{code}



using this, we are unable to pass the value of statusId, for getting
the message like

Can only update Invoice, when status is in-process...current status:
> *INVOICE_PAID*



Kindly let me know if I am missing anything while using the <fail-property>
or if it is the current limitation, we can proceed to create Jira ticket
(Please confirm :)

- Best Regards,
Swapnil M Mane
HotWax Systems,
www.hotwaxsystems.com

Re: Support of passing placeholder values in while using UiLabels for error reporting

Posted by Swapnil Mane <sw...@hotwaxsystems.com>.
Thanks so much Jacques and Pranay for sharing your thoughts! :-)


- Best Regards,
Swapnil M Mane
HotWax Systems,
www.hotwaxsystems.com

On Mon, Jun 6, 2016 at 11:57 AM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Yes Groovy snippet or script,  that's what I thought also. Of course would
> be more elegant and convenient with a fail-property attribute
>
> Jacques
>
>
>
> Le 06/06/2016 à 06:05, Pranay Pandey a écrit :
>
>> Hi Swapnil, Jacques
>>
>> Yes, it looks like a required improvement in fail-property usage.
>>
>> Though we can go the groovy route if service/event written using it.
>>
>> Best regards,
>>
>> Pranay Pandey
>> HotWax Systems
>> http://www.hotwaxsystems.com/
>>
>> On Sun, Jun 5, 2016 at 9:40 AM, Jacques Le Roux <
>> jacques.le.roux@les7arts.com> wrote:
>>
>> Hi Swapnil,
>>>
>>> This is possible with fail-message but seems indeed impossible with
>>> fail-property
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 04/06/2016 à 13:14, Swapnil Mane a écrit :
>>>
>>> Dear team,
>>>>
>>>> As per the current OOTB code, In <fail-property> tag, we don't have
>>>> support
>>>> for fetching the property message along with updated value of
>>>> placeholder.
>>>> for e.g. We have UiLabel AccountingInvoiceUpdateOnlyWithInProcessStatus
>>>>
>>>>
>>>> {code}
>>>>
>>>> <property key="AccountingInvoiceUpdateOnlyWithInProcessStatus">
>>>>
>>>> <value xml:lang="en">Can only update Invoice, when status is
>>>>
>>>> in-process...current status: ${lookedUpValue.statusId}</value>
>>>>>
>>>>> {code}
>>>>
>>>>
>>>>
>>>> (*Here placeholder is  ${lookedUpValue.statusId}*)
>>>>
>>>> Now, In simple method 'InvoiceStatusInProgress'
>>>> (accounting/widget/InvoiceScreens.xml), we used fail-property
>>>>
>>>> {code}
>>>>
>>>> <fail-property resource="AccountingUiLabels"
>>>>
>>>> property="AccountingInvoiceUpdateOnlyWithInProcessStatus" />
>>>>>
>>>>> {code}
>>>>
>>>>
>>>>
>>>> using this, we are unable to pass the value of statusId, for getting
>>>> the message like
>>>>
>>>> Can only update Invoice, when status is in-process...current status:
>>>>
>>>> *INVOICE_PAID*
>>>>>
>>>>> Kindly let me know if I am missing anything while using the
>>>> <fail-property>
>>>> or if it is the current limitation, we can proceed to create Jira ticket
>>>> (Please confirm :)
>>>>
>>>> - Best Regards,
>>>> Swapnil M Mane
>>>> HotWax Systems,
>>>> www.hotwaxsystems.com
>>>>
>>>>
>>>>
>

Re: Support of passing placeholder values in while using UiLabels for error reporting

Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes Groovy snippet or script,  that's what I thought also. Of course would be more elegant and convenient with a fail-property attribute

Jacques


Le 06/06/2016 � 06:05, Pranay Pandey a �crit :
> Hi Swapnil, Jacques
>
> Yes, it looks like a required improvement in fail-property usage.
>
> Though we can go the groovy route if service/event written using it.
>
> Best regards,
>
> Pranay Pandey
> HotWax Systems
> http://www.hotwaxsystems.com/
>
> On Sun, Jun 5, 2016 at 9:40 AM, Jacques Le Roux <
> jacques.le.roux@les7arts.com> wrote:
>
>> Hi Swapnil,
>>
>> This is possible with fail-message but seems indeed impossible with
>> fail-property
>>
>> Jacques
>>
>>
>>
>> Le 04/06/2016 � 13:14, Swapnil Mane a �crit :
>>
>>> Dear team,
>>>
>>> As per the current OOTB code, In <fail-property> tag, we don't have
>>> support
>>> for fetching the property message along with updated value of placeholder.
>>> for e.g. We have UiLabel AccountingInvoiceUpdateOnlyWithInProcessStatus
>>>
>>>
>>> {code}
>>>
>>> <property key="AccountingInvoiceUpdateOnlyWithInProcessStatus">
>>>
>>> <value xml:lang="en">Can only update Invoice, when status is
>>>
>>>> in-process...current status: ${lookedUpValue.statusId}</value>
>>>>
>>> {code}
>>>
>>>
>>>
>>> (*Here placeholder is  ${lookedUpValue.statusId}*)
>>>
>>> Now, In simple method 'InvoiceStatusInProgress'
>>> (accounting/widget/InvoiceScreens.xml), we used fail-property
>>>
>>> {code}
>>>
>>> <fail-property resource="AccountingUiLabels"
>>>
>>>> property="AccountingInvoiceUpdateOnlyWithInProcessStatus" />
>>>>
>>> {code}
>>>
>>>
>>>
>>> using this, we are unable to pass the value of statusId, for getting
>>> the message like
>>>
>>> Can only update Invoice, when status is in-process...current status:
>>>
>>>> *INVOICE_PAID*
>>>>
>>> Kindly let me know if I am missing anything while using the
>>> <fail-property>
>>> or if it is the current limitation, we can proceed to create Jira ticket
>>> (Please confirm :)
>>>
>>> - Best Regards,
>>> Swapnil M Mane
>>> HotWax Systems,
>>> www.hotwaxsystems.com
>>>
>>>


Re: Support of passing placeholder values in while using UiLabels for error reporting

Posted by Pranay Pandey <pr...@hotwaxsystems.com>.
Hi Swapnil, Jacques

Yes, it looks like a required improvement in fail-property usage.

Though we can go the groovy route if service/event written using it.

Best regards,

Pranay Pandey
HotWax Systems
http://www.hotwaxsystems.com/

On Sun, Jun 5, 2016 at 9:40 AM, Jacques Le Roux <
jacques.le.roux@les7arts.com> wrote:

> Hi Swapnil,
>
> This is possible with fail-message but seems indeed impossible with
> fail-property
>
> Jacques
>
>
>
> Le 04/06/2016 à 13:14, Swapnil Mane a écrit :
>
>> Dear team,
>>
>> As per the current OOTB code, In <fail-property> tag, we don't have
>> support
>> for fetching the property message along with updated value of placeholder.
>> for e.g. We have UiLabel AccountingInvoiceUpdateOnlyWithInProcessStatus
>>
>>
>> {code}
>>
>> <property key="AccountingInvoiceUpdateOnlyWithInProcessStatus">
>>
>> <value xml:lang="en">Can only update Invoice, when status is
>>
>>> in-process...current status: ${lookedUpValue.statusId}</value>
>>>
>> {code}
>>
>>
>>
>> (*Here placeholder is  ${lookedUpValue.statusId}*)
>>
>> Now, In simple method 'InvoiceStatusInProgress'
>> (accounting/widget/InvoiceScreens.xml), we used fail-property
>>
>> {code}
>>
>> <fail-property resource="AccountingUiLabels"
>>
>>> property="AccountingInvoiceUpdateOnlyWithInProcessStatus" />
>>>
>> {code}
>>
>>
>>
>> using this, we are unable to pass the value of statusId, for getting
>> the message like
>>
>> Can only update Invoice, when status is in-process...current status:
>>
>>> *INVOICE_PAID*
>>>
>>
>> Kindly let me know if I am missing anything while using the
>> <fail-property>
>> or if it is the current limitation, we can proceed to create Jira ticket
>> (Please confirm :)
>>
>> - Best Regards,
>> Swapnil M Mane
>> HotWax Systems,
>> www.hotwaxsystems.com
>>
>>
>

Re: Support of passing placeholder values in while using UiLabels for error reporting

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Swapnil,

This is possible with fail-message but seems indeed impossible with fail-property

Jacques


Le 04/06/2016 � 13:14, Swapnil Mane a �crit :
> Dear team,
>
> As per the current OOTB code, In <fail-property> tag, we don't have support
> for fetching the property message along with updated value of placeholder.
> for e.g. We have UiLabel AccountingInvoiceUpdateOnlyWithInProcessStatus
>
>
> {code}
>
> <property key="AccountingInvoiceUpdateOnlyWithInProcessStatus">
>
> <value xml:lang="en">Can only update Invoice, when status is
>> in-process...current status: ${lookedUpValue.statusId}</value>
> {code}
>
>
>
> (*Here placeholder is  ${lookedUpValue.statusId}*)
>
> Now, In simple method 'InvoiceStatusInProgress'
> (accounting/widget/InvoiceScreens.xml), we used fail-property
>
> {code}
>
> <fail-property resource="AccountingUiLabels"
>> property="AccountingInvoiceUpdateOnlyWithInProcessStatus" />
> {code}
>
>
>
> using this, we are unable to pass the value of statusId, for getting
> the message like
>
> Can only update Invoice, when status is in-process...current status:
>> *INVOICE_PAID*
>
> Kindly let me know if I am missing anything while using the <fail-property>
> or if it is the current limitation, we can proceed to create Jira ticket
> (Please confirm :)
>
> - Best Regards,
> Swapnil M Mane
> HotWax Systems,
> www.hotwaxsystems.com
>