Mark
On 30 January 2012 14:59, Markus Ruggiero <
email@hidden> wrote:
> Yes, Paul, I know this - and I do not want to mix. BUT: the required
> functionality is so, that when a "textblock" is edited and then stored to
> the database, all "electronic documents" that include this particular
> textblock must be recreated automatically. To be able to do this I must be
> able to find the updated textblock. This is something that the editing
> context can tell me. To generate the electronic document (resulting PDF) I
> use a standard WOComponent to generate the XML as input to Apache FOP. And
> here is my problem: When the user presses "Save" in the D2W page this can
> result in some modifications to textblocks. Textblock is not necessarily the
> top entity in the D2W edit page. First I had my code in the nextPageDelegate
> for the editing page. But this is only called after the save has taken place
> and I the editing context cannot tell me what has been saved and needs
> regeneration of the relevant PDF. Can I trap saveChanges() in a D2WEditPage
> without having to freeze the component? Or is there a way for the editing
> context to access the request/context (which should probably not be)? Or am
> I completely off track?
>
> I hope I could make clear where my problem is. Thanks for
> input/help/whatever
> ---markus---
>
> On 30.01.2012, at 14:06, Paul D Yu wrote:
>
> Component generation, XML generation are "UI" view things, they should NOT
> be down in your EOs!!! Have you looked at the PDF generation example in
> Wonder?
>
> Basically, you should create a component like any other, except the wrapper
> is what FOP wants.
>
> Paul
>
> Sent from my iPad
>
> On Jan 30, 2012, at 4:58 AM, Markus Ruggiero <
email@hidden>
> wrote:
>
> Help, this is urgent, please could someone have a look. I am at a loss here.
> Probably my concept is wrong but I do not see how to fix it. A nudge into
> the right direction (or a kick into the bu**) might be all I need.
>
> Thank you very much
> ---markus---
>
> On 27.01.2012, at 15:35, mailinglists wrote:
>
> Help!
>
> My ERD2W application needs to generate PDF-files for EOs. The EO has a
> method that calls a XML-Generator that generates the XML-input for
> Apache-FOP. For this I use the following code in the Document-EO (just a
> fragment)
>
> I_XMLGeneratorInterface xmlGenerator =
> (I_XMLGeneratorInterface)WOApplication.application().pageWithName(generatorName,
> new WOContext(session.context().request()));
>
> The problem is that pageWithName needs a WOContext and this needs a
> WORequest. The WORequest comes from the session. BUT EOs are not supposed to
> know about sessions. So I pass the session into that method when I call the
> document to generate the PDF data. Fine, works. But now I want to automate
> the generation of PDFs when any relevant object is saved. I have thus
> created my own EOEditingContext descendant where I override saveChanges().
> Whenever I save a relevant object I check after success if that object has
> related documents and then call those to generate the PDF, passing in the
> session. My EditingContext has a session variable and in the
> session-constructor I manually create my editing context, stuff the session
> into it and install it as defaultEditingContext. But D2W creates
> editingContexts and knows nothing about feeding with session information.
> When my code runs session variable is null and no PDFs are created.
>
> Any idea how to tackle this problem? HELP! Is my strategy ok? Can I fix the
> missing session somehow? Or would you recommend a different way to go?
>
> Thanks a lot, this is an urgent one
> ---markus---
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (
email@hidden)
>
> This email sent to
email@hidden>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
>
> This email sent to
email@hidden>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
>
> This email sent to
email@hidden>
--
Dr. Mark Wardle
Consultant Neurologist, University Hospital Wales, Cardiff, UK
Honorary Lecturer, Cardiff University, UK
Email:
email@hidden or
email@hiddenTelephone:
02920745274 (secretary) or facsimile:
02920744166