Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » How can I add my script code in server side dynamically?
How can I add my script code in server side dynamically? [message #522230] Sun, 21 March 2010 14:59 Go to next message
wayne  is currently offline wayne Friend
Messages: 13
Registered: March 2010
Junior Member
I just want to know how I can add a piece of js code dynamically in runtime. Where can I?

Could someone help me?
Re: How can I add my script code in server side dynamically? [message #522243 is a reply to message #522230] Sun, 21 March 2010 17:24 Go to previous message
Onno  is currently offline Onno Friend
Messages: 7
Registered: September 2009
Junior Member
Hi Wayne,

you can use the HtmlResponseWriter for this purpose.

For example:

HtmlResponseWriter writer = ContextProvider.getStateInfo().getResponseWriter();
writer.write(string);


You should do this at a reasonable point of your applications life cycle. You can add a PhaseListener and for example do this before the render phase. Don't forget to remove the Listener afterwards, if you want to do it only once.

Greetings,
Onno
Previous Topic:[ANN] RAP 1.3 M6 is available
Next Topic:[PATCH] Generating Menu Contributions at Run-time
Goto Forum:
  


Current Time: Mon Oct 14 02:30:52 GMT 2024

Powered by FUDForum. Page generated in 0.03651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top