Images in labels in select1

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

Images in labels in select1

Stephanie Hall (TT)

Hi all,

 

I know currently images in labels for the different select1 options is currently broken.  Does anyone know a way around this?  I’d like to do something like:

 

<xforms:select1 ref="state" appearance="full" id="stateSelector">

      <xforms:item>

            <xforms:label><img src=”../images/gray.gif”/></xforms:label>

            <xforms:value value="gray"/>

      </xforms:item>

      <xforms:item>

            <xforms:label><img src=”../images/red.gif”/></xforms:label>

            <xforms:value value="red"/>

      </xforms:item>

      …

</xforms:select1>

 

Also, is there any timeframe in which this might be supported?  It seems a pretty basic thing to be missing…

 

Thanks,

Stephanie



--
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: Images in labels in select1

fl.schmitt(ops-users)
Stephanie,

> I know currently images in labels for the different select1 options is
> currently broken.  Does anyone know a way around this?

maybe it works with a xhtml:span and a background img using css:

<xf:label><xhtml:span style="background-image:url(background2.gif);
margin:0px; padding:10px" /></xf:label>

(but i didn't test that...)

HTH
florian


--
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: Images in labels in select1

Stephanie Hall (TT)
Hi Florian,

Thank you for your example. The exception is that HTML and XForms is not allowed in the <xforms:label> element, so I don't think what you are proposing will work.  BUT, maybe if I apply the style you suggested to the <xforms:label> element itself, that might work.  I will try it and let you know. Thanks!

Stephanie

-----Original Message-----
From: Florian Schmitt [mailto:[hidden email]] On Behalf Of Florian Schmitt
Sent: Thursday, October 14, 2010 12:48 PM
To: [hidden email]
Subject: [ops-users] Re: Images in labels in select1

Stephanie,

> I know currently images in labels for the different select1 options is
> currently broken.  Does anyone know a way around this?

maybe it works with a xhtml:span and a background img using css:

<xf:label><xhtml:span style="background-image:url(background2.gif);
margin:0px; padding:10px" /></xf:label>

(but i didn't test that...)

HTH
florian


--
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: Images in labels in select1

Erik Bruchez
Administrator
In reply to this post by Stephanie Hall (TT)
Stephanie,

We have an RFE for this:

http://forge.ow2.org/tracker/index.php?func=detail&aid=313231&group_id=168&atid=350207

No particular timeframe at this time. Agreed it would be good!

Part of the solution would be here:

http://github.com/orbeon/orbeon-forms/blob/master/src/java/org/orbeon/oxf/xforms/itemset/XFormsItemUtils.java

XFormsUtils.getChildElementValue() is passed false to indicate that
HTML is not supported. This should be set to true if the control is
appearance full. Then the HTML must properly be output in the handler:

http://github.com/orbeon/orbeon-forms/blob/master/src/java/org/orbeon/oxf/xforms/processor/handlers/XFormsSelect1Handler.java

Then there are itemset updates between the client and server to handle as well.

-Erik

On Thu, Oct 14, 2010 at 7:46 AM, Stephanie Hall (TT)
<[hidden email]> wrote:

> Hi all,
>
>
>
> I know currently images in labels for the different select1 options is
> currently broken.  Does anyone know a way around this?  I’d like to do
> something like:
>
>
>
> <xforms:select1 ref="state" appearance="full" id="stateSelector">
>
>       <xforms:item>
>
>             <xforms:label><img src=”../images/gray.gif”/></xforms:label>
>
>             <xforms:value value="gray"/>
>
>       </xforms:item>
>
>       <xforms:item>
>
>             <xforms:label><img src=”../images/red.gif”/></xforms:label>
>
>             <xforms:value value="red"/>
>
>       </xforms:item>
>
>       …
>
> </xforms:select1>
>
>
>
> Also, is there any timeframe in which this might be supported?  It seems a
> pretty basic thing to be missing…
>
>
>
> Thanks,
>
> Stephanie
>
> --
> 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