On 7/6/06, Matej Knopp <[EMAIL PROTECTED]> wrote:
> So do I. It is more complicated now, because we can't assume that the
> whole rendering is done within one thread / request.

why not? What has changed? The render process (when we iterate over
the components and print out the html into a Response object) (either
a whole page or several ajax components) are still executed in one go.
It might be that the response is written to the client in a separate
response (BufferResponse) but the html data are written into the
buffer response in one go.

>
> Maybe we need to store the status of contributions that were already
> done somewhere in the page.
>

I'm not sure I like that idea. It means we need to store even more
data in the Page (or any of its components or behaviors)  (= Session
because of clusters). How to uniquely identify a header contributions
without wasting to much session memory?
It can become realy ugly. Think about a panel with two equal ajax
components, one visible and the other not. Than you enable the second.
In theory you don't need to return the header because the first
component provided it already. And of course the components may be on
different levels in the component hierarchy. One the other hand we've
got most of it already (except the store). May be not that difficult
after all. The whole "header needs render or not" should become a
Strategy. Better usage of proper patterns.

Juergen

> And in the beginning of full render of the page we always clean this
> information.
>
> -Matej
>
> Juergen Donnerstag wrote:
> > I guess we than need to open up / or make more flexible the
> > HeaderContainer(?) which currently implements the logic to not render
> > certain headers multiple times.
> >
> > Juergen
> >
> > On 7/6/06, Matej Knopp <[EMAIL PROTECTED]> wrote:
> >> Actually, it doesn't replaces the DOM, it is adding elements.
> >>
> >> Avoiding contributing same stuff multiple times is still something to be
> >> solved. The current code just renders head of all components added to
> >> ajax target which is definitely not something we want.
> >>
> >> -Matej
> >>
> >> Juergen Donnerstag wrote:
> >>> I've seen your initial code (actually the patch only) and it think it
> >>> is going in the right direction. A few ago I responded to a similar
> >>> question proposing a solution like you now implemented it. As the ajax
> >>> header response "replaces" the DOM it might not be a problem for ajax
> >>> components but rendering a whole page the more difficult thing was
> >>> with header contribution exclusion e.g. multiple MyLabelWithJavascript
> >>> components on the page to be rendered just once, markup inheritance
> >>> etc.
> >>>
> >>> Juergen
> >>>
> >>> On 7/6/06, Johan Compagner <[EMAIL PROTECTED]> wrote:
> >>>> that is not a problem
> >>>> The output goes to the HtmlHeaderContainer.getResponse() object
> >>>> So just make that a BufferedResponse so that you can get the string out 
> >>>> of
> >>>> it.
> >>>>
> >>>> johan
> >>>>
> >>>>
> >>>>
> >>>> On 7/6/06, Matej Knopp <[EMAIL PROTECTED]> wrote:
> >>>>> Is there a reasonable way to render a header contribution of a component
> >>>>>   to a string? I'm asking, because looking at Component#renderHead, it
> >>>>> takes HtmlHeaderContainer as argument.
> >>>>> Juergen?
> >>>>>
> >>>>> -Matej
> >>>>>
> >>>>> Matej Knopp wrote:
> >>>>>> Matej Knopp wrote:
> >>>>>>> Adding both javascript and stylesheets seems to work, at least for
> >>>>>>> non-inline javascript and css. Still have to test inline stuff.
> >>>>>> I tested inline javascript, works well. Inline styles work too, but in
> >>>>>> IE you have to use document.createStyleSheet for it to work.
> >>>>>>
> >>>>>> I tested all this in FF, IE, Opera.
> >>>>>>
> >>>>>> Not the question remains, how to ensure that on the same page the
> >>>>>> contribution will be only once.
> >>>>>>
> >>>>>> I suggest handling this on server side.
> >>>>>>
> >>>>>> Say you have component on a page (not visible). You render page 
> >>>>>> (without
> >>>>>> the component). Then you render the component (using ajax). The header
> >>>>>> contribution will be rendered. After that on every subsequent ajax
> >>>>>> component render, the header contribution will not be rendered, until
> >>>>>> the whole page is refreshed (re-rendered).
> >>>>>>
> >>>>>> -Matej
> >>>>>>
> >>>>>>
> >>>>>>> -Matej
> >>>>>>>
> >>>>>>> Johan Compagner wrote:
> >>>>>>>> if you add css or javascript to the head of the page at runtime in a
> >>>>>>>> dynamic way
> >>>>>>>> is it then seen in the browser??
> >>>>>>>> We should first test that.
> >>>>>>>>
> >>>>>>>> johan
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 7/5/06, * Matej Knopp* <[EMAIL PROTECTED] <mailto: [EMAIL 
> >>>>>>>> PROTECTED]>>
> >>>> wrote:
> >>>>>>>>     Hi
> >>>>>>>>
> >>>>>>>>     There's a known problem with head contribution of components, 
> >>>>>>>> that
> >>>> are
> >>>>>>>>     not rendered when the whole page is (are hidden or not even part
> >>>> of
> >>>>>>>>     hierarchy), but are additionally rendered using an AJAX call.
> >>>>>>>>
> >>>>>>>>     The problem is, that while the body of the component is placed in
> >>>> the
> >>>>>>>>     page, the head contribution is ignored.
> >>>>>>>>
> >>>>>>>>     Any ideas on how should we address this issue?
> >>>>>>>>
> >>>>>>>>     First I though that catching css links and javascript references
> >>>> from
> >>>>>>>>     renderHead would be enough.
> >>>>>>>>
> >>>>>>>>     But each component with associated markup can have it's own
> >>>>>>>>     <wicket:head>, and this is something we also have take into
> >>>> account.
> >>>>>>>>     So what I'm thinking of now is to let component render it's head
> >>>> to a
> >>>>>>>>     buffer - it will probably be a xml snippet with structure like:
> >>>>>>>>
> >>>>>>>>        <link rel="stylesheet" href="..."/>
> >>>>>>>>        <style type="text/css">
> >>>>>>>>          ...
> >>>>>>>>        </style>
> >>>>>>>>        <script type="text/javascript" src="...">
> >>>>>>>>        <script type="text/javascript">
> >>>>>>>>          ...
> >>>>>>>>        </script>
> >>>>>>>>
> >>>>>>>>     If this snippet is well formed, I think we can send it as a part
> >>>> of our
> >>>>>>>>     ajax response.
> >>>>>>>>         e.g.
> >>>>>>>>
> >>>>>>>>     <?xml version=" 1.0" encoding="UTF-8"?>
> >>>>>>>>     <ajax-response>
> >>>>>>>>         <component id="c1" >
> >>>>>>>>            <![CDATA[<span id="c1">3</span>]]>
> >>>>>>>>         </component>
> >>>>>>>>         <head>
> >>>>>>>>           <link rel="stylesheet" href="..."/>
> >>>>>>>>           <style type="text/css">
> >>>>>>>>              ...
> >>>>>>>>           </style>
> >>>>>>>>           <script type="text/javascript" src="...">
> >>>>>>>>           <script type="text/javascript">
> >>>>>>>>              ...
> >>>>>>>>           </script>
> >>>>>>>>         </head>
> >>>>>>>>     </ajax-response>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>     The DOM structure of the head part should be quite 
> >>>>>>>> straightforward
> >>>> to
> >>>>>>>>     parse. The javascript used to add stylesheet and javascript to
> >>>> html head
> >>>>>>>>     does not seem difficult either.
> >>>>>>>>
> >>>>>>>>     Now the problem seems to be deciding, whether to apply the
> >>>> contribution,
> >>>>>>>>     or whether it has already been applied. We don't want to run the
> >>>> same
> >>>>>>>>     javascript twice, etc.
> >>>>>>>>
> >>>>>>>>     How should this be solved? Any ideas?
> >>>>>>>>
> >>>>>>>>     -Matej
> >>>>>>>>
> >>>>>>>>     Using Tomcat but need to do more? Need to support web services,
> >>>>>>>>     security?
> >>>>>>>>     Get stuff done quickly with pre-integrated technology to make 
> >>>>>>>> your
> >>>>>>>>     job easier
> >>>>>>>>     Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >>>>>>>>     Geronimo
> >>>>>>>>
> >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>>> <http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>>>>>>>     _______________________________________________
> >>>>>>>>     Wicket-develop mailing list
> >>>>>>>>     Wicket-develop@lists.sourceforge.net
> >>>>>>>>     <mailto:Wicket-develop@lists.sourceforge.net>
> >>>>>>>>
> >>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>>>>>>
> >>>>>>>>
> >>>> ------------------------------------------------------------------------
> >>>>>>>> Using Tomcat but need to do more? Need to support web services,
> >>>> security?
> >>>>>>>> Get stuff done quickly with pre-integrated technology to make your 
> >>>>>>>> job
> >>>> easier
> >>>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >>>> Geronimo
> >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>>>>>>>
> >>>> ------------------------------------------------------------------------
> >>>>>>>> _______________________________________________
> >>>>>>>> Wicket-develop mailing list
> >>>>>>>> Wicket-develop@lists.sourceforge.net
> >>>>>>>>
> >>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>>>>> Using Tomcat but need to do more? Need to support web services,
> >>>> security?
> >>>>>>> Get stuff done quickly with pre-integrated technology to make your job
> >>>> easier
> >>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >>>> Geronimo
> >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>>>>>> _______________________________________________
> >>>>>>> Wicket-develop mailing list
> >>>>>>> Wicket-develop@lists.sourceforge.net
> >>>>>>>
> >>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>>>> Using Tomcat but need to do more? Need to support web services,
> >>>> security?
> >>>>>> Get stuff done quickly with pre-integrated technology to make your job
> >>>> easier
> >>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> >>>> Geronimo
> >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>>>>> _______________________________________________
> >>>>>> Wicket-develop mailing list
> >>>>>> Wicket-develop@lists.sourceforge.net
> >>>>>>
> >>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>>> Using Tomcat but need to do more? Need to support web services, 
> >>>>> security?
> >>>>> Get stuff done quickly with pre-integrated technology to make your job
> >>>> easier
> >>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache 
> >>>>> Geronimo
> >>>>>
> >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>>>> _______________________________________________
> >>>>> Wicket-develop mailing list
> >>>>> Wicket-develop@lists.sourceforge.net
> >>>>>
> >>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>>
> >>>> Using Tomcat but need to do more? Need to support web services, security?
> >>>> Get stuff done quickly with pre-integrated technology to make your job
> >>>> easier
> >>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache 
> >>>> Geronimo
> >>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> Wicket-develop mailing list
> >>>> Wicket-develop@lists.sourceforge.net
> >>>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>>
> >>>>
> >>>>
> >>> Using Tomcat but need to do more? Need to support web services, security?
> >>> Get stuff done quickly with pre-integrated technology to make your job 
> >>> easier
> >>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >>> _______________________________________________
> >>> Wicket-develop mailing list
> >>> Wicket-develop@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>>
> >>
> >> Using Tomcat but need to do more? Need to support web services, security?
> >> Get stuff done quickly with pre-integrated technology to make your job 
> >> easier
> >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >> _______________________________________________
> >> Wicket-develop mailing list
> >> Wicket-develop@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >>
> >
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job 
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Wicket-develop mailing list
> > Wicket-develop@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Wicket-develop mailing list
> Wicket-develop@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-develop mailing list
Wicket-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to