|
Here's some new action classes for the user management jsps as well as changes to the xworks.xml file. 1. you must add Continuum class as a requirements of your action in plexus-request.xml. We don't use annotations for the moment in continuum, it's one of our tasks, but you can add annotations in your classes and they will be used when we'll active the descriptor generator 2. The class property used in xwork.xml must be the same of the role-hint of your action declared in plexus-request.xml 3. If your respect what I do for other screens, add and edit screens must be the same jsp with two execution method in the action. Henry, your patch on xwork.xml isn't correct. I don't want to see full classname in class property. It must be a short string that is the same of the role-hint of the action in plexus-request.xml Yup, I just figured it out with your reply to Teodoro above; will submit a new patch later. The handling of exceptions needs to be improved + catch (ContinuumException ce )
Please, don't use LogFactory but plexus logger instead. Plexus logger is our standard for all maven app. In action class, you can't extends AbstractLogEnabled because actions extends ActionSupport. We can create an abstract action class that implement the plexus logger interface and all actions will use it. fyi, the abstract class and test cases are a part of a patch I made on CONTINUUM-559, if emmanuel is happy with that we can apply that patch to this branch too maybe, it makes logging simple, just getLogger().info(), etc. It isn't CONTINUUM-559 but I'm happy with that but with some minor comments described in Here's a new patch with the imporved logging using Jesse's patch to henry, check out based on some feedback from trygve I moved that base class to the plexus-xwork-integration. The AbstractContinuumAction can be replaced with PlexusActionSupport from the latest snapshots of that dependency, a patch for that is on 781 as well.. it ought to make life a little easier in the long run cheers! File Attached: Here's an updated patch with working user management screen. This implements a straightforward permission management for each user (only add and delete with no zones or roles). This patch also uses Jesse's patch in Applied the patch in the branch, please look to Applied again for missing files. Attached patch fixed for NPE during action loading(because dependencies were not injected) and "add" links inside addUserRole.jsp. Attached File: This patches the file Menu.jsp and Continuum.properties. It adds the users management link to the menu when an administrator is logged in. Attached File: Refactored the user management actions so that they will be reusable. Applied patches but the last one that doesn't apply correctly. Also the solution goes through using maven-user as stated in |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I've studied this issue and a few questions pop up.
1. How to inject the class Continuum into the action? I've seen a lot of action classes under the package org.apache.maven.continuum.web.action but none of the files contains an annotation for injecting the class Continuum.
2. Looking through xwork.xml, I can see that the class property of action tag doesn't have the same name with that of the class implementing the action. In which, editSchedule instead of EditScheaduleAction. Is this correct? Also, it can't seem to locate users action if I don't put in the fully qualified domain name such as org.apache.maven.continuum.web.action.UsersAction.
3. addUser.jsp seems to be lacking under the webapp folder. Are we just using editUser.jsp for both add and edit operations?