Hiding an instance based on a value

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Hiding an instance based on a value

satya
Probably a basic xforms question, I would like to know whether we can hide a particular instance in a model based on a case value.
 
I have 2 instances in a model. On the form i have 2 links.

On clicking the first link, a login form(with 2 fields and a button) has to be displayed in the same form below the link.
On clicking the second link, a message have to be displayed.
And the content for one link should be hidden, if the user clicks the other link.

So please help me out, whether i could hide a particular instance based on a value in the xpl, as the content for each link is present in a particular instance. And the entire process will go in a single form.




Regards
Satya
Regards
Satya K

Reply | Threaded
Open this post in threaded view
|

Re: Hiding an instance based on a value

Erik Bruchez
Administrator
This is where you typically use switch/case, and the toggle action.

Something like this maybe:

https://gist.github.com/2053324

I used nested switches so that initially nothing is shown.

Note that:

- you are not hiding "instances" (instances are XML document)
- this has nothing to do with XPL

-Erik

On Fri, Mar 16, 2012 at 4:18 AM, satya <[hidden email]> wrote:

> Probably a basic xforms question, I would like to know whether we can hide a
> particular instance in a model based on a case value.
>
> I have 2 instances in a model. On the form i have 2 links.
>
> On clicking the first link, a login form(with 2 fields and a button) has to be
> displayed in the same form below the link.
> On clicking the second link, a message have to be displayed.
> And the content for one link should be hidden, if the user clicks the other
> link.
>
> So please help me out, whether i could hide a particular instance based on a
> value in the xpl, as the content for each link is present in a particular
> instance. And the entire process will go in a single form.
>
>
>
>
> Regards
> Satya
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws