You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jaakko Rytinki <ja...@emillion.fi> on 2004/03/16 16:31:21 UTC

Tiles and html:link onclick=submit()

I've noticed an annoying feature using <html:link page="#"
onclick="submit();"> someText </html:link>. It does one of the
following: a) It tries to search the page /somePage.jsp# or b) submits
the form and continues to the right page, where my action forward
points.

Because the only JSP-pages I have is just index.jsp, which just checks
the users role and redirects to right XYZlayout.jsp. XYZlayout.jsp is
also a complete JSP-page, but if the user is not in the right role,
container based authentication prevents the page from being retrieved.
Also in the most cases the XYZlayout.jsp requires some parameters, so a
forward action must be called before continuing to that page. 

I've solved this problem, by replacing the actual links by <td
onclick="submit();"> someText </td> And using some style definition the
look and feel are almost exactly the same as when using html:link.
Anyway I was just wondering if someone else has encountered the same
kind of problem and are there any work-arounds for this issue? The same
problem occurs with both IE and Opera.

--

One more question:
Is it possible to use

<form-property name="strings" type="java.lang.String[]" />

for set of html:text areas? For example if I iterate through
a collection of strings, 

<logic:iterate id="aString" property="stringArray">
<html:text property="strings" indexed="true" value="${aString}" />
</logic:iterate>

can I retrieve them by using

DynaActionForm dynaForm = (DynaActionForm) form;
String[] strings = dynaForm.get("strings");


--
Jaakko Rytinki



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