tried again...
dont know how to define the validatorScript
<span jsfid="s:validatorScript" functionName="validateForm"/>
should be ok, but exception...
2006/8/5, stephan opitz <[EMAIL PROTECTED]>:
this works but validatorScript wont be rendered
<span jsfid="otherMessages" />
<form id="registrationForm" onsubmit="return validateForm(this);">
<span jsfid="registrationHeader" id="registrationHeader" />
<span jsfid="registrationPanel" id="registrationPanel" />
<span jsfid="registrationCommandPanel" id="registrationCommandPanel" />
****
</form>
<s:validatorScript functionName="validateForm"/>
<span jsfid="s:validatorScript" functionName="validateForm"/>
<span jsfid="registrationValidatorScript" id="registrationValidatorScript" />
last with this:
<component jsfid="registrationValidatorScript"
extends="s:validatorScript">
<attributes>
<set name="functionName" value="validateForm" />
</attributes>
</component>
all throws:
20:24:03,000 ERROR [STDERR] 05.08.2006 20:24:03
org.apache.shale.validator.CommonsValidator getValidatorResources
INFO: Loading validation rules file from
/org/apache/shale/validator/validator-rules.xml
20:24:03,062 ERROR [[faces]] Servlet.service() for servlet faces threw exception
java.lang.NoSuchMethodError:
org.apache.commons.validator.ValidatorResources.<init>([Ljava/lang/String;)V
at
org.apache.shale.validator.CommonsValidator.getValidatorResources(CommonsValidator.java:507)
2006/8/5, Gary VanMatre <[EMAIL PROTECTED]>:
> >From: "stephan opitz" <[EMAIL PROTECTED]>
> >
> > as in shale use cases i want using the validator
> > :
> > 12:55:29,093 ERROR [Clay] javax.faces.FacesException: Undefined
> > component type org.apache.shale.CommonsValidator
> > 12:55:29,109 ERROR [[faces]] Servlet.service() for servlet faces threw
exception
> > java.lang.RuntimeException: javax.faces.FacesException: Undefined
> > component type org.apache.shale.CommonsValidator
> >
> > Caused by: javax.faces.FacesException: Undefined component type
> > org.apache.shale.CommonsValidator
> > at
> >
org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.j
> > ava:390)
> >
> > in clay-config i defined component with s:commonsValidator:
> >
>
>
> [snippet]
>
>
> >
> >
> >
> > in my view file i have a
> ><span xmlns:s="http://struts.apache.org/shale/core" >
> >...
> ></span>
> >
>
> Hey Stephan, You will also need the "t" prefix for tomahawk components. I
> still need to register the correct tomahawk URI in Clay but the
> the core uri will work also.
>
> <span xmlns="http://www.w3.org/1999/xhtml"
> xmlns:f="http://java.sun.com/jsf/core"
> xmlns:h="http://java.sun.com/jsf/html"
> xmlns:t="http://shale.apache.org/core"
> xmlns:s="http://shale.apache.org/core">
>
>
> >
> > maybe i have to define something else?
>
> Validators are nested under a component with the "validator" node.
>
> <component jsfid="birthdate" id="birthdate" extends="t:inputCalendar">
> <attributes>
> <set name="value" value="[EMAIL PROTECTED]" />
> <set name="renderAsPopup" value="true" />
> <set name="renderPopupButtonAsImage" value="true" />
> <set name="popupDateFormat" value="yyyy/MM/dd" />
> <set name="allowBody" value="false" />
> <set name="required" value="true" />
> <set name="monthYearRowClass" value="yearMonthHeader" />
> <set name="weekRowClass" value="weekHeader" />
> <set name="currentDayCellClass" value="currentDayCell" />
> <set name="styleClass" value="input" />
> </attributes>
>
> <validator jsfid="s:commonsValidator">
> <attributes>
> <set name="type" value="date" />
> <set name="datePatternStrict" value="MM/dd/yyyy" />
> <set name="message"value="#{messages['validate.test.bad.expiration.date']}"
/>
> <set name="server" value="false" />
> <set name="client" value="true" />
> </attributes>
> </validator>
> </component>
>
>
>
> I'll push an example of using clay and tomahawk to the sandbox in the next
few days.
>
> Gary
>