Display different controls

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

Display different controls

AlexandreP
Hi list,

I have a single list box with values. When a user choose a value, I want
to display some controls.
The controls are different if the user choose the first or the second value.
I think use some includes to do it.
Is it possible to do it ?

Regards,


--
Alexandre





--
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
Reply | Threaded
Open this post in threaded view
|

Re: Display different controls

Hank Ratzesberger
Hi Alexander,

On Jul 20, 2009, at 6:11 AM, Alexandre PIASER wrote:

> Hi list,
>
> I have a single list box with values. When a user choose a value, I  
> want to display some controls.
> The controls are different if the user choose the first or the  
> second value.
> I think use some includes to do it.
> Is it possible to do it ?

Have thought about using the case/switch elements?

Along with action and toggle elements, there is surely a way
to view/hide various controls.  Controls bound to instances
that are not relevant are also not visible.

HTH,
Hank

>
> Regards,
>
>
> --
> Alexandre
>
>
>
>
> --
> 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
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Display different controls

AlexandreP
Thanks,
I tried the case/switch elements with my single list without success.
Have you got an example ?
I'm not an expert in xforms so it's possible that it's me the problem ...
I succeed to display the right controls in terms of the user's choice in
the list but I have some blank in the page because I used <tr><td> to
align my controls. The wrong controls are not visible but the browser
displays the empty<tr><td> .
That is the reason why I try to find an another solution.

    <tr>
        <td>
            <xforms:select1 ref="Referentiels/Parametre/TypeParametre"
appearance="minimal">
                <xforms:label class="PAR-label">
                    <xsl:text>Nature du paramètre</xsl:text>
                </xforms:label>
                <xforms:itemset
nodeset="instance('xsd-instance')//xs:simpleType[@name =
'TypeParametre']//xs:enumeration">
                    <xforms:label ref="@value"/>
                    <xforms:value ref="@value"/>
                </xforms:itemset>
                <xforms:refresh ev:event="xforms-value-changed"/>
                ...
            </xforms:select1>
        </td>
    </tr>
    <tr>
        <td><!-- input1  -->
             <xforms:input ...
             </xforms:input>
        </td>
    </tr>
        <td><!-- input2  -->
             <xforms:input ...
             </xforms:input>
        </td>
    </tr>
        <td><!-- input3  -->
             <xforms:input ...
             </xforms:input>
        </td>
    </tr>
.....


Alex

Hank Ratzesberger a écrit :

> Hi Alexander,
>
> On Jul 20, 2009, at 6:11 AM, Alexandre PIASER wrote:
>
>> Hi list,
>>
>> I have a single list box with values. When a user choose a value, I
>> want to display some controls.
>> The controls are different if the user choose the first or the second
>> value.
>> I think use some includes to do it.
>> Is it possible to do it ?
>
> Have thought about using the case/switch elements?
>
> Along with action and toggle elements, there is surely a way
> to view/hide various controls.  Controls bound to instances
> that are not relevant are also not visible.
>
> HTH,
> Hank
>
>>
>> Regards,
>>
>>
>> --
>> Alexandre
>>
>>
>>
>>
>> --
>> 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
>
> Hank Ratzesberger
> NEES@UCSB
> Institute for Crustal Studies,
> University of California, Santa Barbara
> 805-893-8042
>
>
>
>
>



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Display different controls

Alessandro Vernet
Administrator
Alex,

AlexandreP wrote
I tried the case/switch elements with my single list without success.
Have you got an example ?
I'm not an expert in xforms so it's possible that it's me the problem ...
I succeed to display the right controls in terms of the user's choice in
the list but I have some blank in the page because I used
 to
align my controls. The wrong controls are not visible but the browser
displays the empty
 .
That is the reason why I try to find an another solution. Could you create a simple/minimal example that shows the problem you have and that we can run in the XForms sandbox? It will be easier for us to figure out if this is a a problem with Orbeon Forms or with the example.

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Display different controls

AlexandreP
Hello,

    Sorry for the late but I was very busy.
    I made an simple example to show my problem.


Thanks for your help.

Alex



Alessandro Vernet a écrit :

> Alex,
>
>
> AlexandreP wrote:
>  
>> I tried the case/switch elements with my single list without success.
>> Have you got an example ?
>> I'm not an expert in xforms so it's possible that it's me the problem ...
>> I succeed to display the right controls in terms of the user's choice in
>> the list but I have some blank in the page because I used <tr><td> to
>> align my controls. The wrong controls are not visible but the browser
>> displays the empty<tr><td> .
>> That is the reason why I try to find an another solution.
>>
>>    
>
> Could you create a simple/minimal example that shows the problem you have
> and that we can run in the XForms sandbox? It will be easier for us to
> figure out if this is a a problem with Orbeon Forms or with the example.
>
> Alex
>
> -----
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet
>  


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

example.tar (13K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Display different controls

Alessandro Vernet
Administrator
Alex,

On Tue, Oct 6, 2009 at 3:01 AM, Alexandre PIASER <[hidden email]> wrote:
>   Sorry for the late but I was very busy.
>   I made an simple example to show my problem.

Not that your example was wrong, but it was over complicated. Here is
the code updated to use the <xforms:group ref=".[condition]"> to hide
content.

Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
My Twitter: http://twitter.com/avernet


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