logo       

Re: [BlueXML-user] selection-list definition: msg#00007

Subject: Re: [BlueXML-user] selection-list definition
Eric,
I'm sorry but I don't understand your question.

Can you ask precisely what you want, with ONLY the important part of your form file ?

Thanks,

Jean-Christophe

Trouvé Sébastien wrote:
Thanks for your answer, but can i create a code for my ThirdpartyAccount class, which nominate a widget as a selection-list or as a simple field, according to the form in use?

Le lundi 10 juillet 2006 à 12:03 +0200, Jean-Christophe Kermagoret a écrit :

Sebastien,
happily, you can use your existing class.

Selection-list is just a query that concatenates data.

For example, in your case, if you want to reuse the data you entered through your class, you just have to create a new widget (and not a new class) with selection-list type :

<fd:multivaluefield id="activity.organizer">
    <fd:datatype base="string"/>
<fd:selection-list src="cocoon:/process-selection-list-specific?xpath=/document[meta/type='organisateur'][meta/doctype='ae_entity']&amp;order=meta/name&amp;value=$doc/docid&amp;label=fn:string(fn:concat($doc/meta/name,%20'%20-%20',%20$doc/meta/city))" dynamic="true"/>
</fd:multivaluefield>

The process-selection-list is the query that will build your selection-list. It takes 4 arguments :
* xpath : the query to get the basic results
* order : the sort order to use
* value : the option value to use
* label : the option label to display

Jean-Christophe

Trouvé Sébastien wrote:
Hello,

I created a form to capture customer's features. This form contains a class called ThirdpartyAccount, which capture the identity, the label and the type of the thirdparty account (Customer or Supplier).

My class looks like:
/<?xml version="1.0" encoding="ISO-8859-1"?>/
/<!-- BX CPT -->/
/<fd:form/
/  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"/
/  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"/
/  xmlns:filter="http://bluexml.org/filter/1.0";>/

/  <fd:widgets>/

/ <fd:class id="ThirdpartyAccount">/
/   <fd:widgets>/
/        <fd:field id="AccountId" required="true">/
/            <fd:datatype base="string"/>/
/        </fd:field>/
/        <fd:field id="AccountLabel">/
/            <fd:datatype base="string"/>/
/        </fd:field>/
/        <fd:field id="AccountingType" required="true">/
/        <fd:datatype base="string"/>/
/ <fd:selection-list src="cocoon://navigation/getNomenclature?field=thirdPartyAccountType&amp;viewStyle=label" dynamic="true"/>/
/        </fd:field>/
/      </fd:widgets>/
/ </fd:class>/

/  </fd:widgets>/

/</fd:form>/

And my repositoty like this:
/<fd:form/
/  xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"/
/  xmlns:fb="http://apache.org/cocoon/forms/1.0#binding"/
/  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"/
/  xmlns:filter="http://bluexml.org/filter/1.0";>/

/  <fd:widgets id="AccountingCustomer">/
/ <fd:new id="Base"/>/
/ <fd:new id="Authoring"/>/
/ <fd:new id="Identity"/>/
/    <fd:new id="ThirdpartyAccount"/>/
/    <fd:new id="AccountingInformation"/>/
/    <fd:new id="Classification"/>/
/    <fd:new id="CommunicationWork"/>/
/    <fd:new id="CommunicationHome"/>/
/ <fd:new id="Personality"/>/
/ <fd:new id="Marketing"/>/
/ <fd:new id="Credential"/>/
/ <fd:new id="Security"/> /
/    <fd:new id="Company"/>/
/    <fd:new id="Address"/>/
/    <fd:new id="Date"/>/
/    <fd:new id="NewVersion"/>/

/<!--    /
/    <fd:new id="NewVersionWithoutAttachment"/>/
/-->/
/    <fd:new id="Versions"/>      /
/  </fd:widgets>/

/</fd:form>/
I called my ThirdpartyAccount class

Now , i want to create a new form, where my class ThirdpartyAccount is here, but used as a selection-list.
How could i do this?
- Do i create a new class to build my selection list?
- or can i use my present class?

Thanks for your help


------------------------------------------------------------------------

_______________________________________________
User mailing list
User-E0IXfuzpajFHgg9j4ji3+w@xxxxxxxxxxxxxxxx 
<mailto:User-E0IXfuzpajFHgg9j4ji3+w@xxxxxxxxxxxxxxxx>
http://mlm.triglyphe.com/mailman/listinfo/user



------------------------------------------------------------------------

_______________________________________________
User mailing list
User-E0IXfuzpajFHgg9j4ji3+w@xxxxxxxxxxxxxxxx
http://mlm.triglyphe.com/mailman/listinfo/user


--

Jean-Christophe Kermagoret
jck-v3FNGYKZ9cyNvCAlj6F9uA@xxxxxxxxxxxxxxxx


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    politics.lenini...    audio.emagic.ex...    tex.texinfo.gen...    handhelds.linux...    ietf.sipping/20...    lang.erlang.gen...    cygwin.talk/200...    yellowdog.gener...    mozilla.devel.l...    xfree86.newbie/...    openbsd.ports/2...    db.oracle.devel...    kde.kalyxo.deve...    user-groups.lin...    bbc.cvs/2003-04...    gnu.libtool.bug...    redhat.k12osn/2...    emulators.wine....    freebsd.devel.d...    search.xapian.g...    java.izpack.use...    network.mrtg.us...    windows.total-c...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe