xhtml:readonly attrbute in xforms:item?

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

xhtml:readonly attrbute in xforms:item?

Pascal Heus
The item elements in the form below is translated into the following HTML:

<span readonly="readonly"><input type="checkbox" name="xforms-element-29" value="use-case">Use Case</span>

I would actually like the readonly attribute to apply to the <input> element, not the <span>
Any suggestion?
Also, this does not seem to take place though in the xforms-to-html.xsl, where/when are the <span> inserted?
*P

<xforms:select ref="keywords" appearance="full" style="font-size:8pt;">
   <xforms:label class="label">Classification</xforms:label>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>use-case</xforms:value>
      <xforms:label>Use Case</xforms:label>
   </xforms:item>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>example</xforms:value>
      <xforms:label>Example</xforms:label>
   </xforms:item>
</xforms:select>



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xhtml:readonly attrbute in xforms:item?

Adrian Baker-2
Hi Pascal,

The span is created in Java (XFormsToXHTML), rather than a XSLT. However, theme.xsl gets run over the output of this process, so you could try intercepting the readonly attribute here and moving it down to the checkbox.

But because the generated html structure can change it's a fairly fragile solution. I suppose though it's only a workaround until you can bind an item to a readonly node in the instance data?

Adrian

Pascal Heus wrote:
The item elements in the form below is translated into the following HTML:

<span readonly="readonly"><input type="checkbox" name="xforms-element-29" value="use-case">Use Case</span>

I would actually like the readonly attribute to apply to the <input> element, not the <span>
Any suggestion?
Also, this does not seem to take place though in the xforms-to-html.xsl, where/when are the <span> inserted?
*P

<xforms:select ref="keywords" appearance="full" style="font-size:8pt;">
   <xforms:label class="label">Classification</xforms:label>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>use-case</xforms:value>
      <xforms:label>Use Case</xforms:label>
   </xforms:item>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>example</xforms:value>
      <xforms:label>Example</xforms:label>
   </xforms:item>
</xforms:select>


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: xhtml:readonly attrbute in xforms:item?

Ryan Puddephatt

Pascal,

            Why not put a <xforms:bind ref=”keyword” readonly=”true()”/>

 

This will make all the items read only in that select

 

Hope this helps

 

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

 

* [hidden email]

