struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Kalluri" <rkall...@manduca.com>
Subject LookupDispatchAction.....need to used partly like a Dispatch action
Date Thu, 01 Aug 2002 21:53:09 GMT
Hi All,

I have a form with four buttons.

1-add
2-edit
3-delete
4-preview

I was able to use LookupDispatchAction fine with normal set up.

But i have to use java script to open a pop-up window for button 4 which
makes the LookupDispatch action bomb with a null pointer exception.

function show(mediaId)
{
destURL = "/thoth/do/media/Manage?mediaId="+mediaId+"&submit=preview";
previewWindow = window.open(destURL, 'previewmedia',
"width=350,height=380,scrollbars=yes");
previewWindow.focus();
return true;
}

This is my submit button from the jsp.

<input type="submit" value="preview"
onClick="show(previewMedia.mediaId.value);return false;">

protected Map getKeyMethodMap() {

  	Map map = new HashMap();
  	map.put("button.media.preview", "preview");
  	map.put("button.add", "newArticle");
  	map.put("button.edit", "view");
  	map.put("button.delete", "remove");
  	return map;
}

Has any one tried this before ....part dispatch and part lookupdispatch if
so how do is setup my destURL in window to call the right hookup method in
LookUpdispathc action.

I can use a plain dispatch action and use java script on all buttons, but
just wondering if there is a way to invoke LookupDispatchAction through java
script.

Regards
Rajesh


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


Mime
View raw message