Re: JavsScriptUtils.writeJavaScript() in onRender() after Ajax updates

2013-02-24 Thread Martin Dietze
On Fri, February 22, 2013, Sven Meier wrote:

> Which Wicket version? Is this rendered on an Ajax request?

It's Wicket 6.6.0, and, yes, it's rendered on an Ajax request.

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Steht ein Bratscher vor 'ner Kneipe.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: JavsScriptUtils.writeJavaScript() in onRender() after Ajax updates

2013-02-22 Thread Sven Meier

That should work.

Which Wicket version? Is this rendered on an Ajax request?

Sven

On 02/22/2013 05:07 PM, Martin Dietze wrote:

I've implemented a live search functionality where after
changes the search results get displayed in a flyout menu.
In the search results I add a css class to the search terms for
highlighting them. This is done in the onRender() method:

| public abstract class LiveSearchResultsFragment extends Fragment {
|
|   // ...
|
|   @Override
|   public void onRender() {
|   final Response response = getResponse();
|   // generate JS code
|   JavaScriptUtils.writeJavaScript(response, /* my JS code */);

The above class is used to derive Subclasses in different pages
where this functionality is needed.

In the debugger I can see that the method is called and that the
response contains the code I've inserted. However the changes
never make it into the markup which is actually rendered.

Is this kind of thing no longer supported, or *should* it work?

Cheers,

M'bert




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



JavsScriptUtils.writeJavaScript() in onRender() after Ajax updates

2013-02-22 Thread Martin Dietze
I've implemented a live search functionality where after
changes the search results get displayed in a flyout menu.
In the search results I add a css class to the search terms for
highlighting them. This is done in the onRender() method:

| public abstract class LiveSearchResultsFragment extends Fragment {
|
|   // ...
| 
|   @Override
|   public void onRender() {
|   final Response response = getResponse();
|   // generate JS code
|   JavaScriptUtils.writeJavaScript(response, /* my JS code */);

The above class is used to derive Subclasses in different pages
where this functionality is needed.

In the debugger I can see that the method is called and that the
response contains the code I've inserted. However the changes
never make it into the markup which is actually rendered. 

Is this kind of thing no longer supported, or *should* it work?

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
WE ARE THE BORG - RESISTANCE IS VOLTAGE DIVIDED BY CURRENT!

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org