On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:
> Yes, I was not being clear with my question (my grasp of wicket is very
> weak). I want to transform the markup being loaded from the markup file,
> but *after* wicket has run it through the rendering process. What I want
> to do is have wicket take the xml markup associated with the panel and
> run it through its rendering process, and then capture that output
> before it gets merged with the panel's parent, transform it with xslt
> (into javascript -- see my post from yesterday on wicket-contrib-gmap),
> and then merge it with the panel's parent.
>


        protected final void onComponentTagBody(MarkupStream markupStream,
ComponentTag openTag)
        {
                // Temporarily replace the web response with a String response
                final Response webResponse = this.getResponse();

                try
                {
                        final StringResponse response = new StringResponse();
                        this.getRequestCycle().setResponse(response);

                        super.onComponentTagBody(markupStream, openTag);

                        .....

                        if (output.length() > 0)
                        {
                                webResponse.write(output);
                        }
                }
                finally
                {
                        // Restore the original response
                        this.getRequestCycle().setResponse(webResponse);
                }
        }



> This way I am hoping to have javascript rendered into the page that will
>   know about urls for wicket components. To me, it seems like a natural
> way to have javascript objects call wicket Link objects and AjaxHandlers.
>
> Apologies if this sounds like babbling -- I'm still trying to find my
> wicket legs.
>

That's ok.

Juergen

>
> thx,
> jim
>
>
>
> Juergen Donnerstag wrote:
> > On 12/30/05, Jim McLaughlin <[EMAIL PROTECTED]> wrote:
> >
> >>How to create a component that will transform its xml markup with xslt?
> >>Looking at wicket-contrib-velocity, the VelocityPanel calls
> >>replaceComponentTagBody inside of onComponentTagBody. It looks like
> >>replaceComponentTagBody will skip all the RawMarkup. How can I get it to
> >>be replaced by the xslt transformation?
> >>
> >
> >
> > The same way FreeMarkerPanel.onComponentTagBody works except that you
> > don't call FreeMarker but you xslt processor.
> > replaceComponentTagBody(markupStream, openTag, newBody) removes the
> > body (as you already discovered) and gets replaced by "newBody" (third
> > parameter).
> >
> > Could it be this is not your question? Are you asking to xslt
> > transform the markup being loaded from the markup file. That would be
> > similar to loading the markup from a database (or any other source you
> > can think of). Add a IResourceStreamLocator to the
> > DefaultResourceStreamLocator which is default an accessible through
> > Application.getResourceStreamLocator(). Or replace
> > Application.newMarkupResourceStream but than you loose all the default
> > functionality.
> >
> > Juergen
> >
> >
> >
> >
> >>thx,
> >>jim
> >>
> >>
> >>
> >>-------------------------------------------------------
> >>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> >>for problems?  Stop!  Download the new AJAX search engine that makes
> >>searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> >>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> >>_______________________________________________
> >>Wicket-user mailing list
> >>[email protected]
> >>https://lists.sourceforge.net/lists/listinfo/wicket-user
> >>
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to