Hi,

okay I'm kinda lost and I think i'm either doing somehting fundamentally wrong 
or missing something really stupid......

   Me too. I tried to study the junit test that (re)renders a component, but
   cannot get it working with browser. What I tried was to create AjaxHandler to
   component and attempt to render that component in ajax handler's respond 
method:

protected void respond()
{
 RequestCycle cycle = RequestCycle.get();
 cycle.setRequestTarget(new ComponentRequestTarget(c));
}

      It spits out following exception:

[http-80-Processor24] ERROR Index: 30, Size: 17
java.lang.IndexOutOfBoundsException: Index: 30, Size: 17
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at java.util.Collections$UnmodifiableList.get(Collections.java:1155)
at wicket.markup.Markup.get(Markup.java:143)
at wicket.markup.MarkupStream.get(MarkupStream.java:324)
at wicket.markup.MarkupStream.setCurrentIndex(MarkupStream.java:202)
at wicket.Component.validateMarkupStream(Component.java:1442)
at wicket.markup.html.panel.Panel.onRender(Panel.java:79)

   When I look at markupStream members in debugger, the don't look like markup 
of my panel.
   I would really appreciate a list of steps required to get a component 
rendered so that
   result goes back to browser. I don't need a complete implementation as I can 
use cvs version
   of wicket and fill in missing parts myself (if they are not of huge) but 
currently I must admit that I don't
   know where to start from.

       Ari S.



this is the error I get when i call someRequestCycle.request(myLabel) .... I studied the simplepageTest rerender calls, I created a ComponentRequestTarget, set the target, and tried a lot of other things...... i keep getting the session error.

10:52:51.477 WARN!! Exception for /dojo/app?path=2:link1&interface=ILinkListener
java.lang.IllegalStateException: Internal Error: Page not attached to session.

the generated page is

<span wicket:id="wid">replaced</span><html>
<head>
<title>Error 500 Internal+Error%3A+Page+not+attached+to+session</title>
</head>
<body>
<h2>HTTP ERROR: 500 Internal+Error%3A+Page+not+attached+to+session</h2>
<p>RequestURI=/dojo/app</p>
<p><i><small><a href="http://jetty.mortbay.org";>Powered by 
Jetty://</a></small></i></p>
                                                                                
</body>
</html>



Eelco Hillenius wrote:

Yeah. I'm just saying that you /should/ work with request targets
instead of trying to render the component directly.

Eelco

On 12/2/05, Johan Compagner <[EMAIL PROTECTED]> wrote:

that is what RequestCycle.request(component) does (and how the
SimplePageTest works)


On 12/2/05, Eelco Hillenius < [EMAIL PROTECTED]> wrote:

you should use requestcycle.setResponseTarget with ComponentRequestTarget

Eelco

On 12/2/05, Marco van de Haar <[EMAIL PROTECTED]> wrote:

Is there any concrete (simple) code example for rerendering a part of a
page? I tried myRequestCycle.request(myComponent), but all I got were
huge errors in my console.


Ari Suutari wrote:


Hi,


Project wicket-stuff contains already some AJAX components
(scriptaculous and dojo based ones). Wicket core contain a

AjaxHandler

and we provide a yet experimental component level re-render
(requestcycle.render(component). Though the latter one is no yet
accessible through a URL (that piece of code is missing; we've only
tested it with junit tests). So, yes some parts have been done, it is
not ready yet, but I think we are on a good way and some features can
be used already. Because it is in an dev stage, feedback is very much
welcome.

  So, If I create my own component (that I'm going to re-render
  with ajax) and add an interface based on IRequestListener I
  could build an URL that calls my component via that interface
  and returns re-rendering of component using
requestcycle.render(this) ?

  Or is there a better way ? I took a look how IOnChangeListener is
  implemented on DropDownChoice and it looks rather simple to
  implement such a thing (although DropDownChoice uses it
  for different purposes)

      Ari S.


Juergen

On 11/25/05, Ari Suutari < [EMAIL PROTECTED]> wrote:


Hi,

We are developing applications, which have kind of a content 'push'
system,
ie. data arrives from factory automation and we visualize it

on-line.

Our traditional approach to this has been to send the data to

browser

(via applet and additional tcp socket) and use javascript to render

it.

However, I'm a little bit tempted to adjust our architecture so that
we would only push a notification of change and then use ajax
to re-render part of page.

Would it be possible with wicket ? Typically, the part that
would be re-rendered with ajax is just a text field or a table
(rendering whole page is too slow, since the data rate
can be quite fast; also flashes too much for slower cases).

There was some discussion on mailing list that something like
this would be in 1.2 ?

  Ari S.







-------------------------------------------------------

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Ìk
_______________________________________________
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
_______________________________________________
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_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&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_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
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to