Landry,
 
Component has a replaceComponentTagBody(markupStream, openTag, content)
method.

Regards - Cemal
http://www.jWeekend.co.uk http://jWeekend.co.uk 



landry soules wrote:
> 
> Thanks a lot for your answer, Cemal, my first problem is solved !
> For the second one, i can get the content, thanks to your explanation, but
> can't figure out how to modify it before it's displayed.
> Here is what i do :
> 
>         add(new Include("stat",
>                 "http://myurl";) {
>             protected void onComponentTagBody(MarkupStream markupStream,
>                     ComponentTag openTag) {
>                 super.onComponentTagBody(markupStream, openTag);
>                 String content = importAsString();
> 
>                logger.debug(content);
>             }
>         }.setEscapeModelStrings(false));
> 
> 
> But how can i inject my modified content back to my component ?
> 
> Best regards.
> 
> 
> Landry
> 
> 
> 
> 2008/8/19 jWeekend <[EMAIL PROTECTED]>
> 
>>
>> Landry,
>>
>> 1 - setEscapeModelStrings(false)
>> 2 - Subclass Include. Override onComponentTagBody and use
>> importAsString()
>>
>> Regards - Cemal
>> http://www.jWeekend.co.uk http://jWeekend.co.uk
>>
>>
>> landry soules wrote:
>> >
>> > Hello,
>> >
>> > In my firm, we're currently using a homegrown component-like framework,
>> > based on cgi-perl scripts calling servlets. I would like to prove my
>> > boss how smooth the transition towards Wicket could be.
>> > I'm trying to make a first step, replacing the perl scripts with
>> Wicket,
>> > and calling the components (here servlets), with Include. But i have 2
>> > problems :
>> >
>> > 1/ When i call a servlet that has several parameters, for example
>> > add(*new**
>> >
>> *Include("maxMin","http://myserver/maxminservlet?id=0001&periodes=1st;1a
>> ;"));
>> > Wicket actually replaces "&" with "&amp;", as shown in the trace :
>> > DEBUG - UrlResourceStream          - cannot convert url:
>> > http://myserver/maxminservlet?id=0001&amp;periodes=1st;1a; to file (URI
>> > scheme is not "file"), falling back to the inputstream for polling
>> > This alters my servlet's behaviour, is there a mean to avoid this
>> > substitution ?
>> >
>> > 2/ Is it possible to catch the content of the include, and so possibly
>> > modify it before it is actually displayed in my Wicket page ?
>> >
>> >
>> > Thanks for your help
>> >
>> >
>> > Landry
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/2-questions-on-Include-tp19036146p19041450.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/2-questions-on-Include-tp19036146p19045669.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to