Hi,
if you want to display a HTML select where the user should see a list of
categories try with:

<db:select fieldName="request_category">

  <db:tableData
          name="select_categ"
          foreignTable="categories"
          visibleField="category"
          storeField="category"
          disableCache="true" />
</db:select>


I use disableCache if I have different controls with the same datasource on the
same page.

You have always to embed <tableData> <queryData> <staticData> in a "embedding
data tags"... select, searchCombo, comboBox, dataLabel, etc.

Cheers


> > Is this construct, where the storeField is the same as
> > visibleFields, OK?
> >
> >                     <db:label fieldName="request_category" />
> >                     <db:tableData
> >                     name="select_categ"
> >                     foreignTable = "categories"
> >                     visibleFields = "category"
> >                     storeField = "category"
> >                     />
> >
> > I am getting this exception when the code above attempts to execute:
> >
> > 2005-04-05 00:44:18 StandardWrapperValve[control]:
> > Servlet.service() for servlet control threw exception
> > java.lang.ClassCastException
> >          at
> > org.dbforms.taglib.EmbeddedData.getEscaper(EmbeddedData.java:795)
> >          at org.dbforms.taglib.TableData.fetchData(TableData.java:365)
> >          at
> > org.dbforms.taglib.EmbeddedData.doStartTag(EmbeddedData.java:575)
> >          at
> > org.apache.jsp.reqForPersonEntry_jsp._jspx_meth_db_tableData_0
> (reqForPersonEntry_jsp.java:832)
> >          at
> > org.apache.jsp.reqForPersonEntry_jsp._jspx_meth_db_body_1(reqF
> orPersonEntry_jsp.java:713)
> >          at
> > org.apache.jsp.reqForPersonEntry_jsp._jspService(reqForPersonE
> ntry_jsp.java:266)
> >          at
> > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
> >          at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> >
> >
> > Line 832 is the doStartTag execution,
> > reqForPersonEntry_jsp.java:823 - 832 is this:
> >      org.dbforms.taglib.TableData _jspx_th_db_tableData_0 =
> > (org.dbforms.taglib.TableData)
> > _jspx_tagPool_db_tableData_visibleFields_storeField_name_forei
> > gnTable_nobody.get(org.dbforms.taglib.TableData.class);
> >      _jspx_th_db_tableData_0.setPageContext(_jspx_page_context);
> >      _jspx_th_db_tableData_0.setParent((javax.servlet.jsp.tagext.Tag)
> > _jspx_th_db_body_1);
> >      _jspx_th_db_tableData_0.setName("select_categ");
> >      _jspx_th_db_tableData_0.setForeignTable("categories");
> >      _jspx_th_db_tableData_0.setVisibleFields("category");
> >      _jspx_th_db_tableData_0.setStoreField("category");
> >      int[] _jspx_push_body_count_db_tableData_0 = new int[] { 0 };
> >      try {
> >        int _jspx_eval_db_tableData_0 =
> > _jspx_th_db_tableData_0.doStartTag();
> >
> > Any ideas as to the most likely causes, or the best way to
> > get to the bottom of what is the cause, would be greatly appreciated.
> > Thanks,
> > Bill
> >
> >
> > -------------------------------------------------------
> > SF email is sponsored by - The IT Product Guide Read honest &
> > candid reviews on hundreds of IT Products from real users.
> > Discover which products truly live up to the hype. Start reading now.
> > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> > _______________________________________________
> > DbForms Mailing List
> >
> > http://www.wap-force.net/dbforms
> >


----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to