You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rajesh Kalluri <rk...@manduca.com> on 2002/08/02 14:42:01 UTC
LookupDispatchAction.....need to be used partly like a Dispatch action (REPOST)
(REPOST)
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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>