so when this is completed border will extend from the abstract output
transformer container and perform an empty transform as opposed to extending
the markup container?
-Igor
On 12/31/05, Juergen Donnerstag < [EMAIL PROTECTED]> wrote:
I committed a first attempt. I called them OutputTransformer. They are
extended from WebMarkupContainer and override onComponentTagBody. The
method transformer() must replaced to implement the transformation.
Juergen
On 12/31/05, Eelco Hillenius < [EMAIL PROTECTED]> wrote:
Wouldn't this make for a nice component? Something that works like a
border in that you can wrap any component in a transform component,
and that the xsl is attached as markup to that transform component?
public class MyTransform extends XslTransformBorder {
...
}
MyTransform.xsl
<xml...
...
MyPanel myPanel = new MyPanel("foo");
MyTransform t = new MyTransform(myPanel);
add(t);
Or maybe you want to turn this around and consider it as a behaviour
instead of a component:
MyPanel myPanel = new MyPanel("foo");
MyTransform t = new MyTransform();
TransformChain chain = new TransformChain().add(t);
myPanel.add(chain);
add(myPanel);
Eelco
On 12/30/05, Jim McLaughlin < [EMAIL PROTECTED]> wrote:
s/Ivan/Igor/g
So many apologies...
Jim McLaughlin wrote:
Thanks Ivan and Juergen! I will implement this and let you know my
results.
jim
Juergen Donnerstag wrote:
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
Wicket-user@lists.sourceforge.net
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
Wicket-user@lists.sourceforge.net
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
-------------------------------------------------------
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
Wicket-user@lists.sourceforge.net
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&opclick
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
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&opclick
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user