Hi all I'm seeking some more help with getting the Cobbler Snippets edit page to function correctly. I've based much of my work on Cobbler Snippets on the CryptoKey classes and jsp files.
The current problem I have is when I click on a snippet hyperlink, the page displays but the snippet content is not shown (http://tinypic.com/view.php?pic=mrv2ue&s=5 and http://tinypic.com/view.php?pic=1zb3o6v&s=5). I think that part of the problem is this code which I figure *should* run when a snippet is clicked on for editing. --- public abstract class BaseCobblerSnippetEditAction extends RhnAction { public static final String SNIPPET = "snippet"; public static final String NAME = "name"; public static final String CONTENTS = "contents"; public static final String snipDir = "/var/lib/cobbler/snippets/"; /** {...@inheritdoc} */ public ActionForward execute(ActionMapping mapping, ActionForm formIn, HttpServletRequest request, HttpServletResponse response) { if (!AclManager.hasAcl("user_role(org_admin)", request, null)) { //Throw an exception with a nice error message so the user //knows what went wrong. LocalizationService ls = LocalizationService.getInstance(); PermissionException pex = new PermissionException( "Only Org Admins can modify Cobbler snippets"); pex.setLocalizedTitle(ls.getMessage("permission.jsp.summary.acl.header")); pex.setLocalizedSummary(ls.getMessage("permission.jsp.summary.acl.reason5")); throw pex; } DynaActionForm form = (DynaActionForm) formIn; RequestContext ctx = new RequestContext(request); BaseCobblerSnippetCommand cmd = getCommand(ctx); StrutsDelegate strutsDelegate = getStrutsDelegate(); request.setAttribute(SNIPPET, cmd.getCobblerSnippet()); request.setAttribute(NAME, cmd.getName()); System.out.println("cmd.getName() returns " + cmd.getName()); if (cmd.getName() != null) { request.setAttribute(CONTENTS, getSnippetContentsByName(cmd.getName())); } --- The output from the System.out.println line in /var/log/tomcat5/catalina.out is "cmd.getName() returns null". Given that in the jsp file code/webapp/WEB-INF/pages/kickstart/cobbler/snippetedit.jsp the line "/var/lib/cobbler/snippets/<bean:write name="cobblerSnippetsForm" property="name" />" always shows the full snippet name, I'm confused why cmd.getName is null. Could I get some pointers on resolving this? Thanks CC NOTICE: This email and any attachments are confidential. They may contain legally privileged information or copyright material. You must not read, copy, use or disclose them without authorisation. If you are not an intended recipient, please contact us at once by return email and then delete both messages and all attachments. _______________________________________________ Spacewalk-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-devel
