Great it works. Thanx Ivelin.

I did something like this.

Form myFormInstance = Form.lookup( objectModel,
"form-feedback1" );
UserBean1 jBean = (UserBean1)
myFormInstance.getModel();
String sql_query_where_clause = "where pro_city = '" +
jBean.getCity() + "'";

I should have realized that same is also done in
WizardAction.

But now I have two concerns:

1) Both the XMLFORM and the custom generator works
independently (each has its own pipeline). 

I need to have the XMLFORM pipeline :
 
******************************************************************
      <map:match pattern="wizard*">
        <map:act type="WizardAction">

          <!-- XMLForm parameters for the
AbstractXMLFormAction -->
          <map:parameter
name="xmlform-validator-schema-ns"
value="http://www.ascc.net/xml/schematron"/>
          <map:parameter
name="xmlform-validator-schema"
value="schematron/wizard-xmlform-sch-report.xml"/>
          <map:parameter name="xmlform-id"
value="form-feedback1"/>
          <map:parameter name="xmlform-scope"
value="session"/>
          <map:parameter name="xmlform-model"
value="rertn_frontapp.UserBean1"/>

          <!-- Content transformation logic -->
          <map:generate src="wizard/{page}.xml"/>
          <map:transform type="xmlform"  label="debug,
xml"/>
          <map:transform
src="stylesheets/wizard2html.xsl" />
          <map:transform
src="context://samples/stylesheets/xmlform/xmlform2html.xsl"/>
          <map:serialize type="xhtml"/>
        </map:act>
      </map:match>
******************************************************************


and the custom generator pipeline : 


******************************************************************
       <map:match pattern="PropForSale(*)">
          <map:generate type="PropForSale"/>
          <map:select type="browser">
           <!-- you could insert parameters here as
well -->
            <map:when test="explorer">
               <map:transform type="paginate"
src="../pagesheets/PropForSale_P.pagesheet">
                      <map:parameter name="page"
value="{1}"/>
                </map:transform>
                <map:transform
src="../stylesheets/html_test1.xsl"/>
                <map:serialize type="html" />
            </map:when>


          </map:select>

      </map:match>
******************************************************************

somehow mearged or something.

Currently I fill up the form and when I am on the
confirm.xml page I open a new window in browser such
that it is same session and run the custom generator.
The end results of the generator are as needed form
input dependent(so it is good). But still it has to be
in one pipeline like instead of end.xml the custom
generator should be called.
I also understand that I would have to call
"Form.remove( getObjectModel(), getFormId() );" in my
generator instead of the wizardAction. Right??


2)

How would changing the xmlform-scope value from
session to request have an effect over here??


Thanks you once again.


-Apurva Zaveri



--- Ivelin Ivanov <[EMAIL PROTECTED]> wrote:
> 
> Form myFormInstance = Form.lookup( "myformId",
> objectModel)
> 
> 
> 
> 
> ----- Original Message ----- 
> From: "apurva zaveri" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, August 01, 2002 11:44 AM
> Subject: How to use a jbean of an XMLFORM from a
> custom generator?
> 
> 
> > Hello all,
> > 
> > I have been succesfuly able to run the xmlform on
> > cocoon 2.1. It is great. I want to know how to
> make
> > use of the bean's get methods to access its values
> > form a custom generator that extends
> ServletGenerator.
> > 
> > I want to configure the sitemap such that both are
> in
> > the same pipeline. like the user access the
> xmlform ,
> > the value from the bean are used by the generator
> > (generating XML) and displayed (using xslt
> > transformation) in the same pipeline as an output.
> > 
> > I am not sure what I have to do for that. Please
> help.
> > 
> > -Apurva Zaveri.
> > 
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Health - Feel better, live better
> > http://health.yahoo.com
> > 
> >
>
---------------------------------------------------------------------
> > 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]>
> > 
> 
> 
>
---------------------------------------------------------------------
> 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]>
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

---------------------------------------------------------------------
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