Acces form name in the jsp

2003-07-17 Thread Raul Montoya
Hi
I want to know if there is any way to obtain the form name associated to
a JSP without put it form the strut-config.
 
Because, if the name of the form change on the strut-config; i have to
change the name of the form in all of my JSP's.
 
Example of the problem:
 

html:form action=/SaveReception
html:hidden property=id /
html:hidden property=stateId /
html:hidden property=editable /
table cellpadding=0 cellspacing=0 border=0 width=100%
...
...
...
logic:equal name=receptionForm property=editable scope=request
value=true
...
 
Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Acces form name in the jsp

2003-07-17 Thread Nicolas De Loof
No form-bean is associated with a JSP; Some JSP use html:tags to use form-beans.

I use some constants for form-beans so that form-bean names are duplicated only one 
time : in constant definition class
and in struts-config.xml

public class Forms {

public final static String USERFORM = UserForm;


}

Then mly JSP use such code :

logic:equal name=%= Forms.USERFORM % property=editable value=true

This way I can change form-bean name without changing JSP (just need to force 
recompile them)

Nico.



Hi
I want to know if there is any way to obtain the form name associated to
a JSP without put it form the strut-config.

Because, if the name of the form change on the strut-config; i have to
change the name of the form in all of my JSP's.

Example of the problem:


html:form action=/SaveReception
html:hidden property=id /
html:hidden property=stateId /
html:hidden property=editable /
table cellpadding=0 cellspacing=0 border=0 width=100%
...
...
...
logic:equal name=receptionForm property=editable scope=request
value=true
...

Thanks.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Acces form name in the jsp

2003-07-17 Thread Nagendra Kumar O V S








  hi,
  
  u can use "nested" taglib which will not require "name" attribute, it 
  takes the form_name associated with the html:form
  
  
  html:form action=""html:hidden 
  property="id" /html:hidden property="stateId" 
  /html:hidden property="editable" /table 
  cellpadding=0 cellspacing=0 border=0 
  width="100%"...nested:equal property="editable" 
  scope="request" value="true"
  /nested:equal
  
  -- nagi
  
  
  
  ---Original Message---
  
  
  From: Struts Users Mailing 
  List
      Date: Thursday, July 
      17, 2003 01:23:32 PM
  To: [EMAIL PROTECTED]
  Subject: Acces form 
  name in the jsp
  HiI want to know if there is any way to obtain the 
  form name associated toa JSP without put it form the 
  strut-config.Because, if the name of the form change on the 
  strut-config; i have tochange the name of the form in all of my 
  JSP's.Example of the problem:html:form 
  action=""html:hidden property="id" 
  /html:hidden property="stateId" /html:hidden 
  property="editable" /table cellpadding=0 cellspacing=0 
  border=0 width="100%"...logic:equal 
  name="receptionForm" property="editable" 
  scope="request"value="true".Thanks.-To 
  unsubscribe, e-mail: [EMAIL PROTECTED]For 
  additional commands, e-mail: [EMAIL PROTECTED].





	
	
	
	
	
	
	




 IncrediMail - 
Email has finally evolved - Click 
Here



Re: Acces form name in the jsp

2003-07-17 Thread Sandeep Takhar
A bit of a hack is to have something like this in your
action


request.setAttribute(otherName, theForm)

This will make it work on the jsp anyways for now...

sandeep
--- Nagendra Kumar O V S [EMAIL PROTECTED] wrote:
 hi,
 
 u can use nested taglib which will not require
 name attribute, it takes
 the form_name associated with the html:form
 
 
 html:form action=/SaveReception
 html:hidden property=id /
 html:hidden property=stateId /
 html:hidden property=editable /
 table cellpadding=0 cellspacing=0 border=0
 width=100%
 .
 .
 .
 nested:equal property=editable scope=request
 value=true
 
 /nested:equal
 
 
  
 -- nagi
 
 
 
 ---Original Message---
 
 From: Struts Users Mailing List
 Date: Thursday, July 17, 2003 01:23:32 PM
 To: [EMAIL PROTECTED]
 Subject: Acces form name in the jsp
 
 Hi
 I want to know if there is any way to obtain the
 form name associated to
 a JSP without put it form the strut-config.
 
 Because, if the name of the form change on the
 strut-config; i have to
 change the name of the form in all of my JSP's.
 
 Example of the problem:
 
 
 html:form action=/SaveReception
 html:hidden property=id /
 html:hidden property=stateId /
 html:hidden property=editable /
 table cellpadding=0 cellspacing=0 border=0
 width=100%
 .
 .
 .
 logic:equal name=receptionForm
 property=editable scope=request
 value=true
 .
 
 Thanks.
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 
 .


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Acces form name in the jsp

2003-07-17 Thread Sandeep Takhar
good idea...

sandeep
--- Nicolas De Loof [EMAIL PROTECTED] wrote:
 No form-bean is associated with a JSP; Some JSP
 use html:tags to use form-beans.
 
 I use some constants for form-beans so that
 form-bean names are duplicated only one time : in
 constant definition class
 and in struts-config.xml
 
 public class Forms {
 
 public final static String USERFORM =
 UserForm;
 
 
 }
 
 Then mly JSP use such code :
 
 logic:equal name=%= Forms.USERFORM %
 property=editable value=true
 
 This way I can change form-bean name without
 changing JSP (just need to force recompile them)
 
 Nico.
 
 
 
 Hi
 I want to know if there is any way to obtain the
 form name associated to
 a JSP without put it form the strut-config.
 
 Because, if the name of the form change on the
 strut-config; i have to
 change the name of the form in all of my JSP's.
 
 Example of the problem:
 
 
 html:form action=/SaveReception
 html:hidden property=id /
 html:hidden property=stateId /
 html:hidden property=editable /
 table cellpadding=0 cellspacing=0 border=0
 width=100%
 ...
 ...
 ...
 logic:equal name=receptionForm
 property=editable scope=request
 value=true
 ...
 
 Thanks.
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]