Menu ▾ ▴

#1 Bad template for arrays

open
nobody
5
2002-03-27
2002-03-27
No

The list tags generated for arrays do not work if the
array is not a top-level element.

This code was generated by templatemaker:

<ul><list hash.filenames as hash.filenames>
hash.filenames.html: ${hash.filenames.html}<br>
</list></ul>

This was the code of the webelement:

public void elementService(HttpServletRequest servReq,
WebElementValues webElementValues) throws IOException {
//The values are added here:
Hashtable hash = new Hashtable();
hash.put("name", "webelements");
String[] filenames = {"example1.java",
"Simple.java", "Test.java"};
hash.put("filenames",filenames);
webElementValues.put("hash", hash, new
ExpansionTemplate(2));
}

Discussion

  • reto sourcer

    reto sourcer - 2002-03-27
    • summary: Bad template for ararys --> Bad template for arrays
     

Log in to post a comment.