• Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with a TagExtraInfo class

 
Lynna Cekova
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!
I will be very thankful if you can help me with the following:
I need to create a TEI class to declare scripting variables for a tag that shows records from a recordset. The names of the variables, however, are the same as the column names in the recordset, so I don't know them in advance. Can anyone tell me how to declare the scription variables in the TEI class in case I don't know the names the Tag class will assign them?
Thanks,
Faerine
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if this example from weblogic helps you
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
-- iterate through the resultset
String st=new String(java.sql.ResultSet.getMetaData().getColumnName())
------
 
Shawn Bayern
Author
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Faerine Lothwen:
Hello!
I will be very thankful if you can help me with the following:
I need to create a TEI class to declare scripting variables for a tag that shows records from a recordset. The names of the variables, however, are the same as the column names in the recordset, so I don't know them in advance. Can anyone tell me how to declare the scription variables in the TEI class in case I don't know the names the Tag class will assign them?
Thanks,
Faerine

In JSP, you are not able to assign scripting variable names dynamically. The names of scripting variables need to be known at translation time, which is (potentially) long before any request is received.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!