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:[EMAIL PROTECTED]]
Enviado el: viernes, 22 de noviembre de 2002 9:59
Para: '[EMAIL PROTECTED]'
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to