cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bobby Mitchell <>
Subject Need help with mod-db and XMLForm (Please disregard my earlier posts)
Date Wed, 11 Sep 2002 21:29:32 GMT
  To start with, I apologize for posting so many different posts lately. 
I'm stuck and I'm not sure which way to go, but I have been working to 
find a solution. Please disregard the several earlier posts.
I'm trying to use XMLForms and Mod-db actions together. My problem stems 
from the fact that mod-db uses request parameters from a key column to 
set the ?'s in the query and when setting the request parameters to the 
column values retrieved it sets them by appending table_name. to the 
column/req-param name. My request parameters and column names are the same.

Assume my query is select ID, EMAIL from NIAC_MAILLIST where EMAIL=?  
Mod-db is now looking for a request parameter called NIAC_MAILLIST.EMAIL 
and if found it successfully grabs the data from the database. Otherwise 
it exits. If I append &NIAC_MAILLIST.EMAIL="b@n" to the query string 
mod-db works and creates the variables for the data, but XMLForm 
generates an "Invalid data format" error. I created a session attribute 
called NIAC_MAILLIST.EMAIL and am setting it to EMAIL. If mod-db would 
set  the ? from the session attributes instead of request parameters I 
could set it that way. Otherwise I need to find a way to get mod-db to 
not append the table name to the front of the column.
Any ideas?

   <table name="NIAC_MAILLIST" alias="NIAC_MAILLIST">
   <keys>          <key name="EMAIL" type="string" autoincrement="false">
     </keys>      <values>
       <value name="ID"  type="int"></value>
       <value name="EMAIL" type="string"></value>
  <table-set name="MAILLIST-sel">
     <table name="NIAC_MAILLIST" others-mode="session"/>

sitemap snippet where I declare the select action
<map:action name="mod-db-sel     

pipeline where I'm trying to use it.   


     <!-- A non-trivial interactive example - Cocoon Usage Feedback 
Wizard -->
     <map:match pattern="wizard*">

       <map:match type="request-parameter" pattern="cocoon-xmlform-view">
         <map:select type="request-parameter">
           <map:parameter name="parameter-name" 
           <map:when test="registration">
             <map:act type="request">
               <map:parameter name="parameters" value="true"/>
             <map:act type="req-params">
               <map:parameter name="parameters" value="EMAIL"/>
               <map:act type="session-propagator">
                 <map:parameter name="NIAC_MAILLIST.EMAIL" 
               <map:act type="mod-db-sel" src="optional src">
                 <map:parameter name="table-set" value="MAILLIST-sel"/>

       <map:act type="WizardAction">

         <!-- XMLForm parameters for the AbstractXMLFormAction -->
         <map:parameter name="xmlform-validator-schema-ns" value= 
"" />
         <map:parameter name="xmlform-validator-schema" 
         <map:parameter name="xmlform-id" value="form-feedback"/>
         <map:parameter name="xmlform-scope" value="session"/>
         <map:parameter name="xmlform-model" value="niac.list.ListBean"/>

         <!-- Content transformation logic -->
         <map:generate type="serverpages" src="wizard/{page}.xsp"/>
         <map:transform type="xmlform"  label="debug, xml"/>
         <map:transform src="stylesheets/wizard2html.xsl" />
         <map:serialize type="xhtml"/>

Robert J. (Bobby) Mitchell
Systems Administrator
NASA Institute for Advanced Concepts
555A 14th St Atlanta, Ga. 30318
Phone: (404)347-9633 Fax: (404)347-9638

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message