Replace non-wicket attributed sections of a html document

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Replace non-wicket attributed sections of a html document

Andrew Moore
This post was updated on .
Hi,
I'm currently writing a CMS in wicket. One of the things I'm wanting to do is make it nice and flexible to be able to design new templates for rendering the page.

I'm looking at producing an image gallery at the moment.

For the moment I'm using <DUMMYimg wicket:id="image1" src="dummy.jpg"> or something similar in the html files, which is fine.

image1 would then be replaced by a Static Image of something like "/images/gallery/realImage1.jpg" or whatever..

The problem is, I'm wanting to be able to make it as flexible as possible for the designers to be able to use what they want re javascript and markup to get the page how they want it.

So for example, instead of referencing "/images/gallery/realImage1.jpg" via the wicket:id of an img tag, the value may want to be put into other parts of the html markup:
e.g.
<DUMMya href="#" onclick="showPreview('/images/gallery/realImage1.jpg','1');return false">
or
<DUMMYimg onmouseover="renderImage('/images/gallery/realImage1.jpg')>

or anything else really!

So is there anyway this could be done?
Maybe there is a way to process the HTML and replace data, so for exmaple I could have something like:

<DUMMYimg  src="$image1$">
<DUMMYa href="#" onclick="showPreview('$image1$','1');return false">
<DUMMYimg onmouseover="renderImage('$image1$')>

and replace $image1$ with '/images/gallery/realImage1.jpg' while rendering the page.

Anyone any suggestions?
Thanks
Andrew

note: remove the ref to DUMMY when reading this, I couldn't get nabble to display properly with the tags in.
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Erik van Oosten (old)
Hi Andrew,

Your use-case is exactly what Wicket is about. In the template file, use
wicket:id attributes on the img tag. Place these tags in some kind of
container (span or div element) to be able to repeat it. In the code you
can attach an instance of Image (or variations, see javadoc). Use a
ListView or Repeater to repeat the images.

You can find more information in the javadocs and on the Wiki. In
particular
http://cwiki.apache.org/WICKET/newuserguide.html,
http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html and
http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html.

Regards,
     Erik


Andrew Moore wrote:

> Hi,
> I'm currently writing a CMS in wicket. One of the things I'm wanting to do
> is make it nice and flexible to be able to design new templates for
> rendering the page.
>
> I'm looking at producing an image gallery at the moment.
>
> For the moment I'm using  dummy.jpg  or something similar in the html files,
> which is fine.
>
> image1 would then be replaced by a Static Image of something like
> "/images/gallery/realImage1.jpg" or whatever..
>
> The problem is, I'm wanting to be able to make it as flexible as possible
> for the designers to be able to use what they want re javascript and markup
> to get the page how they want it.
>
> So for example, instead of referencing "/images/gallery/realImage1.jpg" via
> the wicket:id of an img tag, the value may want to be put into other parts
> of the html markup:
> e.g.
> #
> or
>
>
> or anything else really!
>
> So is there anyway this could be done?
> Maybe there is a way to process the HTML and replace data, so for exmaple I
> could have something like:
>
> $image1$
> #
>
>
> and replace $image1$ with '/images/gallery/realImage1.jpg' while rendering
> the page.
>
> Anyone any suggestions?
> Thanks
> Andrew
>
>  

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Andrew Moore
Hi,
Thanks for your reply.
I'm familiar with wicket (reasonably anyway), that may not have been clear from the post.
The admin of the CMS system is all using wicket, and I'm fairly happy with that.

