You should create a svn diff against forrest for the forrest
documentation, and a diff against the examples for the validator
example. Step by step procedure, that will clear any doubt :-)
1. Download svn 'current' sources
2. Create your forrest documentation in the 'forrest' subproject.
3. Create the example in the 'examples' subproject, sandbox folder.
You could create another jsp page that use your component and add also
an entry to the home.jsp.
4. Add every new file with svn (e.g. 'svn add
examples/sandbox/urlvalidator.jsp'), so the patch will know that this
is a new file and it will include it.
5. Create two patches from the current folder, one for forrest ('svn
diff forrest') and another one for the examples ('svn diff examples').
6. And finally, submit the patches! :-)
Thanks, documentation is essential...
Regards,
Bruno
2005/8/2, Fab Psycho <[EMAIL PROTECTED]>:
> Hi Bruno,
>
> Thanks for your comments ! Does relevant forrest documentation patch
> and example addition have to be applied against sandbox as well or directly
> against its respective path ?
>
> Best regards,
> Fabian
>
> >From: "Bruno Aranda (JIRA)" <[email protected]>
> >To: [EMAIL PROTECTED]
> >Subject: [jira] Commented: (MYFACES-372) url validator tag / tomahawk based
> >on emailvalidator
> >Date: Mon, 1 Aug 2005 19:27:36 +0200 (CEST)
> >
> > [
> >http://issues.apache.org/jira/browse/MYFACES-372?page=comments#action_12317360
> >]
> >
> >Bruno Aranda commented on MYFACES-372:
> >--------------------------------------
> >
> >I've applied your patch to the sandbox (after making some adaptations of
> >the validator to the current svn state). Now, it would be wonderful if you
> >could also provide an example and some documentation in order that the
> >myfaces team and the community can evaluate the validator. Thanks for the
> >contribution!
> >
> > > url validator tag / tomahawk based on emailvalidator
> > > ----------------------------------------------------
> > >
> > > Key: MYFACES-372
> > > URL: http://issues.apache.org/jira/browse/MYFACES-372
> > > Project: MyFaces
> > > Type: New Feature
> > > Components: Sandbox
> > > Versions: Nightly Build
> > > Environment: windows
> > > Reporter: Fabian Frederick
> > > Priority: Trivial
> > > Attachments: myfacesff2.diff
> > >
> > > Index: tomahawk/tld/myfaces_ext.tld
> > > ===================================================================
> > > --- tomahawk/tld/myfaces_ext.tld (revision 225811)
> > > +++ tomahawk/tld/myfaces_ext.tld (working copy)
> > > @@ -2381,6 +2381,15 @@
> > > A custom validator for email address format, based
> > > upons Jakarta
> >Commons.
> > > </description>
> > > </tag>
> > > + <!-- Validator for Url -->
> > > + <tag>
> > > + <name>validateUrl</name>
> > > +
> ><tag-class>org.apache.myfaces.custom.emailvalidator.ValidateUrlTag</tag-class>
> > > + <body-content>JSP</body-content>
> > > + <description>
> > > + A custom validator for url format, based upons
> > > Jakarta Commons.
> > > + </description>
> > > + </tag>
> > > <!-- Validator for ISBN -->
> > > <!--tag>
> > > Index: tomahawk/conf/faces-config.xml
> > > ===================================================================
> > > --- tomahawk/conf/faces-config.xml (revision 225811)
> > > +++ tomahawk/conf/faces-config.xml (working copy)
> > > @@ -720,6 +720,11 @@
> > > </validator>
> > > <validator>
> > > + <validator-id>org.apache.myfaces.validator.Url</validator-id>
> > >
> >+
> ><validator-class>org.apache.myfaces.custom.urlvalidator.UrlValidator</validator-class>
> > > + </validator>
> > > +
> > > + <validator>
> > >
> > > <validator-id>org.apache.myfaces.validator.Equal</validator-id>
> > >
> >
> > <validator-class>org.apache.myfaces.custom.equalvalidator.EqualValidator</validator-class>
> > > </validator>
> > > Index:
> >tomahawk/src/java/org/apache/myfaces/custom/urlvalidator/UrlValidator.java
> > > ===================================================================
> > > ---
> >tomahawk/src/java/org/apache/myfaces/custom/urlvalidator/UrlValidator.java
> > (revision
> >0)
> > > +++
> >tomahawk/src/java/org/apache/myfaces/custom/urlvalidator/UrlValidator.java
> > (revision
> >0)
> > > @@ -0,0 +1,54 @@
> > > +package org.apache.myfaces.custom.urlvalidator;
> > > +
> > > +import org.apache.myfaces.util.MessageUtils;
> > > +
> > > +import org.apache.commons.validator.GenericValidator;
> > > +
> > > +import javax.faces.application.FacesMessage;
> > > +import javax.faces.component.UIComponent;
> > > +import javax.faces.context.FacesContext;
> > > +import javax.faces.validator.Validator;
> > > +import javax.faces.validator.ValidatorException;
> > > +
> > > +public class UrlValidator implements Validator {
> > > +
> > > + /**
> > > + * <p>The standard converter id for this converter.</p>
> > > + */
> > > + public static final String VALIDATOR_ID =
> >"org.apache.myfaces.validator.Url";
> > > + /**
> > > + * <p>The message identifier of the [EMAIL PROTECTED] FacesMessage}
> > > to be created
> >if
> > > + * the maximum length check fails.</p>
> > > + */
> > > + public static final String URL_MESSAGE_ID =
> >"org.apache.myfaces.Url.INVALID";
> > > +
> > > + public UrlValidator(){
> > > + }
> > > +
> > > + /**
> > > + * method that validates an url address.
> > > + * it uses the commons-validator
> > > + */
> > > + public void validate(
> > > + FacesContext facesContext,
> > > + UIComponent uiComponent,
> > > + Object value)
> > > + throws ValidatorException {
> > > +
> > > +
> > > + if (facesContext == null) throw new
> >NullPointerException("facesContext");
> > > + if (uiComponent == null) throw new
> >NullPointerException("uiComponent");
> > > +
> > > + if (value == null)
> > > + {
> > > + return;
> > > + }
> > > + if (!GenericValidator.isUrl(value.toString())) {
> > > + Object[] args = {value.toString()};
> > > + throw new
> >ValidatorException(MessageUtils.getMessage(FacesMessage.SEVERITY_ERROR,URL_MESSAGE_ID,
> >args));
> > > +
> > > + }
> > > +
> > > + }
> > > +
> > > +}
> > > Index:
> >tomahawk/src/java/org/apache/myfaces/custom/urlvalidator/ValidateUrlTag.java
> > > ===================================================================
> > > ---
> >tomahawk/src/java/org/apache/myfaces/custom/urlvalidator/ValidateUrlTag.java
> > (revision
> >0)
> > > +++
> >tomahawk/src/java/org/apache/myfaces/custom/urlvalidator/ValidateUrlTag.java
> > (revision
> >0)
> > > @@ -0,0 +1,27 @@
> > > +package org.apache.myfaces.custom.urlvalidator;
> > > +
> > > +import javax.faces.validator.Validator;
> > > +import javax.faces.webapp.ValidatorTag;
> > > +import javax.servlet.jsp.JspException;
> > > +
> > > +public class ValidateUrlTag extends ValidatorTag
> > > +{
> > > + private static final long serialVersionUID = 6041422002721046221L;
> > > +
> > > + public ValidateUrlTag()
> > > + {
> > > + }
> > > +
> > > + protected Validator createValidator() throws JspException
> > > + {
> > > + setValidatorId(UrlValidator.VALIDATOR_ID);
> > > + UrlValidator validator = (UrlValidator)super.createValidator();
> > > + return validator;
> > > + }
> > > +
> > > + public void release()
> > > + {
> > > + super.release();
> > > + }
> > > +
> > > +}</textarea>
> > > </td>
> > > </tr>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > <tr><td colspan=2 bgcolor=ffffff>
> > > <style>
> > > <!--
> > > .fieldLabelArea
> > > {
> > > width: 30%;
> > > }
> > > -->
> > > </style>
> > > </td></tr>
> > > <tr><td colspan=2 bgcolor=f0f0f0>
> > > <b>Comment</b>: (an optional comment describing this update)
> > > </td></tr>
> > >
> > >
> > > <tr
> > >
> > >
> > > >
> > >
> > >
> > >
> > >
> > > <td class="fieldLabelArea">
> > >
> > >
> > >
> > >
> > >
> > > Update comment:
> > >
> > >
> > > </td>
> > >
> > >
> > > <td bgcolor="ffffff" nowrap class="fieldValueArea">
> > > <textarea name="comment"
> > > cols="70"
> > > rows="4"
> > > wrap="virtual"
> > >
> > >
> > > style="width:90%"
> > >
> > >
> > >
> > >
> > >
> > > accesskey="m"
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > >
> >
> >--
> >This message is automatically generated by JIRA.
> >-
> >If you think it was sent incorrectly contact one of the administrators:
> > http://issues.apache.org/jira/secure/Administrators.jspa
> >-
> >For more information on JIRA, see:
> > http://www.atlassian.com/software/jira
> >
>
>
>