You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Angelo Matarazzo <ma...@gmail.com> on 2008/11/09 22:04:37 UTC
Questions about form list and use-when
Hi,
I'm studying use-when tag in list-forms and I have a few questions:
1)I would like to do
<field name="name" title="${uiLabelMap.CommonName} "
use-when="name.equals("Jack")">
<display also-hidden="true" description="${name}" />
</field>
But there isn't variable "name" in the context and so use-when doesn't
work.
How can I display the specific value of "name" only if it is Jack?
2)Also
<form name="ListName" type="multi" >
.
.
<set field="contextVariable" value="commonValue"/>
.
.
.
<field use-when="contextVariablename.equals("commonValue")"
name="name">
<display />
</field>
<field name="submitButton" title="${uiLabelMap.CommonRemove}-->"
use-when="contextVariablename.equals("commonValue")">
<submit button-type="button" />
</field>
The field "submitButton" unlike "name", is always displayed Why?
Thank you for your time.
--
View this message in context: http://www.nabble.com/Questions-about-form-list-and-use-when-tp20410825p20410825.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Questions about form list and use-when
Posted by Angelo Matarazzo <ma...@gmail.com>.
Hi, Eric
thank you.
However I resolved in this way:
field name="name" title="${uiLabelMap.CommonName} ">
<display also-hidden="true"
description="${bsh:if(name.equals("Jack")) return name; else return
"} />
</field>
In your opinion is't right?
About second question?
<form name="ListName" type="multi" >
.
.
<actions>
<set field="contextVariable" value="commonValue"/>
<actions/>
<field use-when="contextVariablename.equals("commonValue")"
name="name">
<display />
</field>
<field name="submitButton" title="${uiLabelMap.CommonRemove}-->"
use-when="contextVariablename.equals("commonValue")">
<submit button-type="button" />
</field>
The field "submitButton" unlike "name", is always displayed Why?
Thanks again.
Angelo
Eric DE MAULDE wrote:
>
> See sreen context variables and visitor sub-variable
> http://docs.ofbiz.org/pages/viewpage.action?pageId=4459
>
>
> Eric
>
> ----- Original Message -----
> From: "Angelo Matarazzo" <ma...@gmail.com>
> To: <us...@ofbiz.apache.org>
> Sent: Sunday, November 09, 2008 10:04 PM
> Subject: Questions about form list and use-when
>
>
>>
>> Hi,
>> I'm studying use-when tag in list-forms and I have a few questions:
>>
>> 1)I would like to do
>>
>> <field name="name" title="${uiLabelMap.CommonName} "
>> use-when="name.equals("Jack")">
>> <display also-hidden="true" description="${name}" />
>> </field>
>> But there isn't variable "name" in the context and so use-when doesn't
>> work.
>> How can I display the specific value of "name" only if it is Jack?
>>
>> 2)Also
>>
>> <form name="ListName" type="multi" >
>> .
>> .
>><actions>
>> <set field="contextVariable" value="commonValue"/>
>> .<actions/>
>> .
>> .
>> <field use-when="contextVariablename.equals("commonValue")"
>> name="name">
>> <display />
>> </field>
>>
>> <field name="submitButton" title="${uiLabelMap.CommonRemove}-->"
>> use-when="contextVariablename.equals("commonValue")">
>> <submit button-type="button" />
>> </field>
>>
>> The field "submitButton" unlike "name", is always displayed Why?
>>
>>
>> Thank you for your time.
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Questions-about-form-list-and-use-when-tp20410825p20410825.html
>> Sent from the OFBiz - User mailing list archive at Nabble.com.
>>
>>
>
>
>
--
View this message in context: http://www.nabble.com/Questions-about-form-list-and-use-when-tp20410825p20426736.html
Sent from the OFBiz - User mailing list archive at Nabble.com.
Re: Questions about form list and use-when
Posted by Eric DE MAULDE <er...@free.fr>.
See sreen context variables and visitor sub-variable
http://docs.ofbiz.org/pages/viewpage.action?pageId=4459
Eric
----- Original Message -----
From: "Angelo Matarazzo" <ma...@gmail.com>
To: <us...@ofbiz.apache.org>
Sent: Sunday, November 09, 2008 10:04 PM
Subject: Questions about form list and use-when
>
> Hi,
> I'm studying use-when tag in list-forms and I have a few questions:
>
> 1)I would like to do
>
> <field name="name" title="${uiLabelMap.CommonName} "
> use-when="name.equals("Jack")">
> <display also-hidden="true" description="${name}" />
> </field>
> But there isn't variable "name" in the context and so use-when doesn't
> work.
> How can I display the specific value of "name" only if it is Jack?
>
> 2)Also
>
> <form name="ListName" type="multi" >
> .
> .
>
> <set field="contextVariable" value="commonValue"/>
> .
> .
> .
> <field use-when="contextVariablename.equals("commonValue")"
> name="name">
> <display />
> </field>
>
> <field name="submitButton" title="${uiLabelMap.CommonRemove}-->"
> use-when="contextVariablename.equals("commonValue")">
> <submit button-type="button" />
> </field>
>
> The field "submitButton" unlike "name", is always displayed Why?
>
>
> Thank you for your time.
>
> --
> View this message in context:
> http://www.nabble.com/Questions-about-form-list-and-use-when-tp20410825p20410825.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>
>