For some reason it doesn't work. The action set in Javascript function as "/AAA" is not recognized as "/context/AAA"!? Other actions which does not use Javascript are recognized correctly
hi,
I have <html:form method="post" action="javascript:setAction();">
but it doesn't work. setAction() examine 3 radio buttons and is supposed to set action based on the value of the set radio button. What is the correct syntax?
thanks,
I added all strings to list using add() and then in a loop I used string buffer to append if not null and not "".
So I should get something like this as a result:
"str2-str4-str10"
which means user selected checkboxes 2, 4 and 10
I guess I could have used <html:multibox> and get collection...
Hi all,
I have 10 strings representing checkboxes (states) from GUI like:
String str1;
...
String str10;
I want to construct one string that represents selection of states out of these in such a way that if particular string is null or not "" then it should be concatenated into that string...
No, but I am sure I saw varargs example in Bruce Eckel book Thinking in Java. If I correctly remember in the initializer he puts comma character after the last item which is same as varargs in C/C++
Hi all,
I have following mockup JSP:
...
<td colspan="2" height="28"> <font size="2">
<html:select property="sj">
<html:option value="allj">aaa,1,str1</html:option>
</html:select>
</font>
</td>
...
Struts action will...
As the matter of fact this appears to be correct solution (in the example I use limited number of items but it should be dynamically allocated):
import java.util.*;
public class Test {
public void Test() {
}
public String[] getSJ()
{
String[] jg = {"g1", "g2"}; //can be...
Hi all,
public class Test {
public String[] getSJ()
{
String[] jg;
String[] jig;
String[] result;
StringBuffer buf = new StringBuffer();
int i;
int j;
int k = -1;
jg = {"g1", "g2"};
for( i=0; i < jg.length; i++ )...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.