You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Vasyl Stashuk <va...@acm.org> on 2004/03/03 12:51:32 UTC

wd:output and wd:selection-list

Hi all!

I'm trying to use wd:selection-list inside of wd:output:

                <wd:output id="state">
                    <wd:label>state</wd:label>
                    <wd:datatype base="long"/>
                    <wd:selection-list>
                        <wd:item value="1">
                            <wd:label>Finished</wd:label>
                        </wd:item>
                        <wd:item value="2">
                            <wd:label>Running</wd:label>
                        </wd:item>
                        <wd:item value="3">
                            <wd:label>Paused</wd:label>
                        </wd:item>
                        <wd:item value="3">
                            <wd:label>Not runned</wd:label>
                        </wd:item>
                    </wd:selection-list>
                </wd:output>

but in output i see only values and not labels.

What am i doing wrong?

regards,
vasyas

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: wd:output and wd:selection-list

Posted by Vasyl Stashuk <va...@acm.org>.
That's exactly what i will do.

Many thanks for irrefragable answer,
vasyas.

Jan Hoskens wrote:

>Change the woody-field-styling XSLT sheet: find the wi:field stuff and add
>your styling.
>
>Or just add a <wi:styling readonly="true"/>, that will set the input field
>on readonly.
>
>If your value comes from data, you can also set a javascript in your binding
>file:
><wb:javascript id="state" path="pathToStateAttr"direction="load">
>    <wb:load-form>
>        if (jxpathPointer.getValue() == "1")
>        {
>            widget.setValue="Finished";
>        }
>    </wb:load-form>
></wb:javascript>
>
>
>Kind Regards,
>Jan
>
>
>----- Original Message ----- 
>From: "Vasyl Stashuk" <va...@acm.org>
>To: <us...@cocoon.apache.org>
>Sent: Wednesday, March 03, 2004 1:23 PM
>Subject: Re: wd:output and wd:selection-list
>
>
>  
>
>>But what do i do if i just want to show user some string based on value?
>>
>>wbr,
>>vasyas
>>
>>Jan Hoskens wrote:
>>
>>    
>>
>>>You're using an output widget, that just writes text, you need the
>>>"wd:field" widget to be able to use the selection list.
>>>
>>>Kind Regards,
>>>Jan
>>>
>>>----- Original Message ----- 
>>>From: "Vasyl Stashuk" <va...@acm.org>
>>>To: <us...@cocoon.apache.org>
>>>Sent: Wednesday, March 03, 2004 12:51 PM
>>>Subject: wd:output and wd:selection-list
>>>
>>>
>>>
>>>      
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>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: wd:output and wd:selection-list

Posted by Jan Hoskens <jh...@schaubroeck.be>.
Change the woody-field-styling XSLT sheet: find the wi:field stuff and add
your styling.

Or just add a <wi:styling readonly="true"/>, that will set the input field
on readonly.

If your value comes from data, you can also set a javascript in your binding
file:
<wb:javascript id="state" path="pathToStateAttr"direction="load">
    <wb:load-form>
        if (jxpathPointer.getValue() == "1")
        {
            widget.setValue="Finished";
        }
    </wb:load-form>
</wb:javascript>


Kind Regards,
Jan


----- Original Message ----- 
From: "Vasyl Stashuk" <va...@acm.org>
To: <us...@cocoon.apache.org>
Sent: Wednesday, March 03, 2004 1:23 PM
Subject: Re: wd:output and wd:selection-list


> But what do i do if i just want to show user some string based on value?
>
> wbr,
> vasyas
>
> Jan Hoskens wrote:
>
> >You're using an output widget, that just writes text, you need the
> >"wd:field" widget to be able to use the selection list.
> >
> >Kind Regards,
> >Jan
> >
> >----- Original Message ----- 
> >From: "Vasyl Stashuk" <va...@acm.org>
> >To: <us...@cocoon.apache.org>
> >Sent: Wednesday, March 03, 2004 12:51 PM
> >Subject: wd:output and wd:selection-list
> >
> >
> >
> >
> >>Hi all!
> >>
> >>I'm trying to use wd:selection-list inside of wd:output:
> >>
> >>                <wd:output id="state">
> >>                    <wd:label>state</wd:label>
> >>                    <wd:datatype base="long"/>
> >>                    <wd:selection-list>
> >>                        <wd:item value="1">
> >>                            <wd:label>Finished</wd:label>
> >>                        </wd:item>
> >>                        <wd:item value="2">
> >>                            <wd:label>Running</wd:label>
> >>                        </wd:item>
> >>                        <wd:item value="3">
> >>                            <wd:label>Paused</wd:label>
> >>                        </wd:item>
> >>                        <wd:item value="3">
> >>                            <wd:label>Not runned</wd:label>
> >>                        </wd:item>
> >>                    </wd:selection-list>
> >>                </wd:output>
> >>
> >>but in output i see only values and not labels.
> >>
> >>What am i doing wrong?
> >>
> >>regards,
> >>vasyas
> >>
> >>---------------------------------------------------------------------
> >>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
> >
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> 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: wd:output and wd:selection-list

