cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivelin Ivanov" <ive...@apache.org>
Subject Re: XMLForm: dynamic content listbox
Date Sat, 23 Nov 2002 15:44:58 GMT

Yes. JXPath is used.
The names are matched by JavaBean introspection.


----- Original Message -----
From: "Josema Alonso" <alonso@aafunky.com>
To: <cocoon-users@xml.apache.org>
Sent: Friday, November 22, 2002 3:47 AM
Subject: RE: XMLForm: dynamic content listbox


> When you say 'So, but how is the xmlform framework determining the name?'
I
> do not know exactly what you mean.
>
> Maybe you need the help of someone more expert than me in the framework.
As
> I told you in my previous message I think is JXPath making the mappings,
but
> haven't investigate this point too much...maybe we should take a closer
look
> at http://jakarta.apache.org/commons/jxpath/...
>
>
> -----Mensaje original-----
> De: Kirchhoff, Lars [mailto:Lars.Kirchhoff@wincor-nixdorf.com]
> Enviado el: viernes, 22 de noviembre de 2002 9:59
> Para: 'cocoon-users@xml.apache.org'
> Asunto: AW: XMLForm: dynamic content listbox
>
>
> thanks Josema,
>
> after playing a while I found it as well, but still find it a bit
> confusing, because there is now direct reference. What I did was
> the following:
>
> <!-- ========== code ========== -->
>      public UserBean () {
>         initCustomers();
>      }
>
>      public String[] getName() {
>         return names;
>      }
>
>      public void setName( String[] newNames ) {
>         names = newNames;
>      }
>
>      public Set getCustomerNames() {
>         return customerNames.entrySet();
>      }
>
>      public void initCustomers() {
>         names          = new String[] {};
>         customerNames  = new HashMap();
>
>         ...
>           fill with database entries
>         ...
>      }
> <!-- ========== /code ========== -->
>
> after this was done in the java bean, I could acces the elements
> by using /name as ref value in the xml file.
>
> <!-- ========== code ========== -->
>      <xf:selectMany ref="/name" selectUIType="checkbox">
>       <xf:caption>Customer</xf:caption>
>       <xf:itemset nodeset="customerNames">
>        <xf:caption ref="value"/>
>        <xf:value ref="key"/>
>       </xf:itemset>
>      </xf:selectMany>
> <!-- ========== /code ========== -->
>
> So, but how is the xmlform framework determining the name?
>
> best regards
> Lars Kirchhoff
>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


Mime
View raw message