struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Takhar, Sandeep" <>
Subject RE: 1JSP and multiple forms ,which have session scope
Date Tue, 06 Apr 2004 11:17:31 GMT
I don't think this will work


<html:form action="<= tilesActioName %>

is one approach..

Have the html:form on it's own line and not surrounded by an if statement otherwise there
will be problems with the xml.


-----Original Message-----
From: Masashi Nakane []
Sent: Tuesday, April 06, 2004 12:26 AM
To: Struts Users Mailing List
Subject: 1JSP and multiple forms ,which have session scope

   Hi, all

Can 1 JSP change submit point(action map which means action and form bean)
under some condition ?

---------  xxxx.jsp ----------------
<%--  from here search conditions form--%>.

<logic:equal  name="pageName" value="futureInfoList">
	<html:form action="showFutureRec">
<logic:equal  name="pageName" value="pastInfoList">
	<html:form action="showPastRec">

	<html:input property="customerName"/>
	<html:input property="customerNumber"/>

	<logic:equal  name="pageName" value="futureInfoList">
		<html:hidden property="dateCondition" value="todayOrFuture">
	<logic:equal  name="pageName" value="pastInfoList">
		<html:form property="dateCondition" value="past">


<%--  from here show List--%>.
<logic;iterate  id="customerOrder" ...... and so on.
--------- xxx.jsp ---------------

but , struts gets angry with that.

In detail ,
  Previously  I had 2 JSPs and each has action and form bean,
  Each JSP has search condition inputs and shows records which are 
retrieved from DB
  according to the inputted search conditions.

   MyFutureRecordList.jsp has the action mapping
  		 name="FutureRecForm" which made from MyRecordListForm Class.
   MyPastRecordList.jsp has the action mapping
		  name="showPastRecForm" which made from MyRecordListForm Class.

The  same FormBean Class is used,which includes properties both for search 
conditions and for record list,
because MyFutureRecordList.jsp and MyPastRecordList.jsp  are almost the 
same one ,
except for  small difference about hidden search Condition for date.
One is for past Infomation ,the other is for Future Info.

but,  these Jsps' form beans should have session scope to retain the last 
shown info
for users to see same data next time for each page(,but actually one JSP file).

I want to combine these sepatated JSPs into one JSP for maintianability.
Does anyone have ideas about dynamically changing action and form bean in 
one JSP?

Masashi Nakane


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message