• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: responseForComponentWithName() and session
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: responseForComponentWithName() and session


  • Subject: Re: responseForComponentWithName() and session
  • From: Paolo Sommaruga <email@hidden>
  • Date: Tue, 12 Apr 2011 23:25:59 +0200

Hi,

I try to explain more. My web application is sort of cms. Basically the idea is simple. The main page displays an eoObject that has an attribute "text".  The administrator can edit such "text" attribute via a java client application. He can insert anywhere in the "text" some special tag, like

[component  myCustomComponent]

myCustomComponent is a component name, which lives in the web application, taken by a custom component library. Such custom component implement simple reusable behaviors for display only purpose, like products list, categories list, etc.

In the web application the "text" attribute binds to a method that parses the text. If the parse finds a special tag, it replaces such tag with the html generated by the component specified in the special tag. For this I use 

WOResponse response = (WOApplication.application()).responseForComponentWithName(componentName,
                                              null,
                                              null,
                                              null,
                                              uriPrefix,
                                              null);

                                              

    buf.append(response.contentString());

Such engine works very well with the stateless component. The problem is when the generated programmatically component need to access to some field in the session because the component generated with responseForComponentWithName lives in a new session.
I would like to extend the engine in order to use some simple stateful component

Paolo
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: responseForComponentWithName() and session
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: 501 user for wo apps?
  • Next by Date: Re: fetching on joined table
  • Previous by thread: Re: responseForComponentWithName() and session
  • Next by thread: Re: responseForComponentWithName() and session
  • Index(es):
    • Date
    • Thread