cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christophe Kermagoret <...@babelobjects.com>
Subject Re: Woody: How to bind multivaluefield ?? HELP
Date Sat, 06 Dec 2003 23:11:35 GMT
Hi,
I'm trying to use the <wi:styling type="output"/> but it doesn't seem to 
work.
Is there anybody that uses it with success ?

When I look at the intermediate style sheet, I see a double tag :
<wi:styling>
    <wi:styling type="author"/>
</wi:styling>

Is it normal ?

Marcin Okraszewski wrote:

> Hi,
> I want to bind a multivalue field to a bean. It doesn't work while 
> other fields are bind correctly. How should I bind it if my data type 
> is long??? I tried with Collection of Long, Long[] and long[].
>
> Here is my case (extracts):
>
> 1) model:
>
> <wd:form>
>   <wd:widgets>
>     ...
>     <wd:multivaluefield id="admins">
>       <wd:label>admins</wd:label>
>       <wd:datatype base="long"/>
>       <wd:selection-list>
>         <wd:item value="1">
>           <wd:label>user1</wd:label>
>         </wd:item>
>         <wd:item value="2">
>           <wd:label>user2</wd:label>
>         </wd:item>
>        ...
>       </wd:selection-list>
>     </wd:multivaluefield>
>     ...
>   </wd:widgets>
> </wd:form>
>
> 2) binding:
>
> <wb:context  path="/" >
>   ...
>   <wb:value id="admins" path="admins"/>
>   ...
> </wb:context>
>
> 3) bean:
>
> public class Department {
>     ...
>     // I also tried with Long[] and Collection instead of long[]
>     public long[] getAdmins() {
>         long[] admins = { 1, 2 };
>     return admins;
>     }
>     public void setAdmins(long[] admins) {
>     }
>     ...
> }
>
> 6) Page before transform
>
> ...
> <wt:form-template action="#{$continuation/id}.continue" method="POST">
>   ...
>   <wt:widget id="admins"/>
>   ...
> </wd:form-template>
> ...
>
> 5) Woody transformer output:
>
> ...
> <wi:multivaluefield id="admins">
>   <wi:values/>
>   <wi:label>admins</wi:label>
>   <wi:selection-list>
>     <wi:item value="1">
>       <wi:label>user1</wi:label>
>     </wi:item>
>     <wi:item value="2">
>       <wi:label>user2</wi:label>
>     </wi:item>
>     ....
>   </wi:selection-list>
>   <wi:styling/>
> </wi:multivaluefield>
> ...
>
> As you see, the <wi:values> are empty! What is wrong?
>
> Regards,
> Marcin Okraszewski
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


-- 

Jean-Christophe Kermagoret
jck@BabelObjects.Com



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


Mime
View raw message