I needed to read that linked wiki half a dozen times before getting things to 
work. Wow.

I picked up the session in the constructor:

public FileTaskDownloadController() {
        super();
        _senderPage = ERXWOContext.currentContext().page();
                
        _session = (Session) _senderPage.session();             
}

Guess I didn't have to but it was cleaner. I changed the page creation from:

DownloadIsCompletePage nextPage = pageWithName(DownloadIsCompletePage.class);
                        
To:

DownloadIsCompletePage nextPage = (DownloadIsCompletePage)  
        D2W.factory().pageForConfigurationNamed("DownloadIsCompletePage", 
session() );

change the extends of the download page:

public class DownloadIsCompletePage extends ERD2WPage

add the four rules that are listed and joy.

after the PDF downloads, I get the downloadiscomplete text wrapped in the 
PageWrapper.

Pdfs that look great and are 'relatively' easy to control. iReport allowed me 
to add a text field expression:

$F{estimateApproved}.equals( "true" ) ? "Estimate Approved by Client" : ""

It's almost fun, if it weren't work.

Ted

--- On Tue, 4/10/12, David Holt <programming...@mac.com> wrote:

> From: David Holt <programming...@mac.com>
> Subject: Re: Your JasperReport Example and D2W
> To: "Theodore Petrosky" <tedp...@yahoo.com>
> Cc: "Kieran Kelleher" <kelleh...@gmail.com>, webobjects-dev@lists.apple.com
> Date: Tuesday, April 10, 2012, 12:34 PM
> Hi Ted,
> 
> You'll probably have to go through the steps of adding a
> "normal" component to ERModernLook app to get the
> DownloadIsComplete page behaving  as you wish.
> 
> http://wiki.wocommunity.org/display/WO/Adding+a+Normal+WOComponent+Page+to+an+ERModernLook+based+application
> 
> Wrap the DownloadIsCompletePage in your page wrapper and
> make sure that you have the "fake" entity and task set for
> that page in your rules. Something like:
> 
> pageConfiguration = 'DownloadIsCompletePage' => entity =
> "Brief" [com.webobjects.directtoweb.EntityAssignment]
> 
> pageConfiguration = 'DownloadIsCompletePage' => task =
> "inspect" [com.webobjects.directtoweb.Assignment]
> 
> pageConfiguration = 'DownloadIsCompletePage' =>
> templateNameForInspectPage = "DownloadIsCompletePage"
> [com.webobjects.directtoweb.Assignment]
> 
> pageConfiguration = 'DownloadIsCompletePage' =>
> navigationState = "DownloadIsCompletePage"
> [com.webobjects.directtoweb.Assignment]
> 
> David
> 
> 
> On 2012-04-10, at 9:19 AM, Theodore Petrosky wrote:
> 
> > Kieran,
> > 
> > I see in your JasperReport example that in the
> DownloadIsCompletePage there is a method to set the
> referringPage. 
> > 
> > Is there a way to get the D2W context and apply it to
> the DownloadIsCompletePage in the appendToResponse method so
> the DownloadIsCompletePage has the PageWrapper?
> > 
> > I stuck a NSLog in the setReferringPage method and I
> see that it is a D2W page:
> > 
> > *** DownloadIsCompletePage  setReferringPage
> )  ***** <er.modern.look.pages.ERMODListPage name:
> er.modern.look.pages.ERMODListPage
> > 
> > Ted
> > _______________________________________________
> > Do not post admin requests to the list. They will be
> ignored.
> > Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
> > Help/Unsubscribe/Update your Subscription:
> > https://lists.apple.com/mailman/options/webobjects-dev/programmingosx%40mac.com
> > 
> > This email sent to programming...@mac.com
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to