Validation with the domino tag library

Hi,

Can anyone help me with a problem I’m having when I attempt to use the domino tag libraries through websphere portal?

So far I’ve managed to do the basics, such as displaying forms and views etc, but now I’m trying to use the domino:input tag with the domino:validatelength, domino:validatedate (etc) tags.

Whenever I deploy the portlet with this code in, I keep seeing the error message “Lotus Notes Domino portlet is unavailable”.

Here is a cut down version of my code:

<domino:db id=“advisor” dbname=“advisor.nsf”>

   <domino:form id="myForm" name="Article" clientvalidate="true">

	

			<Table>

	

				<%-- form input and validation --%>

				<domino:validatesummary caption="Please correct the following errors and resubmit:"/>

	

				<TR>

					<TD>

						<LABEL class="wpsLabelText" 

							for="<portletAPI:encodeNamespace value="<%= DominoTagsInPortalPortlet.PASSWORD %>"/>">Enter Username:</LABEL>

							

					</TD>

					<TD>

						<domino:input name="userName" clientvalidate="onsubmit">

							<domino:validaterequired

								name="userName" 

								message="Username entry is required!">*

							</domino:validaterequired>

							<domino:validatepattern

								name="userName" 

								pattern="[A-Za-z]+"

								message="Username must not contain numbers!"

							/>

							<domino:validatelength

								name="userName" 

								min="3" 

								max="20"

								message="Invalid length of username!">*

							</domino:validatelength>

						</domino:input>	

					</TD>

				</TR>

I’ve had a look through all the redbooks, developer works tutorials, but none of them seem to give any examples of this.

Can anyone help?

Thanks in advance,

Ian

Subject: validation with the domino tag library

I have not tried the client side validation in portal, will post results soon. In the meantime, what versions are you using? -sl

Subject: RE: validation with the domino tag library

Well, I have some good news, and some not so good news.

JSP tag validation works in Portal, IF you are not doing client side validation.

You nested the validation tags inside the input tag, which is giving you trouble, and used the ‘clientvalidate’ attribute on the input tag, which you don’t want to do until I fix the bug - for now let the server do validation. Try this instead:

<domino:input name=“userName” />

<domino:validaterequired name=“userName”

message=“Username entry is required!”>*</domino:validaterequired>

<domino:validatepattern name=“userName”

pattern=“[A-Za-z]+” message=“Username must not contain numbers!”>*</domino:validatepattern>

<domino:validatelength name=“userName”

min=“3” max=“20” message=“Invalid length of username!”>*</domino:validatelength>