>You will also want to make
> sure that the excel page is then generated into a new frame and not as part
> of the portal page.

This is something I am looking for. How can we generate the excel page in a 
new frame. Here is the code that I used. The file is quotehistory.xsp 

I have a xsp page which has 2 submit buttons.

                                 <input name="submit1" value="GO" type="submit"/>
                                 <input name="submit1" value="EXCEL" type="submit"/>


Both refer to the same href. 
Note: The href points to the same file.
                <form href="cocoon:/coplets/search/quotehistory.xsp" method="get">

In my site map here is the match for quotehistory.xsp   . Check the map:select 
that I am using. When user clicks on GO then I want the out put to displayed 
on the screen. When user clicks EXCEL I want the output to be displayed in a 
excel file. When I click on GO its working fine, when I click on EXCEL it 
isnot generating a excel page it is displaying output in the same coplet but 
it is not tranformed well because it is not html. Also when I click on GO and 
the output comes to QuoteHistoryResult.xsp . in this page I placed a 
hyperlink that would generate excel that works. The xsl file and serializer 
that I am using are just the same and that works. Dont know where the problem 
is. 


<map:match pattern="quotehistory.xsp">
     
        <map:act type="validator">
                <map:parameter name="descriptor" 
value="context://newhistoryserver/defs/
descriptor.xml"/>
                <map:parameter name="validate-set" value="securityquote"/>
                                                                                       
                         
                                <map:generate type="serverpages" 
src="quotehistoryresult.xsp" 
label="raw">    
                                         <map:parameter name="from" 
value="quotehistory"/> 
                                </map:generate> 
                                <map:select type="request">
                                            <map:parameter name="parameter-name" 
value="submit1"/>
                                            <map:when test="GO">
                                                <map:transform 
src="context:/newhistoryserver/styles/
searchresult.xsl"/>     
                                            <map:serialize/>    
                                            </map:when>
                                            <map:otherwise>
                                                                <map:transform 
src="context://newhistoryserver/styles/
page2xls.xsl"/>
                                                                <map:serialize 
type="xls"/>
                                            </map:otherwise>
                                          </map:select>
                                  </map:act>            
     <map:generate src="quotehistory.xsp" type="serverpages"/>          
     <map:transform src="context:/newhistoryserver/styles/search.xsl"/>     
     <map:transform src="context:/newhistoryserver/styles/
dynamic-page2html.xsl"/>
   <map:serialize/>  
   </map:match>         


Thank you for the patience.

Anna.


On Tuesday 04 May 2004 02:41 am, Matthew Langham wrote:
> > >I am using cocoon as a portal server. In one of my coplets when the
> > >user submits a form I want the output to be displayed in a
> >
> > excel file.
> >
> > >When I have the excel operation in a submit button this
> >
> > doesnt work. If
> >
> > >I use a hyperlink in the page with all information in the
> >
> > url then it works.
>
> I would take a look at the source of the generated portal page and check
> the URL in the submit button is still correct. You will also want to make
> sure that the excel page is then generated into a new frame and not as part
> of the portal page.
>
> Matthew

Reply via email to