eliminating white space when controls within <xf:group> are hidden

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

eliminating white space when controls within <xf:group> are hidden

Philip.Cantin
Hi All,

I've been using <xf:group> to hide controls based on certain criteria. However, Orbeon seems to make the control just disappear and nothing else, rather than disappear and having the rest of the form shift upwards. In other words, I'd like to eliminate the white space that a hidden control within <xf:group> leaves behind.

Is this possible with a minor CSS change, or is there more to it?


Thanks in advance!


---Philip
Reply | Threaded
Open this post in threaded view
|

Re: eliminating white space when controls within <xf:group> are hidden

Philip.Cantin
And for clarification, I'm using the ref attribute within xf:group to hide the controls; for example:

<xf:group ref=".[count(idinfo) = 4]">
...
</xf:group>


---Philip
Reply | Threaded
Open this post in threaded view
|

Re: eliminating white space when controls within <xf:group> are hidden

Philip.Cantin
Aha! Found the answer.

Looking at this portion of the Orbeon wiki page:

http://wiki.orbeon.com/forms/doc/contributor-guide/xforms-switch-case


it appears all that's needed is a simple


.xforms-group .xforms-disabled { display: none }


within the <style> tag.



---Philip
Reply | Threaded
Open this post in threaded view
|

Re: Re: eliminating white space when controls within <xf:group> are hidden

Eric van der Vlist
Philip,

Le jeudi 18 juin 2009 à 10:38 -0700, Philip.Cantin a écrit :

> Aha! Found the answer.
>
> Looking at this portion of the Orbeon wiki page:
>
> http://wiki.orbeon.com/forms/doc/contributor-guide/xforms-switch-case
>
>
> it appears all that's needed is a simple
>
>
> .xforms-group .xforms-disabled { display: none }
Unfortunately, display:none causes a lot of issues to components (the
major one being that JavaScript can't determine the geometry of elements
which are not displayed) and we had to replace display:none by:

.xforms-disabled {
    top: -10000px;
    left: -10000px;
    visibility: hidden;
    position: absolute;
}

This rule should be enough to eliminate disabled controls from the
display, whether the disabled controls are in an xforms:group or not.

Doesn't it work for you?

Hope this helps,

Eric

> within the <style> tag.
>
>
>
> ---Philip



--
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: eliminating white space when controls within <xf:group> are hidden

Philip.Cantin
You're right, Eric; after moving to Orbeon 3.7.1 (Developer's Release), it seems to be working fine in Mozilla 3.0.11 without the extra CSS. I was using an old nightly build previously.


---Philip
Reply | Threaded
Open this post in threaded view
|

Re: Re: eliminating white space when controls within <xf:group> are hidden

Alessandro Vernet
Administrator
Philip,

Philip.Cantin wrote
You're right, Eric; after moving to Orbeon 3.7.1 (Developer's Release), it seems to be working fine in Mozilla 3.0.11 without the extra CSS. I was using an old nightly build previously.
I am glad to read this. We made quite a few changes recently to the CSS used for hidden cases and hidden groups, so they would work on different browsers and in a number of different situations. So I am glad the latest release works for you.

Alex