How to activate/deactivate a <condition-expr> depending on a flag?

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

How to activate/deactivate a <condition-expr> depending on a flag?

Bruno Busco
Hi,
in a search form I need to let the user to optionally restrict the search to
records that have an empty field.

I have implemented this in a form with <actions> tag with a <condition-list>
and several <condition-expr> elements.
I would like to enable one of the <condition-expr> elements (the one that
filters for the empty field) only is a <check> field is checked but I do not
see how to do this.
It seems like a "use-when" property in the <condition-expr> would have done
the job but it does not exists. Neither the <if> is supported in the form
<actions> to exclude some <condition-expr> elements.

Is any other way to get the <condition-expr> not considered if a check field
is checked?
Does adding the use-when property to the <condition-expr> make sense?

Many thanks,
-Bruno
Reply | Threaded
Open this post in threaded view
|

Re: How to activate/deactivate a <condition-expr> depending on a flag?

hans_bakker
I had the same problem and have it solved in the mypageforms.xml in
screen: Communications.

this by anding the condition with a like condition...to activate or
deactivate it....not beautifull but it works.,...

On Thu, 2008-08-21 at 09:41 +0200, Bruno Busco wrote:

> Hi,
> in a search form I need to let the user to optionally restrict the search to
> records that have an empty field.
>
> I have implemented this in a form with <actions> tag with a <condition-list>
> and several <condition-expr> elements.
> I would like to enable one of the <condition-expr> elements (the one that
> filters for the empty field) only is a <check> field is checked but I do not
> see how to do this.
> It seems like a "use-when" property in the <condition-expr> would have done
> the job but it does not exists. Neither the <if> is supported in the form
> <actions> to exclude some <condition-expr> elements.
>
> Is any other way to get the <condition-expr> not considered if a check field
> is checked?
> Does adding the use-when property to the <condition-expr> make sense?
>
> Many thanks,
> -Bruno

Reply | Threaded
Open this post in threaded view
|

Re: How to activate/deactivate a <condition-expr> depending on a flag?

Bruno Busco
Many thanks,
I will follow your way.
BTW don't you think that a use-when property could be helpful (and
appropriate) in the <condition-expr> tag?
-Bruno

2008/8/21 Hans Bakker <[hidden email]>

> I had the same problem and have it solved in the mypageforms.xml in
> screen: Communications.
>
> this by anding the condition with a like condition...to activate or
> deactivate it....not beautifull but it works.,...
>
> On Thu, 2008-08-21 at 09:41 +0200, Bruno Busco wrote:
> > Hi,
> > in a search form I need to let the user to optionally restrict the search
> to
> > records that have an empty field.
> >
> > I have implemented this in a form with <actions> tag with a
> <condition-list>
> > and several <condition-expr> elements.
> > I would like to enable one of the <condition-expr> elements (the one that
> > filters for the empty field) only is a <check> field is checked but I do
> not
> > see how to do this.
> > It seems like a "use-when" property in the <condition-expr> would have
> done
> > the job but it does not exists. Neither the <if> is supported in the form
> > <actions> to exclude some <condition-expr> elements.
> >
> > Is any other way to get the <condition-expr> not considered if a check
> field
> > is checked?
> > Does adding the use-when property to the <condition-expr> make sense?
> >
> > Many thanks,
> > -Bruno
>
>
Reply | Threaded
Open this post in threaded view
|

Re: How to activate/deactivate a <condition-expr> depending on a flag?

hans_bakker


Sure... that would be useful for lists with should show either open or
all items....


On Sat, 2008-08-23 at 07:29 +0200, Bruno Busco wrote:

> Many thanks,
> I will follow your way.
> BTW don't you think that a use-when property could be helpful (and
> appropriate) in the <condition-expr> tag?
> -Bruno
>
> 2008/8/21 Hans Bakker <[hidden email]>
>
> > I had the same problem and have it solved in the mypageforms.xml in
> > screen: Communications.
> >
> > this by anding the condition with a like condition...to activate or
> > deactivate it....not beautifull but it works.,...
> >
> > On Thu, 2008-08-21 at 09:41 +0200, Bruno Busco wrote:
> > > Hi,
> > > in a search form I need to let the user to optionally restrict the search
> > to
> > > records that have an empty field.
> > >
> > > I have implemented this in a form with <actions> tag with a
> > <condition-list>
> > > and several <condition-expr> elements.
> > > I would like to enable one of the <condition-expr> elements (the one that
> > > filters for the empty field) only is a <check> field is checked but I do
> > not
> > > see how to do this.
> > > It seems like a "use-when" property in the <condition-expr> would have
> > done
> > > the job but it does not exists. Neither the <if> is supported in the form
> > > <actions> to exclude some <condition-expr> elements.
> > >
> > > Is any other way to get the <condition-expr> not considered if a check
> > field
> > > is checked?
> > > Does adding the use-when property to the <condition-expr> make sense?
> > >
> > > Many thanks,
> > > -Bruno
> >
> >

Reply | Threaded
Open this post in threaded view
|

Re: How to activate/deactivate a <condition-expr> depending on a flag?

Bruno Busco
Hi Hans,
I implemented this and attached a patch here
*OFBIZ-1934<https://issues.apache.org/jira/browse/OFBIZ-1934>
*
Hope this helps,
-Bruno
*

*
2008/8/23 Hans Bakker <[hidden email]>

>
>
> Sure... that would be useful for lists with should show either open or
> all items....
>
>
> On Sat, 2008-08-23 at 07:29 +0200, Bruno Busco wrote:
> > Many thanks,
> > I will follow your way.
> > BTW don't you think that a use-when property could be helpful (and
> > appropriate) in the <condition-expr> tag?
> > -Bruno
> >
> > 2008/8/21 Hans Bakker <[hidden email]>
> >
> > > I had the same problem and have it solved in the mypageforms.xml in
> > > screen: Communications.
> > >
> > > this by anding the condition with a like condition...to activate or
> > > deactivate it....not beautifull but it works.,...
> > >
> > > On Thu, 2008-08-21 at 09:41 +0200, Bruno Busco wrote:
> > > > Hi,
> > > > in a search form I need to let the user to optionally restrict the
> search
> > > to
> > > > records that have an empty field.
> > > >
> > > > I have implemented this in a form with <actions> tag with a
> > > <condition-list>
> > > > and several <condition-expr> elements.
> > > > I would like to enable one of the <condition-expr> elements (the one
> that
> > > > filters for the empty field) only is a <check> field is checked but I
> do
> > > not
> > > > see how to do this.
> > > > It seems like a "use-when" property in the <condition-expr> would
> have
> > > done
> > > > the job but it does not exists. Neither the <if> is supported in the
> form
> > > > <actions> to exclude some <condition-expr> elements.
> > > >
> > > > Is any other way to get the <condition-expr> not considered if a
> check
> > > field
> > > > is checked?
> > > > Does adding the use-when property to the <condition-expr> make sense?
> > > >
> > > > Many thanks,
> > > > -Bruno
> > >
> > >
>
>