Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
...nobody




JSPWiki v2.2.33

[RSS]


Hide Menu

Sandbox


Difference between version 24 and version 23:

At line 3 changed 11 lines.
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) {
binder.registerCustomEditor(Set.class, "roles", new CustomCollectionEditor(Set.class) {
protected Object convertElement(Object element) {
if (element != null) {
Long id = new Long((String)element);
Role role = roleDAO.getRole(id);
return role;
}
return null;
}
});
protected Object formBackingObject(HttpServletRequest request)
throws ServletException {
String userId = request.getParameter("id");
if ((userId != null) && !userId.equals("")) {
return mgr.getUser(userId);
} else {
return new User();
}

Back to Sandbox, or to the Page History.