use-when

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

use-when

Pierre Smits
Hi all,

I want to have a button only visible (with use-when on a field widget in a
form) in an overview when following conditions are met:

   1. when thruDate is null or empty
   2. when thruDate is great or equal to now.

I can get the first one going, but the second and thus the combo not.

Who can help me out?

Regards,

Pierre
Reply | Threaded
Open this post in threaded view
|

Re: use-when

Ankit Jain-2
Try this for second condition use-when="${thruDate > nowTimestamp}".

HTH

Regards,
Ankit Jain



On Mon, May 7, 2012 at 12:31 PM, Pierre Smits <[hidden email]> wrote:

> Hi all,
>
> I want to have a button only visible (with use-when on a field widget in a
> form) in an overview when following conditions are met:
>
>   1. when thruDate is null or empty
>   2. when thruDate is great or equal to now.
>
> I can get the first one going, but the second and thus the combo not.
>
> Who can help me out?
>
> Regards,
>
> Pierre
Reply | Threaded
Open this post in threaded view
|

Re: use-when

Pierre Smits
Thanks Ankit Jain,

It worked, but with a side effect. When only your suggestion
(use-when="${thruDate &gt; nowTimestamp}") it shows the button when
thruDate is null.

Regards,

Pierre

2012/5/7 Ankit Jain <[hidden email]>

> Try this for second condition use-when="${thruDate &gt; nowTimestamp}".
>
> HTH
>
> Regards,
> Ankit Jain
>
>
>
> On Mon, May 7, 2012 at 12:31 PM, Pierre Smits <[hidden email]>
> wrote:
> > Hi all,
> >
> > I want to have a button only visible (with use-when on a field widget in
> a
> > form) in an overview when following conditions are met:
> >
> >   1. when thruDate is null or empty
> >   2. when thruDate is great or equal to now.
> >
> > I can get the first one going, but the second and thus the combo not.
> >
> > Who can help me out?
> >
> > Regards,
> >
> > Pierre
>
Reply | Threaded
Open this post in threaded view
|

Re: use-when

Malin Nicolas
Try this :
use-when="${thruDate == void @or thruDate&gt; nowTimestamp}"

Nicolas

Le 07/05/2012 11:33, Pierre Smits a écrit :

> Thanks Ankit Jain,
>
> It worked, but with a side effect. When only your suggestion
> (use-when="${thruDate&gt; nowTimestamp}") it shows the button when
> thruDate is null.
>
> Regards,
>
> Pierre
>
> 2012/5/7 Ankit Jain<[hidden email]>
>
>> Try this for second condition use-when="${thruDate&gt; nowTimestamp}".
>>
>> HTH
>>
>> Regards,
>> Ankit Jain
>>
>>
>>
>> On Mon, May 7, 2012 at 12:31 PM, Pierre Smits<[hidden email]>
>> wrote:
>>> Hi all,
>>>
>>> I want to have a button only visible (with use-when on a field widget in
>> a
>>> form) in an overview when following conditions are met:
>>>
>>>    1. when thruDate is null or empty
>>>    2. when thruDate is great or equal to now.
>>>
>>> I can get the first one going, but the second and thus the combo not.
>>>
>>> Who can help me out?
>>>
>>> Regards,
>>>
>>> Pierre


--
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/

Reply | Threaded
Open this post in threaded view
|

Re: use-when

Ankit Jain-2
In reply to this post by Pierre Smits
Pierre,

I have already mentioned that its for second condition and for first
its already working for you so combine both the condition like this.

use-when="${thruDate==null || (thruDate &gt; nowTimestamp)}"

Regards,
Ankit Jain



On Mon, May 7, 2012 at 3:03 PM, Pierre Smits <[hidden email]> wrote:

> Thanks Ankit Jain,
>
> It worked, but with a side effect. When only your suggestion
> (use-when="${thruDate &gt; nowTimestamp}") it shows the button when
> thruDate is null.
>
> Regards,
>
> Pierre
>
> 2012/5/7 Ankit Jain <[hidden email]>
>
>> Try this for second condition use-when="${thruDate &gt; nowTimestamp}".
>>
>> HTH
>>
>> Regards,
>> Ankit Jain
>>
>>
>>
>> On Mon, May 7, 2012 at 12:31 PM, Pierre Smits <[hidden email]>
>> wrote:
>> > Hi all,
>> >
>> > I want to have a button only visible (with use-when on a field widget in
>> a
>> > form) in an overview when following conditions are met:
>> >
>> >   1. when thruDate is null or empty
>> >   2. when thruDate is great or equal to now.
>> >
>> > I can get the first one going, but the second and thus the combo not.
>> >
>> > Who can help me out?
>> >
>> > Regards,
>> >
>> > Pierre
>>
Reply | Threaded
Open this post in threaded view
|

Re: use-when

Pierre Smits
Nicolas, Ankit Jain,

Thanks to both of you.

The suggestion of Nicolas ( use-when="${thruDate == void @or thruDate&gt;
nowTimestamp}" ) still showed the button even when thruDate < nowTimestamp.

The suggestion of Ankit Jain ( use-when="${thruDate==null || (thruDate &gt;
nowTimestamp)}" ) works.

Regards,

Pierre