cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josema Alonso <>
Subject RE: nested map:select type="parameter" in sitemap are not working
Date Fri, 08 Nov 2002 08:23:33 GMT
Thanks for your reply,

The parameter comes from the action. I tried accesing it as {../page} as you
suggests but it doesn't help either. Anyway i can see in the log the
parameter has the 'end' value when requesting the last page of the XMLForm
and it goes through the otherewise section while it shouldn't :-(

I'm starting to think I can make that select there. Maybe it is not possible
to nest two select or maybe it is not possible to test against the page
parameter 'til outside the action, but this can't be the case, cause when it
goes through the otherwise section (it is always as I said) the right page
is rendered, and if you see the snippet it uses the page parameter for
choosing the page...oh, dear I'm desperate...


-----Mensaje original-----
De: Sternath Elmar []
Enviado el: viernes, 08 de noviembre de 2002 8:21
Para: ''
Asunto: AW: nested map:select type="parameter" in sitemap are not

Hi Josema,

where does the 'page' parameter come from? Don't forget that you're inside
an action when accessing it. So if it is a request parameter, you have to
access it using {../page}.

-----Urspr√ľngliche Nachricht-----
Von: Josema Alonso []
Gesendet: Donnerstag, 7. November 2002 21:16
An: Cocoon-Users
Betreff: nested map:select type="parameter" in sitemap are not working

Hello, all.

This is driving me crazy...
In the following sitemap snippet the second select goes ALWAYS for the
otherwise section. I have checked the sitemap.log and the value of the page
attribute is, in the last stage of my XMLForm processing, equal to 'end'.
Well, it doesn't go for the when clause either :-(

Don't know what else to do. I hope it's not a bug...


 <map:match pattern="**/*.xform">
  <map:select type="parameter">
   <map:parameter name="parameter-selector-test" value="{2}"/>
   <map:when test="EquipmentType">
    <map:act type="EquipmentTypeAction">
     <map:parameter name="actionName" value="{2}Action"/>
     <!-- XMLForm parameters for the AbstractXMLFormAction -->
     <map:parameter name="xmlform-validator-schema-ns"
     <map:parameter name="xmlform-validator-schema"
     <map:parameter name="xmlform-id" value="form-insert"/>
     <map:parameter name="xmlform-scope" value="session"/>
     <map:parameter name="xmlform-model"
     <map:select type="parameter">
      <map:parameter name="paramend" value="{page}"/>
      <map:when test="end">
       <!-- generate the XSP and insert into DB using XMLDBTransformer -->
       <map:generate src="{../1}/{../2}/{page}.xsp"/>
       <map:transform type="cinclude"/>
       <map:transform type="xmldb">
        <map:parameter name="base" value="xmldb:xindice:///db/xmtrader/"/>
       <map:serialize type="xml"/>
       <!-- original XMLForm document -->
       <map:generate src="{../1}/{../2}/{page}.xml"/>
  <!-- common part for the XMLForms -->
  <!-- populating the document with model instance data -->
  <map:transform type="xmlform" label="debug, xml"/>
  <!-- personalizing the look and feel of the form controls  -->
  <map:transform src="styles/wizard2html.xsl"/>
  <!-- Transforming the XMLForm controls to HTML controls -->
  <map:transform src="styles/xmlform2html.xsl"/>
  <!-- sending the HTML back to the browser -->
  <map:serialize type="html"/>

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