The situation is where the CMS content template pages are unknown in structure, but I just want to be able to insert a marker into the page to replace certain values (as I'm not sure which component the references may be in - ie in the src attribute of an img tag, or in a parameter passed to some javascript etc), so I can't map wicket components to the dynamic content.

I've noticed the wicket velocity and wicket freemarker contrib projects, would these accomplish what I want?

I still want to have the functionality of wicket (which is great), but just want to be able to do effectivley some global replaces on the generated html markup to replace some markers with actual values.
Hope that makes it a little clearer.
Cheers
Andrew



Erik van Oosten wrote
Hi Andrew,

Your use-case is exactly what Wicket is about. In the template file, use
wicket:id attributes on the img tag. Place these tags in some kind of
container (span or div element) to be able to repeat it. In the code you
can attach an instance of Image (or variations, see javadoc). Use a
ListView or Repeater to repeat the images.

You can find more information in the javadocs and on the Wiki. In
particular
http://cwiki.apache.org/WICKET/newuserguide.html,
http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html and
http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html.

Regards,
     Erik


Andrew Moore wrote:
> Hi,
> I'm currently writing a CMS in wicket. One of the things I'm wanting to do
> is make it nice and flexible to be able to design new templates for
> rendering the page.
>
> I'm looking at producing an image gallery at the moment.
>
> For the moment I'm using  dummy.jpg  or something similar in the html files,
> which is fine.
>
> image1 would then be replaced by a Static Image of something like
> "/images/gallery/realImage1.jpg" or whatever..
>
> The problem is, I'm wanting to be able to make it as flexible as possible
> for the designers to be able to use what they want re javascript and markup
> to get the page how they want it.
>
> So for example, instead of referencing "/images/gallery/realImage1.jpg" via
> the wicket:id of an img tag, the value may want to be put into other parts
> of the html markup:
> e.g.
> #
> or
>
>
> or anything else really!
>
> So is there anyway this could be done?
> Maybe there is a way to process the HTML and replace data, so for exmaple I
> could have something like:
>
> $image1$
> #
>
>
> and replace $image1$ with '/images/gallery/realImage1.jpg' while rendering
> the page.
>
> Anyone any suggestions?
> Thanks
> Andrew
>
>  

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Erik van Oosten (old)
Hi Andrew,

I see. Yes that makes it quite different. I am not knowledgeable enough
on dynamic templates. So other could help you better.

There are a few other attempt to write Wicket components for a CMS.
Perhaps you can learn from those.
http://burgerweeshuis.sourceforge.net/
http://wicket-stuff.svn.sourceforge.net/viewvc/wicket-stuff/branches/WICKET_1_2/wicket-kronos-cms/

Regards,
     Erik.



Andrew Moore wrote:

> Hi,
> Thanks for your reply.
> I'm familiar with wicket (reasonably anyway), that may not have been clear
> from the post.
> The admin of the CMS system is all using wicket, and I'm fairly happy with
> that.
>
> The situation is where the CMS content template pages are unknown in
> structure, but I just want to be able to insert a marker into the page to
> replace certain values (as I'm not sure which component the references may
> be in - ie in the src attribute of an img tag, or in a parameter passed to
> some javascript etc), so I can't map wicket components to the dynamic
> content.
>
> I've noticed the wicket velocity and wicket freemarker contrib projects,
> would these accomplish what I want?
>
> I still want to have the functionality of wicket (which is great), but just
> want to be able to do effectivley some global replaces on the generated html
> markup to replace some markers with actual values.
> Hope that makes it a little clearer.
> Cheers
> Andrew
>
>
>
>
> Erik van Oosten wrote:
>  
>> Hi Andrew,
>>
>> Your use-case is exactly what Wicket is about. In the template file, use
>> wicket:id attributes on the img tag. Place these tags in some kind of
>> container (span or div element) to be able to repeat it. In the code you
>> can attach an instance of Image (or variations, see javadoc). Use a
>> ListView or Repeater to repeat the images.
>>
>> You can find more information in the javadocs and on the Wiki. In
>> particular
>> http://cwiki.apache.org/WICKET/newuserguide.html,
>> http://cwiki.apache.org/WICKET/listview-and-other-repeaters.html and
>> http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html.
>>
>> Regards,
>>      Erik
>>
>>
>> Andrew Moore wrote:
>>    
>>> Hi,
>>> I'm currently writing a CMS in wicket. One of the things I'm wanting to
>>> do
>>> is make it nice and flexible to be able to design new templates for
>>> rendering the page.
>>>
>>> I'm looking at producing an image gallery at the moment.
>>>
>>> For the moment I'm using  dummy.jpg  or something similar in the html
>>> files,
>>> which is fine.
>>>
>>> image1 would then be replaced by a Static Image of something like
>>> "/images/gallery/realImage1.jpg" or whatever..
>>>
>>> The problem is, I'm wanting to be able to make it as flexible as possible
>>> for the designers to be able to use what they want re javascript and
>>> markup
>>> to get the page how they want it.
>>>
>>> So for example, instead of referencing "/images/gallery/realImage1.jpg"
>>> via
>>> the wicket:id of an img tag, the value may want to be put into other
>>> parts
>>> of the html markup:
>>> e.g.
>>> #
>>> or
>>>
>>>
>>> or anything else really!
>>>
>>> So is there anyway this could be done?
>>> Maybe there is a way to process the HTML and replace data, so for exmaple
>>> I
>>> could have something like:
>>>
>>> $image1$
>>> #
>>>
>>>
>>> and replace $image1$ with '/images/gallery/realImage1.jpg' while
>>> rendering
>>> the page.
>>>
>>> Anyone any suggestions?
>>> Thanks
>>> Andrew
>>>
>>>  
>>>      
>> --
>> Erik van Oosten
>> http://www.day-to-day-stuff.blogspot.com/
>>
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> Wicket-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
>>
>>    
>
>  

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Eelco Hillenius
In reply to this post by Andrew Moore
> Hi,
> Thanks for your reply.
> I'm familiar with wicket (reasonably anyway), that may not have been clear
> from the post.
> The admin of the CMS system is all using wicket, and I'm fairly happy with
> that.
>
> The situation is where the CMS content template pages are unknown in
> structure, but I just want to be able to insert a marker into the page to
> replace certain values (as I'm not sure which component the references may
> be in - ie in the src attribute of an img tag, or in a parameter passed to
> some javascript etc), so I can't map wicket components to the dynamic
> content.
>
> I've noticed the wicket velocity and wicket freemarker contrib projects,
> would these accomplish what I want?

Yep, I think that's the way to go. Or something similar. You basically
expose limited funcionality (e.g. via Velocity tools) and let the
users decide what they want to do with it.

Eelco

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Andrew Moore
I've had a go with the freemarker panel, and can get a simple example going.

The thing is, instead of having a panel with a span tag, I'd like to actually parse the whole .html template file that gets generated by wicket. Does anyone know if it's possible to do that?

Is there a way of getting at the whole markup response that's been generated and modifying it before it's rendered?


Eelco Hillenius wrote
> Hi,
> Thanks for your reply.
> I'm familiar with wicket (reasonably anyway), that may not have been clear
> from the post.
> The admin of the CMS system is all using wicket, and I'm fairly happy with
> that.
>
> The situation is where the CMS content template pages are unknown in
> structure, but I just want to be able to insert a marker into the page to
> replace certain values (as I'm not sure which component the references may
> be in - ie in the src attribute of an img tag, or in a parameter passed to
> some javascript etc), so I can't map wicket components to the dynamic
> content.
>
> I've noticed the wicket velocity and wicket freemarker contrib projects,
> would these accomplish what I want?

Yep, I think that's the way to go. Or something similar. You basically
expose limited funcionality (e.g. via Velocity tools) and let the
users decide what they want to do with it.

Eelco

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Igor Vaynberg-2
see IResponseFilter, install your own and you are good to go.

-igor


On 4/24/07, Andrew Moore <[hidden email]> wrote:

I've had a go with the freemarker panel, and can get a simple example going.

The thing is, instead of having a panel with a span tag, I'd like to
actually parse the whole .html template file that gets generated by wicket.
Does anyone know if it's possible to do that?

Is there a way of getting at the whole markup response that's been generated
and modifying it before it's rendered?



Eelco Hillenius wrote:

>
>> Hi,
>> Thanks for your reply.
>> I'm familiar with wicket (reasonably anyway), that may not have been
>> clear
>> from the post.
>> The admin of the CMS system is all using wicket, and I'm fairly happy
>> with
>> that.
>>
>> The situation is where the CMS content template pages are unknown in
>> structure, but I just want to be able to insert a marker into the page to
>> replace certain values (as I'm not sure which component the references
>> may
>> be in - ie in the src attribute of an img tag, or in a parameter passed
>> to
>> some javascript etc), so I can't map wicket components to the dynamic
>> content.
>>
>> I've noticed the wicket velocity and wicket freemarker contrib projects,
>> would these accomplish what I want?
>
> Yep, I think that's the way to go. Or something similar. You basically
> expose limited funcionality (e.g. via Velocity tools) and let the
> users decide what they want to do with it.
>
> Eelco
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>

--
View this message in context: http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a10162589
Sent from the Wicket - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Andrew Moore
Thanks again igor (you always seem to be able to fix any problems I'm having getting to grasps with wicket)
I've now got a basic IResponseFilter running that will stick data into freemarker tags.

At the moment though I'm creating a HashMap of values to put into freemarker directly in the Filter (just for testing purposes), whereas I really want to create a HashMap in the page I'm currently generating and either pass, or make it available to the filter, but I can't think how I would do that.

So, how to I get data from the Page Class I have to the IResponseFilter? All the examples I could find, just use data directly available from the FilterClass (like system time).

Thanks again,
Andrew



igor.vaynberg wrote
see IResponseFilter, install your own and you are good to go.

-igor


On 4/24/07, Andrew Moore <andrewpmoore@bigfoot.com> wrote:
>
>
> I've had a go with the freemarker panel, and can get a simple example
> going.
>
> The thing is, instead of having a panel with a span tag, I'd like to
> actually parse the whole .html template file that gets generated by
> wicket.
> Does anyone know if it's possible to do that?
>
> Is there a way of getting at the whole markup response that's been
> generated
> and modifying it before it's rendered?
>
>
>
> Eelco Hillenius wrote:
> >
> >> Hi,
> >> Thanks for your reply.
> >> I'm familiar with wicket (reasonably anyway), that may not have been
> >> clear
> >> from the post.
> >> The admin of the CMS system is all using wicket, and I'm fairly happy
> >> with
> >> that.
> >>
> >> The situation is where the CMS content template pages are unknown in
> >> structure, but I just want to be able to insert a marker into the page
> to
> >> replace certain values (as I'm not sure which component the references
> >> may
> >> be in - ie in the src attribute of an img tag, or in a parameter passed
> >> to
> >> some javascript etc), so I can't map wicket components to the dynamic
> >> content.
> >>
> >> I've noticed the wicket velocity and wicket freemarker contrib
> projects,
> >> would these accomplish what I want?
> >
> > Yep, I think that's the way to go. Or something similar. You basically
> > expose limited funcionality (e.g. via Velocity tools) and let the
> > users decide what they want to do with it.
> >
> > Eelco
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a10162589
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Tremelune
Have you come up with workable code? I'm about to do what you have just done with freemarker.



<quote author="Andrew Moore">
Thanks again igor (you always seem to be able to fix any problems I'm having getting to grasps with wicket)
I've now got a basic IResponseFilter running that will stick data into freemarker tags.

At the moment though I'm creating a HashMap of values to put into freemarker directly in the Filter (just for testing purposes), whereas I really want to create a HashMap in the page I'm currently generating and either pass, or make it available to the filter, but I can't think how I would do that.

So, how to I get data from the Page Class I have to the IResponseFilter? All the examples I could find, just use data directly available from the FilterClass (like system time).

Thanks again,
Andrew



igor.vaynberg wrote
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Tremelune
In reply to this post by Andrew Moore
Hm, still a good question. How do you get the IResponseFilter in there? There doesn't seem to be a way to do anything with the RequestCycle, and getApplication().getRequestCycleSettings() doesn't seem to have a place to set the IResponseFilter...I would also like to ensure that the custom response filter that does the FreeMarkering is only applied to the current request. Any tips/snippets?



Andrew Moore wrote
Thanks again igor (you always seem to be able to fix any problems I'm having getting to grasps with wicket)
I've now got a basic IResponseFilter running that will stick data into freemarker tags.

At the moment though I'm creating a HashMap of values to put into freemarker directly in the Filter (just for testing purposes), whereas I really want to create a HashMap in the page I'm currently generating and either pass, or make it available to the filter, but I can't think how I would do that.

So, how to I get data from the Page Class I have to the IResponseFilter? All the examples I could find, just use data directly available from the FilterClass (like system time).

Thanks again,
Andrew

Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Igor Vaynberg-2
it is a global thing, so it will be applied to all request.

getRequestCycleSettings().getResponseFilters().add(new MyFIlter());

-igor


On 8/8/07, Tremelune <[hidden email]> wrote:

>
>
> Hm, still a good question. How do you get the IResponseFilter in there?
> There
> doesn't seem to be a way to do anything with the RequestCycle, and
> getApplication().getRequestCycleSettings() doesn't seem to have a place to
> set the IResponseFilter...I would also like to ensure that the custom
> response filter that does the FreeMarkering is only applied to the current
> request. Any tips/snippets?
>
>
>
>
> Andrew Moore wrote:
> >
> > Thanks again igor (you always seem to be able to fix any problems I'm
> > having getting to grasps with wicket)
> > I've now got a basic IResponseFilter running that will stick data into
> > freemarker tags.
> >
> > At the moment though I'm creating a HashMap of values to put into
> > freemarker directly in the Filter (just for testing purposes), whereas I
> > really want to create a HashMap in the page I'm currently generating and
> > either pass, or make it available to the filter, but I can't think how I
> > would do that.
> >
> > So, how to I get data from the Page Class I have to the IResponseFilter?
> > All the examples I could find, just use data directly available from the
> > FilterClass (like system time).
> >
> > Thanks again,
> > Andrew
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a12063101
> Sent from the Wicket - User (OLD) mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> IMPORTANT NOTICE:
>
> This mailing list is shutting down. Please subscribe to the Apache Wicket
> user list. Send a message to: "users-subscribe at wicket.apache.org" and
> follow the instructions.
> _______________________________________________
> Wicket-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: "users-subscribe at wicket.apache.org" and follow the instructions.
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Andrew Moore
In reply to this post by Tremelune
Hi,
I didn't find a solution, I ended up just using freemarker and servlets for pages where I needed to do this which isn't too bad for me as I've two main sections to my application one uses wicket and the other uses freemarker.


<quote author="Tremelune">
Have you come up with workable code? I'm about to do what you have just done with freemarker.



Andrew Moore wrote
Thanks again igor (you always seem to be able to fix any problems I'm having getting to grasps with wicket)
I've now got a basic IResponseFilter running that will stick data into freemarker tags.

At the moment though I'm creating a HashMap of values to put into freemarker directly in the Filter (just for testing purposes), whereas I really want to create a HashMap in the page I'm currently generating and either pass, or make it available to the filter, but I can't think how I would do that.

So, how to I get data from the Page Class I have to the IResponseFilter? All the examples I could find, just use data directly available from the FilterClass (like system time).

Thanks again,
Andrew



igor.vaynberg wrote
Reply | Threaded
Open this post in threaded view
|

Re: Replace non-wicket attributed sections of a html document

Igor Vaynberg-2
you couldve used a freemarkerpanel i suppose. depends on the usecase.

-igor


On 8/8/07, Andrew Moore <[hidden email]> wrote:

>
>
> Hi,
> I didn't find a solution, I ended up just using freemarker and servlets
> for
> pages where I needed to do this which isn't too bad for me as I've two
> main
> sections to my application one uses wicket and the other uses freemarker.
>
>
>
> Have you come up with workable code? I'm about to do what you have just
> done
> with freemarker.
>
>
>
>
> Andrew Moore wrote:
> >
> > Thanks again igor (you always seem to be able to fix any problems I'm
> > having getting to grasps with wicket)
> > I've now got a basic IResponseFilter running that will stick data into
> > freemarker tags.
> >
> > At the moment though I'm creating a HashMap of values to put into
> > freemarker directly in the Filter (just for testing purposes), whereas I
> > really want to create a HashMap in the page I'm currently generating and
> > either pass, or make it available to the filter, but I can't think how I
> > would do that.
> >
> > So, how to I get data from the Page Class I have to the IResponseFilter?
> > All the examples I could find, just use data directly available from the
> > FilterClass (like system time).
> >
> > Thanks again,
> > Andrew
> >
> >
> >
> >
> > igor.vaynberg wrote:
> >>
> >>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Replace-non-wicket-attributed-sections-of-a-html-document-tf3636913.html#a12066643
> Sent from the Wicket - User (OLD) mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> IMPORTANT NOTICE:
>
> This mailing list is shutting down. Please subscribe to the Apache Wicket
> user list. Send a message to: "users-subscribe at wicket.apache.org" and
> follow the instructions.
> _______________________________________________
> Wicket-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
IMPORTANT NOTICE:

This mailing list is shutting down. Please subscribe to the Apache Wicket user list. Send a message to: "users-subscribe at wicket.apache.org" and follow the instructions.
_______________________________________________
Wicket-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/wicket-user