Ugh... for the first time ever I had to write a "pop-up" using javascript :(

I'd like to do:

    <script type="text/javascript">
      function addProductToCart() {
        opener.location.href = "<html:rewrite forward="addProductToCart" 
paramId="productId" paramName="productId"/>"
        window.close()
      }
    </script>

...in place of using a form so that pop-up disappears and the parent window
submits the action.

However struts-html.tld does not declare paramId and paramName attributes for
the rewrite tag as it does for the link tag.  Seeing as the RewriteTag tag is
a subclass of LinkTag, and indeed calls RequestUtils.computeParameters and
RequestUtils.computeURL with all the usual LinkTag parameters (paramId,
paramName, paramProperty, etc.), copying the link attributes to rewrite in
struts-html.tld works exactly how I'd like it to.

Is there any reason why the rewrite tag be the same as link tag?

I searched bugzilla and mail-archive.com for "rewrite" and have not found
anything on this matter.  Should I file a bug?

Reply via email to