Raible's Wiki
Raible Designs AppFuseHomepage- Korean - Chinese - Italian - Japanese QuickStart Guide User Guide Tutorials Other ApplicationsStruts ResumeSecurity Example Struts Menu
Set your name in
UserPreferences
Referenced by
JSPWiki v2.2.33
Hide Menu |
This is version 33.
It is not the current version, and thus it cannot be edited. Take part in a Struts Resume Architecture Discussion. 2003.10.30 - Thank you number 2 for the Doclet KingNow that the initial thank you is out of the way, here is Thank You #2. I think you should be declared "Doclet King" for the way you have embraced doclet-related software (probably Erik Hatcher too). In any case, since you love doclets sooo much (xdoclet, junitdoclet, etc.), let me introduce you to dbdoclet (DocBook Doclet). This doclet creates DocBook output from Java source documentation (javadoc comments). One of the most common uses for this DocBook output is to convert it into PDF. So, instantly (within reason) you can have PDF javadoc documentation. Here's what you need to add to your build.xml (my build.xml is slightly different from struts-resume/appfuse, but you'll figure it out). A portion of my build.xml watch out for packagenames="ca.*" (adjust accordingly) <!-- ==================== pdfdoc Target ============================= --> <target name="pdfdoc" depends="compile" description="Create PDF documentation"> <mkdir dir="${dist.apidocs}"/> <!-- === docbook === --> <echo message="Creating docbook"/> <javadoc sourcepath="${src.dir};${gen.dir}" destdir="${dist.apidocs}" packagenames="ca.*"> <classpath refid="compile.classpath"/> <doclet name="com.mf.doclet.docbook.DocBookDoclet" path="${dbdoclet.dir}/doclet/lib/dbdoclet.jar"> <param name="-properties" value="dbdoclet.properties"/> </doclet> </javadoc> <!-- === convert to Full XML with XIncluder === --> <echo message="Running XIncluder"/> <java classname="com.elharo.xml.xinclude.SAXXIncluder" failonerror="yes" dir="${dist.apidocs}" output="${dist.apidocs}/reference-full.xml" fork="yes"> <classpath refid="dbdoclet.xincluder.classpath"/> <arg line="reference.xml"/> </java> <!-- === filter fo.xsl === --> <copy tofile="${dist.apidocs}/fo.xsl" file="${metadata.dir}/xsl/fo.xsl"> <filterset> <filter token="DBDOCLET_HOME" value="${dbdoclet.dir}"/> </filterset> </copy> <!-- === convert to pdf === --> <echo message="Converting to PDF"/> <java classname="org.apache.fop.apps.Fop" failonerror="yes" dir="${dist.apidocs}" fork="yes"> <classpath refid="dbdoclet.fop.classpath"/> <arg line="-xml reference-full.xml"/> <arg line="-xsl fo.xsl"/> <arg line="-pdf reference.pdf"/> </java> </target> This portion of build.xml is dependent on the following metadata/xsl/fo.xsl file <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="#default" > <xsl:import href="file:@DBDOCLET_HOME@/tidbit/docbook/xsl/fo/docbook.xsl"/> <xsl:param name="insert.xref.page.number">yes</xsl:param> <xsl:param name="title.margin.left">0pt</xsl:param> <xsl:param name="use.extensions">1</xsl:param> <xsl:param name="tablecolumns.extension">0</xsl:param> <xsl:param name="generate.index">1</xsl:param> <xsl:param name="admon.graphics">1</xsl:param> <xsl:param name="admon.graphics.path">@DBDOCLET_HOME@/tidbit/docbook/xsl/image s/</xsl:param> <xsl:param name="section.autolabel">1</xsl:param> <xsl:param name="fop.extensions">1</xsl:param> <xsl:param name="draft.watermark.image"></xsl:param> <xsl:param name="section.label.includes.component.label">1</xsl:param> </xsl:stylesheet>I am currently trying to modify the sources for dbdoclet to add the capability of handling custom tags. Right now xdocle-related custom tags just disappear into thin air. I have a working prototype but will wait to hear from the upstream author before making it available. Any questions, drop me a line. Regards, 2003.10.30 - Thank you for struts-resumeHi Matt, Kudos on your excellent work on appfuse and struts-resume. Since, I've been using appfuse and struts-resume to gather a basic understanding of struts and "helper" technologies, its time to give back a little. I ran into the same problem as yourself, as per your email. So, I followed the email thread and wasn't quite happy with the JavaScript solution. So, I conjured a non-JavaScript solution which is posted below. Be aware that my struts understanding is fairly rudimentary and this might be a classic example of too much blending of V into the C from the MVC model. This is part of action.BaseForm /** * An overridden validate method which attempts to bypass * validation. * <div id="caution_overridden_validate" title="Overridden Validate"> * Due to a bug (or unintended feature) in struts, as * explained in * <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16401">this bu g report</a> * its difficult (or impossible) when using the Validator with * LookupDispatchAction to bypass validation on a method level * without employing JavaScript. I thought it would be nice to have * a cancel method with no dependency on JavaScript which was able * to bypass validation. Hence, in this class we override the * validate method and look for the parameter name (e.g., action) and * its value (e.g., Cancel) and if the cancel button was pressed, * the call to super.validate is bypassed. * <a href="http://www.mail-archive.com/[email protected]/msg60 169.html">Initial report</a> * by Matt Raible on struts-user mailing list. * Follow up * <a href="http://www.mail-archive.com/[email protected]/msg129 62.html">1</a> * and * <a href="http://www.mail-archive.com/[email protected]/msg129 66.html">2</a> * by Brandon Goodin on struts-dev mailing list. * </div> * * @param mapping The <code>ActionMapping</code> used to select this * instance * @param request The servlet request we are processing * * @return <code>ActionErrors</code> object that encapsulates any * validation errors */ public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { // Identify the request parameter containing the method name String parameter = mapping.getParameter(); if( parameter != null ) { // Identify the method name to be dispatched to. String name = request.getParameter(parameter); MessageResources resources = (MessageResources) request.getAttribute(Globals.MESSAGES_KEY); // Identify the localized message for the cancel button String message = resources.getMessage("button.cancel"); // if message resource matches the cancel button then no // need to validate if( name != null && name.equals(message) ) { if( log.isDebugEnabled() ) { log.debug(mapping.getAttribute() + " '" + name + "' method, so no need to validate"); return null; } } } // perform regular validation return super.validate(mapping, request); } What do you think of this approach? Regards, 2003.10.10 - Problem compiling in 0.8I'm trying to compile struts-resume, which I just downloaded to have a sample app dealing with Velocity, but i'm obviously missing org.appfuse.webapp.form.UserForm and UserRoleForm. I manage to find UserForm in security-example1.1.zip but not UserRoleForm.
Is it a mistake or not in your app dist?
2003.09.15 - Small bug discovered in 0.8The global.js javascript file is missing the following method. I've updated the files in 0.8 to fix this bug. Without this method, when a user changes their password, it's not encrypted, and they can't login again. function createFormElement(element, type, name, id, value, parent) { var e = document.createElement(element); e.setAttribute("name", name); e.setAttribute("type", type); e.setAttribute("id", id); e.setAttribute("value", value); parent.appendChild(e); } 2003.09.14 - Struts Resume 0.8 Released!The highlights of this release include rendering a resume with Velocity (demo), a password hint feature, self-registration feature, and a gzip compression filter. See the release notes below for a full list of changes. If you're looking to create a new application based on this architecture, you're best off using AppFuse.
2003.07.11 - UML Diagrams AvailableAlejandro Ramirez has been nice enough to supply us with some UML Diagrams of Struts Resume. Thanks Jano! 2003.04.04 - Struts Resume 0.7 Released!All kinds of upgrades in this release including: Hibernate (2.0 Beta 4), Struts (1.1-20030326), DBUnit (1.6-dev), Canoo WebTest (build276), XDoclet (1.2-20030328), and Display Tag Library (0.8.5). The only real new features are User Administration and a role-based Menu system. That is, only Admins can edit users. This was mainly motivated by the fact that someone keeps changing the password on the demo site, so now I can reset it using a browser rather than SQL.
AppFuse is Struts Resume without any resume-specific code. I hope to use this project as my baseline for future web application projects. Struts Resume will (hopefully) continue to evolve into an application that I can host my resume on. If you've managed to get Struts Resume to run on databases other than MySQL (shouldn't be too difficult with Hibernate), please let me know using the StrutsResume Support page. Older releases can be found at http://raibledesigns.com/downloads. Attachments:
|