r980 - in trunk/wikitty-struts/src/main: java/org/nuiton/wikitty/struts/component tld
Author: mfortun Date: 2011-06-27 15:44:54 +0200 (Mon, 27 Jun 2011) New Revision: 980 Url: http://nuiton.org/repositories/revision/wikitty/980 Log: * add documentation for tag and attribute * correction for nullpointer inside wikitty field Modified: trunk/wikitty-struts/src/main/java/org/nuiton/wikitty/struts/component/WikittyFieldTagBean.java trunk/wikitty-struts/src/main/tld/wikitty-struts.tld Modified: trunk/wikitty-struts/src/main/java/org/nuiton/wikitty/struts/component/WikittyFieldTagBean.java =================================================================== --- trunk/wikitty-struts/src/main/java/org/nuiton/wikitty/struts/component/WikittyFieldTagBean.java 2011-06-27 10:42:43 UTC (rev 979) +++ trunk/wikitty-struts/src/main/java/org/nuiton/wikitty/struts/component/WikittyFieldTagBean.java 2011-06-27 13:44:54 UTC (rev 980) @@ -10,10 +10,7 @@ @StrutsTag(name = "field", tldTagClass = "org.nuiton.wikitty.struts.tag.WikittyFieldTag", description = "Renders an input form", allowDynamicAttributes = false) public class WikittyFieldTagBean extends ClosingUIBean { - protected FieldSpecialisation specialize; - - public WikittyFieldTagBean(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { @@ -36,9 +33,11 @@ super.evaluateExtraParams(); WikittyFieldHandler handler = (WikittyFieldHandler) stack.getContext() - .get(WikittyTagBean.WIKITTY_STACK_KEY); - handler.specialiseField(specialize); - + .get(WikittyTagBean.WIKITTY_STACK_KEY); + + if (handler != null) { + handler.specialiseField(specialize); + } } public FieldSpecialisation getSpecialize() { @@ -49,6 +48,4 @@ this.specialize = specialize; } - - } Modified: trunk/wikitty-struts/src/main/tld/wikitty-struts.tld =================================================================== --- trunk/wikitty-struts/src/main/tld/wikitty-struts.tld 2011-06-27 10:42:43 UTC (rev 979) +++ trunk/wikitty-struts/src/main/tld/wikitty-struts.tld 2011-06-27 13:44:54 UTC (rev 980) @@ -11,40 +11,59 @@ <tag> <name>wikitty</name> <tagclass>org.nuiton.wikitty.struts.tag.WikittyTag</tagclass> - + <description><![CDATA[Tag use to make a form to edit wikitty]]></description> <attribute> + <description><![CDATA[the wikitty to edit]]></description> <name>wikitty</name> <rtexprvalue>true</rtexprvalue> + <required>true</required> </attribute> <attribute> + <description><![CDATA[the proxy from whom search for wikitty]]></description> <name>proxy</name> <rtexprvalue>true</rtexprvalue> + <required>true</required> </attribute> <attribute> + <description><![CDATA[the url of the form action]]></description> <name>action</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> + <description><![CDATA[an url store as a hidden field of the form]]></description> <name>redirect</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> + <description><![CDATA[Type of the form: Form classic or pop-up form]]></description> <name>type</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> + <description><![CDATA[Field/extention that must appear in the form, if + defined other wikitty field will be ignored. + if not defined all wikitty field will be presented. + example: "wikittyPubData.name, wikittyLabel.*" + extentionName.* will include all field of extenstion]]></description> <name>include</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> + <description><![CDATA[wikitty field/extention that have to be ignore, even + if the field/extension is include if exclude it will + not be include in the form. + ]]></description> <name>exclude</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> + <description><![CDATA[Used to order wikitty field, those which are not ordered + will be added at the end.]]></description> <name>order</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> + <description><![CDATA[If a delele button must be in the form]]></description> <name>allowDelete</name> <rtexprvalue>true</rtexprvalue> </attribute> @@ -56,37 +75,46 @@ <name>field</name> <tagclass>org.nuiton.wikitty.struts.tag.WikittyFieldTag</tagclass> <bodycontent>empty</bodycontent> + <description><![CDATA[Field to specialise how wikitty field will be presented]]></description> <attribute> + <description><![CDATA[the name of the field that have to be specialize]]></description> <name>name</name> <rtexprvalue>true</rtexprvalue> <required>true</required> </attribute> <attribute> + <description><![CDATA[the label of the field]]></description> <name>label</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> - <name>subtype</name> + <description><![CDATA[html type to present the field: hidden, textfield, textarea, boolean, file]]></description> + <name>type</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> - <name>type</name> + <description><![CDATA[the sub type if present a fixed list(see fixvalues) or if it will be wikitty found by the proxy]]></description> + <name>subtype</name> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> - <name>criteria</name> + <description><![CDATA[if subtype == fixed, use the list of fixed value as option for a select]]></description> + <name>fixvalues</name> <rtexprvalue>true</rtexprvalue> </attribute> - <attribute> - <name>fixvalues</name> + <description><![CDATA[if subtype == wikitty, use the list of wikitty found by criteria as option for select]]></description> + <name>criteria</name> <rtexprvalue>true</rtexprvalue> </attribute> - <attribute> + <description><![CDATA[if subtype == wikitty, use the name of the descfield of the wikitties as a description value for select's option]]></description> <name>descfields</name> <rtexprvalue>true</rtexprvalue> </attribute> + + + </tag>
participants (1)
-
mfortun@users.nuiton.org