You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Michael Roth <mr...@ronin.matrix.tuwien.ac.at> on 2004/01/09 09:28:52 UTC
Woody READONLY Fields
I'm on my first project using the woody framework.
Till now I'm satiesfied with it, but there is a
big problem. I've to show a form and some of the fields
are read/write or read only depending on the role
of the user. How can I do this with Woody ?
Thanks a lot
Michael Roth
Michael Roth
Technische Universität Wien
Zentraler Informatik Dienst - Zentrale Services
Wiedner Hauptstraße 8-10, 1040 Wien
Tel.: 58801 42091 / Fax: 58801 42099
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Michael Roth <mr...@ronin.matrix.tuwien.ac.at>.
It works, thanks a lot!
Michael
At 11:26 09.01.2004 +0100, you wrote:
>It should be something like that ;) :
>
> <xsl:template match="wi:field[wi:styling[@type='read-only']]">
> <xsl:copy-of select="wi:value/node()"/>
> <input name="{@id}" title="{wi:help}" type="hidden" value="{@value}" >
> <xsl:copy-of select="wi:styling/@*[not(name() = 'type')]"/>
> <xsl:attribute name="value"><xsl:copy-of
> select="wi:value/node()"/></xsl:attribute>
> </input>
> </xsl:template>
>
>
>
>On 09/01/2004 11:05, Michael Roth wrote:
>
>>I feared that the only way to do this is to write a special template
>>by myself.
>>Thank you
>>At 10:49 09.01.2004 +0100, you wrote:
>>
>>>On 09/01/2004 10:31, Michael Roth wrote:
>>>
>>>>Hi Olivier,
>>>>Thats a good idea, but how do you solve the problem
>>>>that an output widget does not read its value from the
>>>>request ?
>>>
>>>
>>>The widget is still a field, not an output.
>>>The styling is only for rendering. But in fact, with a styling of type
>>>'output', no <input> will be generated and you'll have a binding error,
>>>or a null field (my bad).
>>>
>>>You must write a special template in woody-field-styling.xsl, for
>>>read-only fields (it may already exist now) that renders the value as
>>>text, and adds an hidden input for the binding.
>>>
>>>>Michael
>>>>
>>>>At 09:58 09.01.2004 +0100, you wrote:
>>>>
>>>>>Hi Michael,
>>>>>
>>>>>You can use the role to filter the wd:styling (@type='output' for a
>>>>>read-only rendering) :
>>>>>read-write : <wt:widget id="myWidget"/>
>>>>>read-only : <wt:widget id="myWidget"><wi:styling
>>>>>type="output"/></wt:widget>
>>>>>
>>>>>see woody-field-styling.xsl in the woody samples
>>>>>
>>>>>To do this, you can render your template file with an XSP.
>>>>>It works for me.
>>>>>
>>>>>--
>>>>>Olivier
>>>>>
>>>>>
>>>>>On 09/01/2004 09:28, Michael Roth wrote:
>>>>>
>>>>>>I'm on my first project using the woody framework.
>>>>>>Till now I'm satiesfied with it, but there is a
>>>>>>big problem. I've to show a form and some of the fields
>>>>>>are read/write or read only depending on the role
>>>>>>of the user. How can I do this with Woody ?
>>>>>>Thanks a lot
>>>>>>Michael Roth
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>>For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>Michael Roth
>>Technische Universität Wien
>>Zentraler Informatik Dienst - Zentrale Services
>>Wiedner Hauptstraße 8-10, 1040 Wien
>>Tel.: 58801 42091 / Fax: 58801 42099
>
>
>--
>Olivier BILLARD
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
Michael Roth
Technische Universität Wien
Zentraler Informatik Dienst - Zentrale Services
Wiedner Hauptstraße 8-10, 1040 Wien
Tel.: 58801 42091 / Fax: 58801 42099
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Olivier Billard <ob...@rennes.jouve.fr>.
It should be something like that ;) :
<xsl:template match="wi:field[wi:styling[@type='read-only']]">
<xsl:copy-of select="wi:value/node()"/>
<input name="{@id}" title="{wi:help}" type="hidden" value="{@value}" >
<xsl:copy-of select="wi:styling/@*[not(name() = 'type')]"/>
<xsl:attribute name="value"><xsl:copy-of select="wi:value/node()"/></xsl:attribute>
</input>
</xsl:template>
On 09/01/2004 11:05, Michael Roth wrote:
> I feared that the only way to do this is to write a special template
> by myself.
>
> Thank you
>
> At 10:49 09.01.2004 +0100, you wrote:
>
>> On 09/01/2004 10:31, Michael Roth wrote:
>>
>>> Hi Olivier,
>>> Thats a good idea, but how do you solve the problem
>>> that an output widget does not read its value from the
>>> request ?
>>
>>
>> The widget is still a field, not an output.
>> The styling is only for rendering. But in fact, with a styling of type
>> 'output', no <input> will be generated and you'll have a binding
>> error, or a null field (my bad).
>>
>> You must write a special template in woody-field-styling.xsl, for
>> read-only fields (it may already exist now) that renders the value as
>> text, and adds an hidden input for the binding.
>>
>>> Michael
>>>
>>> At 09:58 09.01.2004 +0100, you wrote:
>>>
>>>> Hi Michael,
>>>>
>>>> You can use the role to filter the wd:styling (@type='output' for a
>>>> read-only rendering) :
>>>> read-write : <wt:widget id="myWidget"/>
>>>> read-only : <wt:widget id="myWidget"><wi:styling
>>>> type="output"/></wt:widget>
>>>>
>>>> see woody-field-styling.xsl in the woody samples
>>>>
>>>> To do this, you can render your template file with an XSP.
>>>> It works for me.
>>>>
>>>> --
>>>> Olivier
>>>>
>>>>
>>>> On 09/01/2004 09:28, Michael Roth wrote:
>>>>
>>>>> I'm on my first project using the woody framework.
>>>>> Till now I'm satiesfied with it, but there is a
>>>>> big problem. I've to show a form and some of the fields
>>>>> are read/write or read only depending on the role
>>>>> of the user. How can I do this with Woody ?
>>>>> Thanks a lot
>>>>> Michael Roth
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
> Michael Roth
> Technische Universität Wien
> Zentraler Informatik Dienst - Zentrale Services
> Wiedner Hauptstraße 8-10, 1040 Wien
> Tel.: 58801 42091 / Fax: 58801 42099
--
Olivier BILLARD
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Michael Roth <mr...@ronin.matrix.tuwien.ac.at>.
I feared that the only way to do this is to write a special template
by myself.
Thank you
At 10:49 09.01.2004 +0100, you wrote:
>On 09/01/2004 10:31, Michael Roth wrote:
>
>>Hi Olivier,
>>Thats a good idea, but how do you solve the problem
>>that an output widget does not read its value from the
>>request ?
>
>The widget is still a field, not an output.
>The styling is only for rendering. But in fact, with a styling of type
>'output', no <input> will be generated and you'll have a binding error, or
>a null field (my bad).
>
>You must write a special template in woody-field-styling.xsl, for
>read-only fields (it may already exist now) that renders the value as
>text, and adds an hidden input for the binding.
>
>>Michael
>>
>>At 09:58 09.01.2004 +0100, you wrote:
>>
>>>Hi Michael,
>>>
>>>You can use the role to filter the wd:styling (@type='output' for a
>>>read-only rendering) :
>>>read-write : <wt:widget id="myWidget"/>
>>>read-only : <wt:widget id="myWidget"><wi:styling type="output"/></wt:widget>
>>>
>>>see woody-field-styling.xsl in the woody samples
>>>
>>>To do this, you can render your template file with an XSP.
>>>It works for me.
>>>
>>>--
>>>Olivier
>>>
>>>
>>>On 09/01/2004 09:28, Michael Roth wrote:
>>>
>>>>I'm on my first project using the woody framework.
>>>>Till now I'm satiesfied with it, but there is a
>>>>big problem. I've to show a form and some of the fields
>>>>are read/write or read only depending on the role
>>>>of the user. How can I do this with Woody ?
>>>>Thanks a lot
>>>>Michael Roth
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
Michael Roth
Technische Universität Wien
Zentraler Informatik Dienst - Zentrale Services
Wiedner Hauptstraße 8-10, 1040 Wien
Tel.: 58801 42091 / Fax: 58801 42099
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Olivier Billard <ob...@rennes.jouve.fr>.
On 09/01/2004 10:31, Michael Roth wrote:
> Hi Olivier,
>
> Thats a good idea, but how do you solve the problem
> that an output widget does not read its value from the
> request ?
The widget is still a field, not an output.
The styling is only for rendering. But in fact, with a styling of type 'output', no
<input> will be generated and you'll have a binding error, or a null field (my bad).
You must write a special template in woody-field-styling.xsl, for read-only fields (it may
already exist now) that renders the value as text, and adds an hidden input for the binding.
>
> Michael
>
>
> At 09:58 09.01.2004 +0100, you wrote:
>
>> Hi Michael,
>>
>> You can use the role to filter the wd:styling (@type='output' for a
>> read-only rendering) :
>> read-write : <wt:widget id="myWidget"/>
>> read-only : <wt:widget id="myWidget"><wi:styling
>> type="output"/></wt:widget>
>>
>> see woody-field-styling.xsl in the woody samples
>>
>> To do this, you can render your template file with an XSP.
>> It works for me.
>>
>> --
>> Olivier
>>
>>
>> On 09/01/2004 09:28, Michael Roth wrote:
>>
>>> I'm on my first project using the woody framework.
>>> Till now I'm satiesfied with it, but there is a
>>> big problem. I've to show a form and some of the fields
>>> are read/write or read only depending on the role
>>> of the user. How can I do this with Woody ?
>>> Thanks a lot
>>> Michael Roth
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Michael Roth <mr...@ronin.matrix.tuwien.ac.at>.
Hi Olivier,
Thats a good idea, but how do you solve the problem
that an output widget does not read its value from the
request ?
Michael
At 09:58 09.01.2004 +0100, you wrote:
>Hi Michael,
>
>You can use the role to filter the wd:styling (@type='output' for a
>read-only rendering) :
>read-write : <wt:widget id="myWidget"/>
>read-only : <wt:widget id="myWidget"><wi:styling type="output"/></wt:widget>
>
>see woody-field-styling.xsl in the woody samples
>
>To do this, you can render your template file with an XSP.
>It works for me.
>
>--
>Olivier
>
>
>On 09/01/2004 09:28, Michael Roth wrote:
>
>>I'm on my first project using the woody framework.
>>Till now I'm satiesfied with it, but there is a
>>big problem. I've to show a form and some of the fields
>>are read/write or read only depending on the role
>>of the user. How can I do this with Woody ?
>>Thanks a lot
>>Michael Roth
>>
>>Michael Roth
>>Technische Universität Wien
>>Zentraler Informatik Dienst - Zentrale Services
>>Wiedner Hauptstraße 8-10, 1040 Wien
>>Tel.: 58801 42091 / Fax: 58801 42099
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
Michael Roth
Technische Universität Wien
Zentraler Informatik Dienst - Zentrale Services
Wiedner Hauptstraße 8-10, 1040 Wien
Tel.: 58801 42091 / Fax: 58801 42099
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Jan Hoskens <jh...@schaubroeck.be>.
Hi,
A while ago, I had a similar problem of handling a directory of files with
some of them, created by a user, could be changed, and others (original,
deployed by administrator) cannot. As Marc (mpo@outerthought.org) pointed me
out, you can handle very much with your flow containing the woody stuff. As
an example: you can pass your role as a parameter to your flow and select a
different pipeline (woody template)/ definition or binding based on that
parameter. (In my case I can check an attribute in my data file before
selecting the appropriate woody stuff./ still working on it though;-)
Sounds helpfull?
Bye,
Jan
----- Original Message -----
From: "Olivier Billard" <ob...@rennes.jouve.fr>
To: <us...@cocoon.apache.org>
Sent: Friday, January 09, 2004 9:58 AM
Subject: Re: Woody READONLY Fields
> Hi Michael,
>
> You can use the role to filter the wd:styling (@type='output' for a
read-only rendering) :
> read-write : <wt:widget id="myWidget"/>
> read-only : <wt:widget id="myWidget"><wi:styling
type="output"/></wt:widget>
>
> see woody-field-styling.xsl in the woody samples
>
> To do this, you can render your template file with an XSP.
> It works for me.
>
> --
> Olivier
>
>
> On 09/01/2004 09:28, Michael Roth wrote:
>
> > I'm on my first project using the woody framework.
> > Till now I'm satiesfied with it, but there is a
> > big problem. I've to show a form and some of the fields
> > are read/write or read only depending on the role
> > of the user. How can I do this with Woody ?
> >
> > Thanks a lot
> >
> > Michael Roth
> >
> >
> > Michael Roth
> > Technische Universität Wien
> > Zentraler Informatik Dienst - Zentrale Services
> > Wiedner Hauptstraße 8-10, 1040 Wien
> > Tel.: 58801 42091 / Fax: 58801 42099
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Olivier Billard <ob...@rennes.jouve.fr>.
On 09/01/2004 11:29, Reinhard Poetz wrote:
> From: Olivier Billard
>
>
>>Hi Michael,
>>
>>You can use the role to filter the wd:styling (@type='output'
>>for a read-only rendering) : read-write : <wt:widget
>>id="myWidget"/> read-only : <wt:widget
>>id="myWidget"><wi:styling type="output"/></wt:widget>
>>
>>see woody-field-styling.xsl in the woody samples
>>
>>To do this, you can render your template file with an XSP.
>>It works for me.
>
>
> Or even better you can use the JXTemplateGenerator.
I definitly must have a look at it :)
--
Olivier BILLARD
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Woody READONLY Fields
Posted by Reinhard Poetz <re...@apache.org>.
From: Olivier Billard
> Hi Michael,
>
> You can use the role to filter the wd:styling (@type='output'
> for a read-only rendering) : read-write : <wt:widget
> id="myWidget"/> read-only : <wt:widget
> id="myWidget"><wi:styling type="output"/></wt:widget>
>
> see woody-field-styling.xsl in the woody samples
>
> To do this, you can render your template file with an XSP.
> It works for me.
Or even better you can use the JXTemplateGenerator.
--
Reinhard
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Woody READONLY Fields
Posted by Olivier Billard <ob...@rennes.jouve.fr>.
Hi Michael,
You can use the role to filter the wd:styling (@type='output' for a read-only rendering) :
read-write : <wt:widget id="myWidget"/>
read-only : <wt:widget id="myWidget"><wi:styling type="output"/></wt:widget>
see woody-field-styling.xsl in the woody samples
To do this, you can render your template file with an XSP.
It works for me.
--
Olivier
On 09/01/2004 09:28, Michael Roth wrote:
> I'm on my first project using the woody framework.
> Till now I'm satiesfied with it, but there is a
> big problem. I've to show a form and some of the fields
> are read/write or read only depending on the role
> of the user. How can I do this with Woody ?
>
> Thanks a lot
>
> Michael Roth
>
>
> Michael Roth
> Technische Universität Wien
> Zentraler Informatik Dienst - Zentrale Services
> Wiedner Hauptstraße 8-10, 1040 Wien
> Tel.: 58801 42091 / Fax: 58801 42099
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org