Hi Raphael, --- Rapha�l Luta <[EMAIL PROTECTED]> wrote:
> Dan Moore wrote: > > > Hi folks, > > > > I'm interested in changing the customizer. In particular, some of > the > > UI requirements are > > 1. moving portlets (which will always be done within one column) > takes > > place in a select box. > > 2. removing portlets needs to be checkboxes > > 3. Adding portlets needs to happen in one step. (Well, two steps, > > actually--go to a page with a set of portlets, select them, and > have > > them added.) > > > > I've done #1 by modifying > > > org.apache.jetspeed.modules.actions.controllers.MultiColumnControllerAction.doSave(), > > and I feel like #2 is possible via the same means. > > > > Two questions: > > 1. Is hacking the source code the best way to implement these > changes? > > I looked on the mailing list and in the config files and didn't see > any > > alternative. > > > > You'll be better off copying the Action class or whatever class you > customize and register your modified class in the Registry > in A MyCustomizeSetPortlet and update the properties file to use this > one instead of the original one. > This way your changes won't be messed if you upgrade to a new version > of > jetspeed. I subclassed the MultiColumnControllerAction and overrode the relevant methods. I changed the value in controllers.xreg--is that the registry you're talking about (I also looked in registry.xml and didn't see anything that looked relevant)? Unfortunately, I had to put my subclass in the same package as MultiColumnControllerAction; it wasn't found otherwise. Jetspeed seemed to ignore the modules.packages property I added to TurbineResources.properties. Or are you referring to the PortletSetCustomizer in admin.xreg? Doesn't that refer to portlet specific customization, not the customizer? Or am I missing something? > Even if you describe it, I assume you have updated the relevant > Velocity > templates in webapp/WEB-INF/templates to show your select boxes. Yes, I modified WEB-INF/templates/vm/controllers/html/multicolumn-customize.vm to show the select boxes. > I'm not exactly sure why you had to modify the action class since #1 > and > #2 look to me as only simplification of the UI (ie the templates) > without major impact on the backend code. Unfortunately, I couldn't figure out how to do it easily. It looks like the templates and java classes have a common data structure, the customize-columns attribute of the SessionState. I'm not sure how to modify that in velocity--I couldn't find a reference to that attribute in any of the velocity templates. > > 2. Is #3 possible? Any hints on thois? From the behavior and > > glancing at the source, it looks like the add page modifies a > variable > > in PageSessionState, which is then saved in the doSave() method. > > > > I don't understand the difference with the current process. > So I'll say it's pretty simple to implement but you may need to > explain > in more details what you're trying to achieve and how it differs from > > the default behavior if you want more information on this. Right now, here's the process I go through to add a portlet to a pane. 1. Click on the customize button of a pane. 2. Click on the 'Add Portlet' button. 3. Choose a portlet or two. 4. Click 'Apply.' 5. Click 'Save and Apply.' I'd like to turn that into this process: 1. Click on the 'add content' button of a pane. 2. Choose a portlet or two. 3. Click 'Save and Apply.' I tried fiddling with the url I'm sent to after clicking the add button and going there directly after logging in, but I seem to have to go through the intermediate step (when I try to go directly, I'm just returned to the home page). Perhaps the information that the add action needs is not present. Thanks for your time. Dan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
