Issues with wicket updates

99 views
Skip to first unread message

Matthew Jones

unread,
Apr 20, 2016, 11:14:12 AM4/20/16
to sakai-dev
So is anyone a wicket expert? :)

I've been working the last few days on upgrading Dashboard and Delegated Access from Wicket 1.4 and 6 and they compile (which is the 90% easy problem) but there's obvious bugs in both that aren't present in the 1.4 version that I'm having a tough time figuring out. I checked both the profile 2 and sitestats update and neither of them had these patterns that these 2 tools have.

I'm referencing 
and

But they seem to be missing a lot of these migration cases.

Dashboard is at

Delegated access is at
With a PR in progress at

Here's the problems I'm seeing. (I'm hoping they're easy fixes!)

Delegated access
- It used a <wicket:component> tag, but this seems to have been removed. I can't see anything replacing it. I put the wicket id's in to the <tr> close by but the functionality is different between 1.4 and 6. It changes what used to be an Ajax call into a submit (for a DropDownChoice component). I feel like this may have to be rewritten
- It looks like they removed the ResourceStreamRequestTarget (for downloading attachments) I'm not sure what to replace this with yet.
- TreeTable is deprecated (and looks removed in 7) but it still *seems* to work. Though I'd like to replace it for TableTree as recommended. I'm not entirely sure how to do this yet.

Dashboard
- The biggest problem I'm getting here is that on every ajax call it seems to create a StalePageException from any of the requests (for instance trying to expand the description) and I don't know where this is coming from or why it's getting that now. I feel like some of this might need to be rewritten but was hoping to avoid that. 

2016-04-20 11:05:46,171  WARN http-nio-8080-exec-8 RequestCycleExtra - ********************************
2016-04-20 11:05:46,172  WARN http-nio-8080-exec-8 RequestCycleExtra - Handling the following exception
org.apache.wicket.core.request.mapper.StalePageException
2016-04-20 11:05:46,174  WARN http-nio-8080-exec-8 RequestCycleExtra - *******************************

- In Wicket 1.4, the star and hidden no longer worked, I was hoping an update would fix that, but it's not working and getting this exception now. https://jira.sakaiproject.org/browse/DASH-358

Any help would be appreciated. I'll probably keep poking away at these but they seem like blockers for 11. Maybe a different list for some of these.


Steve Swinsburg

unread,
Apr 21, 2016, 7:38:13 AM4/21/16
to Matthew Jones, sakai-dev
Hi Matthew,

wicket:component tag, never heard of it, even the docs seem to be non existent. Try wicket:container? Whats the use case for it? Can it just be a div and a WebMarkupContainer?

For downloading attachments, try a org.apache.wicket.markup.html.link.DownloadLink

TreeTable is deprecated as per the Javadocs: https://ci.apache.org/projects/wicket/apidocs/6.x/org/apache/wicket/extensions/markup/html/tree/table/TreeTable.html
Depending on the current setup, TableTree takes a list of Columns and a DataProvider. If you just have a list, try ListDataProvider as a simple IDataProvider wrapper around the list.

Can you post an example Ajax call for the StalePageException? StalePageException happens when you try to reuse a page that has already been rendered, seems odd code to be doing that.

Note that the majority of GradebookNG is in Wicket if you want some current code examples, it's all Wicket 6 and there should be some good patterns in there (better than Profile2 anyway :(

cheers,
Steve






--
You received this message because you are subscribed to the Google Groups "Sakai Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sakai-dev+...@apereo.org.
To post to this group, send email to saka...@apereo.org.
Visit this group at https://groups.google.com/a/apereo.org/group/sakai-dev/.

Matthew Jones

unread,
Apr 21, 2016, 12:06:06 PM4/21/16
to Steve Swinsburg, sakai-dev
Thanks Steve, these are some great tips. 

- I don't think TreeTable is a serious issue right now, I'll backburner that one. 

- <wicket:component> was briefly in the docs but only for like a week! 

v. 45 May 10, 2011 15:13 Martin Grigorov:
(Remove docu for wicket:component tag)

v. 44 May 03, 2011 04:37 Martin Grigorov:
(Add docu for wicket:component tag)

It said
"Element wicket:component
<wicket:component class="com.mycompany.myApp.MyTable" key1="value1" key2="value2"> tags may be used to add Wicket components (e.g. a specialized PageableListView) and pass parameters (e.g. the number of rows per list view page). The object is automatically instantiated, initialized and added to the page's component hierarchy.
Note: The component must have a constructor with a single String parameter: the component name.
Note: The component must provide a setter for each key/value attribute provided."

I'm not 100% sure why it's being used here, and I really am a noobie at Wicket. I'll try your suggestions though.

- I'll send you an example of the ajax calls, the calls are broken in 1.4 too for some reason, probably ever since the tool was removed from the iframes, but they're broken even more now. I think some of the issue is this page has a ton of old javascript that's trying to do what probably can just be done without it in 1.6 and resulting in mutliple calls. It's just a lot more cleanup.

Reply all
Reply to author
Forward
0 new messages