( 01506 407 110

7  01506 407 108

 


From: Adrian Baker [mailto:[hidden email]]
Sent: 16 May 2006 22:38
To: [hidden email]
Subject: Re: [ops-users] xhtml:readonly attrbute in xforms:item?

 

Hi Pascal,

The span is created in Java (XFormsToXHTML), rather than a XSLT. However, theme.xsl gets run over the output of this process, so you could try intercepting the readonly attribute here and moving it down to the checkbox.

But because the generated html structure can change it's a fairly fragile solution. I suppose though it's only a workaround until you can bind an item to a readonly node in the instance data?

Adrian

Pascal Heus wrote:

The item elements in the form below is translated into the following HTML:

<span
readonly="readonly"><input type="checkbox" name="xforms-element-29" value="use-case">Use Case</span>

I would actually like the readonly attribute to apply to the <input> element, not the <span>
Any suggestion?
Also, this does not seem to take place though in the xforms-to-html.xsl, where/when are the <span> inserted?
*P

<xforms:select ref="keywords" appearance="full" style="font-size:8pt;">
   <xforms:label class="label">Classification</xforms:label>
  
<xforms:item xhtml:readonly="readonly">
      <xforms:value>use-case</xforms:value>
      <xforms:label>Use Case</xforms:label>
   </xforms:item>
  
<xforms:item xhtml:readonly="readonly">
      <xforms:value>example</xforms:value>
      <xforms:label>Example</xforms:label>
   </xforms:item>
</xforms:select>



 



 
 
--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xhtml:readonly attrbute in xforms:item?

Pascal Heus
In reply to this post by Adrian Baker-2
Adrian, Ryan,
the main reason I'm avoiding the bind with readonly comes from the impossibility to change the default gray color that IE applies to all disabled elements (see previous posts on "disabled element text color in IE"). I've been trying to find various workarounds for the past couple of weeks.... the readonly works on textarea but not on input or select elements. Not sure it can be set through CSS in which case I could style or class instead (?)
thanks
*P

Adrian Baker wrote:
Hi Pascal,

The span is created in Java (XFormsToXHTML), rather than a XSLT. However, theme.xsl gets run over the output of this process, so you could try intercepting the readonly attribute here and moving it down to the checkbox.

But because the generated html structure can change it's a fairly fragile solution. I suppose though it's only a workaround until you can bind an item to a readonly node in the instance data?

Adrian

Pascal Heus wrote:
The item elements in the form below is translated into the following HTML:

<span readonly="readonly"><input type="checkbox" name="xforms-element-29" value="use-case">Use Case</span>

I would actually like the readonly attribute to apply to the <input> element, not the <span>
Any suggestion?
Also, this does not seem to take place though in the xforms-to-html.xsl, where/when are the <span> inserted?
*P

<xforms:select ref="keywords" appearance="full" style="font-size:8pt;">
   <xforms:label class="label">Classification</xforms:label>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>use-case</xforms:value>
      <xforms:label>Use Case</xforms:label>
   </xforms:item>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>example</xforms:value>
      <xforms:label>Example</xforms:label>
   </xforms:item>
</xforms:select>


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


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xhtml:readonly attrbute in xforms:item?

Erik Bruchez
Administrator
If you use a class on the xforms:input, then it will end up on the span.
Then you can style the input with:

.my-class input { ... style ... }

-Erik

Pascal Heus wrote:

> Adrian, Ryan,
> the main reason I'm avoiding the bind with readonly comes from the
> impossibility to change the default gray color that IE applies to all
> disabled elements (see previous posts on "disabled element text color in
> IE"). I've been trying to find various workarounds for the past couple
> of weeks.... the readonly works on textarea but not on input or select
> elements. Not sure it can be set through CSS in which case I could style
> or class instead (?)
> thanks
> *P
>
> Adrian Baker wrote:
>> Hi Pascal,
>>
>> The span is created in Java (XFormsToXHTML), rather than a XSLT.
>> However, theme.xsl gets run over the output of this process, so you
>> could try intercepting the readonly attribute here and moving it down
>> to the checkbox.
>>
>> But because the generated html structure can change it's a fairly
>> fragile solution. I suppose though it's only a workaround until you
>> can bind an item to a readonly node in the instance data?
>>
>> Adrian
>>
>> Pascal Heus wrote:
>>> The item elements in the form below is translated into the following
>>> HTML:
>>>
>>> <span *readonly="readonly"*><input type="checkbox"
>>> name="xforms-element-29" value="use-case">Use Case</span>
>>>
>>> I would actually like the readonly attribute to apply to the <input>
>>> element, not the <span>
>>> Any suggestion?
>>> Also, this does not seem to take place though in the
>>> xforms-to-html.xsl, where/when are the <span> inserted?
>>> *P
>>>
>>> <xforms:select ref="keywords" appearance="full" style="font-size:8pt;">
>>>    <xforms:label class="label">Classification</xforms:label>
>>>    *<xforms:item xhtml:readonly="readonly">*
>>>       <xforms:value>use-case</xforms:value>
>>>       <xforms:label>Use Case</xforms:label>
>>>    </xforms:item>
>>>    *<xforms:item xhtml:readonly="readonly">*
>>>       <xforms:value>example</xforms:value>
>>>       <xforms:label>Example</xforms:label>
>>>    </xforms:item>
>>> </xforms:select>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> --
>>> 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
>>> ObjectWeb mailing lists service home page: http://www.objectweb.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
>> ObjectWeb mailing lists service home page: http://www.objectweb.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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xhtml:readonly attrbute in xforms:item?

Alessandro  Vernet
Administrator
In reply to this post by Pascal Heus
On 5/16/06, Pascal Heus <[hidden email]> wrote:
>  <span readonly="readonly"><input type="checkbox" name="xforms-element-29"
> value="use-case">Use Case</span>

Pascal,

How are you getting a readonly="readonly" on a <span>? That is not
valid HTML, and I don't think we should generate that. I tried to
reproduce this with an <xforms:select>, but I get a
disabled="disabled" in the generated HTML, as expected.

Alex
--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: xhtml:readonly attrbute in xforms:item?

Pascal Heus
Alex:
See code below. I basically want to use readonly to avoid IE graying the element and the label (for text input).
Do you yo uif readonly can be set using a CSS style/class?
thanks
*P

<xforms:select ref="keywords" appearance="full" style="font-size:8pt;">
   <xforms:label class="label">Classification</xforms:label>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>use-case</xforms:value>
      <xforms:label>Use Case</xforms:label>
   </xforms:item>
   <xforms:item xhtml:readonly="readonly">
      <xforms:value>example</xforms:value>
      <xforms:label>Example</xforms:label>
   </xforms:item>
</xforms:select>
Alessandro Vernet wrote:
On 5/16/06, Pascal Heus [hidden email] wrote:
 <span readonly="readonly"><input type="checkbox" name="xforms-element-29"
value="use-case">Use Case</span>

Pascal,

How are you getting a readonly="readonly" on a <span>? That is not
valid HTML, and I don't think we should generate that. I tried to
reproduce this with an <xforms:select>, but I get a
disabled="disabled" in the generated HTML, as expected.

Alex

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: xhtml:readonly attrbute in xforms:item?

Alessandro  Vernet
Administrator
Pascal,

OK, I see: you have the readonly="readonly" in the <xforms:item>. I
thought it was generated independently by PresentationServer. This
means that this attribute is copied on the generated span that
contains the checkbox and the label. Firefox doesn't do anything with
it, as it is not valid to have a readonly="readonly" on a span. IE
still decides to do something with that readonly="readonly" even it
this is not valid HTML and greys the content.

Now I think you should just avoid putting that readonly="readonly" on
the <xforms:item>, so you don't have invalid HTML sent to the browser.
What about just making the node to which the <xforms:select> is bound
readonly with an <xforms:bind>?

Alex

On 5/19/06, Pascal Heus <[hidden email]> wrote:

>
>  Alex:
>  See code below. I basically want to use readonly to avoid IE graying the
> element and the label (for text input).
>  Do you yo uif readonly can be set using a CSS style/class?
>  thanks
>
>  *P
>
>  <xforms:select ref="keywords" appearance="full" style="font-size:8pt;">
>     <xforms:label
> class="label">Classification</xforms:label>
>     <xforms:item xhtml:readonly="readonly">
>        <xforms:value>use-case</xforms:value>
>        <xforms:label>Use Case</xforms:label>
>     </xforms:item>
>     <xforms:item xhtml:readonly="readonly">
>        <xforms:value>example</xforms:value>
>        <xforms:label>Example</xforms:label>
>     </xforms:item>
>  </xforms:select>
>  Alessandro Vernet wrote:
> On 5/16/06, Pascal Heus <[hidden email]> wrote:
>
>  <span readonly="readonly"><input type="checkbox" name="xforms-element-29"
>  value="use-case">Use Case</span>
>
>  Pascal,
>
>  How are you getting a readonly="readonly" on a <span>? That is not
>  valid HTML, and I don't think we should generate that. I tried to
>  reproduce this with an <xforms:select>, but I get a
>  disabled="disabled" in the generated HTML, as expected.
>
>  Alex
>
> ________________________________
>
>  -- 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 ObjectWeb
> mailing lists service home page: http://www.objectweb.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
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Blog (XML, Web apps, Open Source):
http://www.orbeon.com/blog/



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet