struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "raghu_c" <ragh...@infosys.com>
Subject RE: Submit issue for new form with struts
Date Thu, 05 Jun 2003 13:05:09 GMT
Ya,

have a hard coded .do

the documnt.forms['frm'].submit throws a object doesnt support method or property
when used in conjunction with struts - it works fine with plain ol' html

essentially this is what i wish to do 

<script>
function fnOpenDetails(RecClicked,RecNum)
{
	var msgCategory = 'IS41';
	RecSelected.className="ResultRow";
	RecClicked.className="SelRow";
	RecSelected=RecClicked;
	RowClicked=RecNum;
	document.forms[0].intRecordCount.value=RecNum
	document.forms[0].strMessageCategory.value = msgCategory
	document.forms[0].submit();
	window.open("MinEsnDetailsGeneral.do",'Detailswindow','width=700,height=600')
}

</script>

I am unable to push the values i am setting in the script - eg intRecordCount 
into my FormBean
so i need a submit

??

Raghu


> essentially a table of values (list of records) retrieved from the
> db - on the action of the first jsp
> on dbl clicking the list,

That still doesn't answer the question about text or text boxes, so for now
I'll assume this is text.

> i have a javascript function that captures the record index
> and tries opening another window(a popup type) that queries the db for
> further data based on the record dbl clicked,

ok.

>
> As of now, I am able to configure the submit by giving the
action="/popupdetails.do"
> instead of plain action="popupdetails" (w/o the '.do')
> this somehow calls the execute method of the corresponding action class!!

So you've hard-coded ".do" on your page?

>
> now, i have a different issue  :(
> i want to pass the record index into the popupdetails jsp
> and i do not want to construct a url with a request parameter since that
makes the url editable and all.
>
> i thought i will use a property of the originating jsp formbean to hold
the record index
> (of the dblclicked record - hidden variable and all)
> my doubt is : how can one set a property in the bean on dblclick of the
record?

I posted some sample html yesterday that (almost) demonstrates how to do
this:

<form name="frm" action="?same-page" method="GET">
<input type="hidden" name="action" value=""/>
<input type="checkbox" name="users" value="Test1">Test1<br>
<input type="checkbox" name="users" value="Test2">Test2<br>
<input type="checkbox" name="users" value="Test3">Test3<br>
<input type="checkbox" name="users" value="Test4">Test4<br>
<input type="checkbox" name="users" value="Test5">Test5<br>

<br>
<a href="JavaScript:doForm('users.actions.add')">Add</a> |
<a href="JavaScript:doForm('users.actions.delete')">Remove</a>
</form>

<script>
function doForm(action){
  document.forms['frm'].elements['action'].value=action;
  document.forms['frm'].submit()
}

</script>


...modify this to work for your situation:
- add target="_new" to the form
 or
- open your new window (with params) from the doForm function


>
> Or is there an alternative?
>
> Thanx in Advance,
> Raghu
>
>

HTH

--
James Mitchell
Software Developer/Struts Evangelist
http://www.struts-atlanta.org
770-822-3359
AIM:jmitchtx


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


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


Mime
View raw message