cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Linden H van der (MI)" <H.vanderLin...@MI.unimaas.nl>
Subject RE: CONTRIBUTION: forms-calendar-styling defect when widget disabled
Date Tue, 15 Mar 2005 23:13:10 GMT
Sylvain,

I think he means that adding "readonly='readonly'" as attribute to his
own <fi:styling> tag is passed through the styling XSL files. IIRC there
is a template that deals with extra attributes in the styling tag.

HTH.

Bye, Helma


> -----Original Message-----
> From: Sylvain Wallez [mailto:sylvain@apache.org] 
> Sent: Tuesday, 15 March 2005 23:33
> To: dev@cocoon.apache.org; depub2@mxsi.com
> Subject: Re: CONTRIBUTION: forms-calendar-styling defect when 
> widget disabled
> 
> 
> depub2 wrote:
> 
> >
> > 
> >
> >     Well actually, the readonly="readonly" works! Try it!!! 
> And there
> >     are some cases where disabled="disabled" is problematic
> >     (binding/saving) and I think something else I can't 
> remember right
> >     now (pulldown selections? calendar selections? - can't 
> remember).
> >     (note {at-symbol} above must be translated to @ - seems that
> >     symbol is not allowed on the archives.) 
> >
> >
> >
> > Sorry, but I really don't know what you're talking about. Is this 
> > 'readonly' in the binding? If so, what's the relation with 
> the styling 
> > XSLs??
> >  
> > It is in the template file, <fi:styling> tag. I believe that 
> > readonly="readonly" simply gets passed along as an attribute to the 
> > "input" tag and is valid xhtml which the browser then 
> interprets to be 
> > like disabled="disabled", but slightly different. Here's an 
> example usage:
> >  
> > <ft:widget id="StatusMessage">
> >   <fi:styling readonly="readonly" type="textarea" rows="4" 
> cols="75" 
> > wrap="hard"
> >  class="DocOrdersStatusMessage"/>
> > </ft:widget>
> 
> 
> Again, I can't find it. If the forms/samples directory:
> $ find . -type f | xargs grep readonly
> ./forms/binding/01value-bind.xml:  <fb:value id="readonly"  
> ./forms/binding/01value-def.xml:    <fd:field id="readonly" >
> 
> The only "readonly" in the whole CForms samples (which 
> include the XSLs) 
> is the name of a widget.
> 
> Can you please give me the URL of the relevant file under 
> http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/s
rc/blocks/forms/
 

> Anyway, inserting that small code segment in the source (see below) 
> and then playing with the samples to disable the calendar widget will 
> show you what I mean - and try readonly as a styling attribute to see 
> that at work too. Then try disabling the calendar without my 
> modifications and you'll notice that the date can be changed, even 
> though the widget is disabled.


Again and again, there is no such "readonly" attribute. You can set the 
state of a widget to "disabled" which leads to something similar to what

you describe: the input is readonly, and the calendar icon is still 
visible but disabled.

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://apache.org/~sylvain            http://anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message