Posted by Jaroslav Kuruc <ku...@fiit.stuba.sk>.
use Field widget and in template use
<wt:widget id="something"><wi:styling type="output"/></wt:widget>

Vasyl Stashuk wrote:
> But what do i do if i just want to show user some string based on value?
> 
> wbr,
> vasyas
> 
> Jan Hoskens wrote:
> 
>> You're using an output widget, that just writes text, you need the
>> "wd:field" widget to be able to use the selection list.
>>
>> Kind Regards,
>> Jan
>>
>> ----- Original Message ----- From: "Vasyl Stashuk" <va...@acm.org>
>> To: <us...@cocoon.apache.org>
>> Sent: Wednesday, March 03, 2004 12:51 PM
>> Subject: wd:output and wd:selection-list
>>
>>
>>  
>>
>>> Hi all!
>>>
>>> I'm trying to use wd:selection-list inside of wd:output:
>>>
>>>                <wd:output id="state">
>>>                    <wd:label>state</wd:label>
>>>                    <wd:datatype base="long"/>
>>>                    <wd:selection-list>
>>>                        <wd:item value="1">
>>>                            <wd:label>Finished</wd:label>
>>>                        </wd:item>
>>>                        <wd:item value="2">
>>>                            <wd:label>Running</wd:label>
>>>                        </wd:item>
>>>                        <wd:item value="3">
>>>                            <wd:label>Paused</wd:label>
>>>                        </wd:item>
>>>                        <wd:item value="3">
>>>                            <wd:label>Not runned</wd:label>
>>>                        </wd:item>
>>>                    </wd:selection-list>
>>>                </wd:output>
>>>
>>> but in output i see only values and not labels.
>>>
>>> What am i doing wrong?
>>>
>>> regards,
>>> vasyas
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>>  
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org

-- 
Jaroslav Kuruc
kuruc@fiit.stuba.sk
FIIT STU, D208
Ilkovic(ova 3
842 16  Bratislava 4

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: wd:output and wd:selection-list

Posted by Vasyl Stashuk <va...@acm.org>.
But what do i do if i just want to show user some string based on value?

wbr,
vasyas

Jan Hoskens wrote:

>You're using an output widget, that just writes text, you need the
>"wd:field" widget to be able to use the selection list.
>
>Kind Regards,
>Jan
>
>----- Original Message ----- 
>From: "Vasyl Stashuk" <va...@acm.org>
>To: <us...@cocoon.apache.org>
>Sent: Wednesday, March 03, 2004 12:51 PM
>Subject: wd:output and wd:selection-list
>
>
>  
>
>>Hi all!
>>
>>I'm trying to use wd:selection-list inside of wd:output:
>>
>>                <wd:output id="state">
>>                    <wd:label>state</wd:label>
>>                    <wd:datatype base="long"/>
>>                    <wd:selection-list>
>>                        <wd:item value="1">
>>                            <wd:label>Finished</wd:label>
>>                        </wd:item>
>>                        <wd:item value="2">
>>                            <wd:label>Running</wd:label>
>>                        </wd:item>
>>                        <wd:item value="3">
>>                            <wd:label>Paused</wd:label>
>>                        </wd:item>
>>                        <wd:item value="3">
>>                            <wd:label>Not runned</wd:label>
>>                        </wd:item>
>>                    </wd:selection-list>
>>                </wd:output>
>>
>>but in output i see only values and not labels.
>>
>>What am i doing wrong?
>>
>>regards,
>>vasyas
>>
>>---------------------------------------------------------------------
>>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
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: wd:output and wd:selection-list

Posted by Jan Hoskens <jh...@schaubroeck.be>.
You're using an output widget, that just writes text, you need the
"wd:field" widget to be able to use the selection list.

Kind Regards,
Jan

----- Original Message ----- 
From: "Vasyl Stashuk" <va...@acm.org>
To: <us...@cocoon.apache.org>
Sent: Wednesday, March 03, 2004 12:51 PM
Subject: wd:output and wd:selection-list


> Hi all!
>
> I'm trying to use wd:selection-list inside of wd:output:
>
>                 <wd:output id="state">
>                     <wd:label>state</wd:label>
>                     <wd:datatype base="long"/>
>                     <wd:selection-list>
>                         <wd:item value="1">
>                             <wd:label>Finished</wd:label>
>                         </wd:item>
>                         <wd:item value="2">
>                             <wd:label>Running</wd:label>
>                         </wd:item>
>                         <wd:item value="3">
>                             <wd:label>Paused</wd:label>
>                         </wd:item>
>                         <wd:item value="3">
>                             <wd:label>Not runned</wd:label>
>                         </wd:item>
>                     </wd:selection-list>
>                 </wd:output>
>
> but in output i see only values and not labels.
>
> What am i doing wrong?
>
> regards,
> vasyas
>
> ---------------------------------------------------------------------
> 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