struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CRANFORD, CHRIS" <chris.cranf...@setechusa.com>
Subject RE: Different form tags on same jsp
Date Tue, 22 Jun 2004 19:11:25 GMT
Can someone illustrate an example of this?

-----Original Message-----
From: Hibbs, David [mailto:David.Hibbs@ANICO.com] 
Sent: Tuesday, June 22, 2004 2:51 PM
To: Struts Users Mailing List
Subject: RE: Different form tags on same jsp


You've got a tag nesting error, to be sure.  This is like doing <tagA>
	<tagB>
</tagA>
	</tagB>

...or at least to a JSP compiler it is.

The solution to your problem is that the form action attribute (and onsubmit
attribute) can be a runtime expression.

David Hibbs, ACS
Staff Programmer / Analyst
American National Insurance Company

> -----Original Message-----
> From: Pavlikus [mailto:pavlikus@bk.ru]
> Sent: Tuesday, June 22, 2004 12:53 PM
> To: Struts Users Mailing List
> Subject: Different form tags on same jsp
> 
> 
> Hi all.
> I want to reuse the jsp page with form where user can Register or Edit 
> Profile.
> 
> I do like:
> 
> <auth:if accept="GUEST_ROLE"/>
>   <html:javascript formName="registrationForm"/>
>   <html:form method="post" action="/PreRegisterUser.do"
> onsubmit="return validateRegistrationForm(this);">
> </auth:if>
> 
> <auth:if accept="USER_ROLE, MODERATOR_ROLE">
>   <html:javascript formName="editProfileForm"/>
>   <html:form method="post" action="/EditProfile.do"
> onsubmit="return validateEditProfileForm(this);">
> </auth:if>
> 
> I expect what it render form tag for registrationForm if user have 
> GUEST_ROLE role, and tag for editProfileForm is user have prepotent 
> roles.
> 
> But when jsp compiles - it show following error:
> -- The end tag "</auth:if" is unbalanced'
> 
> What happen? Is it possible to render different form tags with this 
> method at all?
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message