DataTable help!

Hi,
I'm a new user of Sun Java Studio Creator, and I was trying to follow the tutorials to make a database connection to a DataTable. It should be very easy to do so, and I did it, but it only worked with the database that came with the IDE (Travel).
I've created a datasource to an Oracle database, and it allowed me to see the tables in it... The problem appears when I drag and drop any table to a datatable. The datatable imediatly becomes a little red square!
Is it because my version is the trial one?
I apreciate any help
Pedro Freitas

Hi again,
I verified, and the connection to the database was ok (I was able to see tabs with the entries of some tables).
When that odd behaviour happens (red square...) no message appears in the left bottom of the window, only a red circle with a x on it!
But in the log, many exceptions occur. I've copied them to this message.
Thanks for the help
Pedro Freitas
[org.netbeans.core.modules #4] Warning: the extension C:\Sun\Creator\modules\ext\sac.jar may be multiply loaded by modules: [C:\Sun\Creator\modules\css.jar, C:\Sun\Creator\modules\insync.jar]; see: http://www.netbeans.org/download/dev/javadoc/OpenAPIs/org/openide/doc-files/classpath.html#class-path
Turning on modules:
     org.openide/1 [4.26.2 040903]
     org.openide.io [1.1.2 040903]
     org.openide.execution [1.1.1 040903]
     org.netbeans.modules.extbrowser/1 [1.3.2 040903]
     org.openide.src [1.1.1 040903]
     org.netbeans.modules.classfile/1 [1.8 040903]
     org.openide.compiler [1.2.1 040903]
     org.openide.loaders [4.11.1 040903]
     org.netbeans.core/1 [1.21.2 040903]
     org.netbeans.lib.terminalemulator [1.1.1 040903]
     org.netbeans.core.output/1 [1.1.1 040903]
     org.netbeans.core.compiler/1 [1.4.1 040903]
     org.openide.debugger [1.1.1 040903]
     org.netbeans.api.java/1 [1.3.1 040903]
     org.netbeans.core.execution/1 [1.3.1 040903]
     org.netbeans.modules.java/1 [1.16.2 040903]
     org.netbeans.modules.beans/1 [1.11.2 040903]
     org.netbeans.modules.editor/1 [1.14.4 040903]
     org.netbeans.modules.diff/1 [1.7.1 040903]
     org.netbeans.modules.schema2beans/1 [1.7.1 040903]
     org.netbeans.libs.j2eeeditor/1 [1.1.1 040903]
     org.netbeans.core.ide/1 [1.3.1 040903]
     com.sun.rave.layoutmgr/1 [1.1 040903]
     org.netbeans.api.xml/1 [1.3.1.3.6.0 3.6.0 040903]
     org.netbeans.modules.css/2 [1.1.1.3.6.0 3.6.0 040903]
     com.sun.rave.beans2/1 [1.0.2 040903]
     org.netbeans.modules.javahelp/1 [2.1.1 040903]
     org.netbeans.libs.xerces/1 [1.4.1 2.6.0]
     org.apache.tools.ant.module/3 [3.6.1 040903]
     org.netbeans.modules.j2eeapis/1 [1.0 040903]
     org.netbeans.modules.settings/1 [1.4.1 040903]
     org.netbeans.modules.debugger.core/3 [2.10.2 040903]
     org.netbeans.modules.j2eeserver/3 [1.1.4 040903]
     org.netbeans.modules.debugger.jpda/1 [1.17.2 040903]
     org.netbeans.api.web.dd/1 [1.1.1 1.0 040903]
     com.sun.rave.project/1 [1.0.3 040903]
     com.sun.rave.welcome/1 [1.0.2 040903]
     org.netbeans.core.ui/1 [1.3.1 040903]
     org.netbeans.modules.text/1 [1.12.1 040903]
     org.netbeans.modules.servletapi24/1 [2.0.1 2.0.1 040903]
     com.sun.rave.jsfcl/1 [1.0.3 040903]
     com.sun.rave.jsfsupport/1 [1.0.3 040903]
     org.netbeans.modules.web.jspparser/2 [2.0.1 040903]
     com.sun.rave.insync/1 [1.0.3 040903]
     com.sun.rave.jsfmetadata/1 [1.0.1 040903]
     com.sun.rave.toolbox/1 [1.0.3 040903]
     com.sun.rave.designer/1 [1.0.3 040903]
     com.sun.rave.navigation/1 [1.0.2 040903]
     org.netbeans.modules.xml.core/2 [1.1.1.3.6.0 3.6.0 040903]
     org.netbeans.modules.xml.text/2 [1.1.1.3.6.0 3.6.0 040903]
     org.netbeans.modules.html/1 [1.12.3 040903]
     org.netbeans.modules.web.core.syntax/1 [1.13.1 040903]
     com.sun.rave.servernav/1 [1.0 040903]
     com.sun.rave.dataconnectivity/1 [1.0.3 040903]
     org.netbeans.modules.schema2beansdev/1 [1.1.1 040903]
     org.netbeans.modules.xml.catalog/2 [1.1.1.3.6.0 3.6.0 040903]
     com.sun.tools.appserver/1 [2.0.1 20040903-1052]
     com.sun.rave.plaf/1 [0.1 040903]
     com.sun.rave.windowmgr/1 [1.1 040903]
     org.netbeans.modules.autoupdate/1 [2.8.2 040903]
     org.openidex.util/2 [2.7.1 040903]
     org.netbeans.modules.utilities/1 [1.15.1 040903]
     com.sun.rave.jspsyntaxint/1 [1.0 040903]
     com.sun.rave.jwsdpsupport/1 [1.0 040903]
     com.sun.rave.sam/1 [1.0.3 040903]
     com.sun.rave.websvc/1 [1.0.3 040903]
     com.sun.rave.licensemgr/1 [1.2 040903]
     com.sun.rave.raveupdate/1 [1.0.1 040903]
     org.netbeans.modules.properties/1 [1.11.2 040903]
     org.netbeans.modules.properties.syntax/1 [1.11 040903]
     org.netbeans.modules.image/1 [1.11.1 040903]
     com.sun.rave.errorhandler.server/1 [0.1 040903]
     org.netbeans.modules.clazz/1 [1.13.1 040903]
     com.sun.rave.ravehelp/1 [1.0.2 040903]
HtmlDataTableState.ResultSetInfo.refreshColumns(): probable ResultSetMetaData problem:
java.sql.SQLException: JDBC driver does not support PreparedStatement.getMetaData()
     at com.sun.sql.rowset.JdbcRowSetXImpl.getMetaData(Unknown Source)
     at com.sun.jsfcl.std.table.HtmlDataTableState$ResultSetInfo.refreshColumns(Unknown Source)
     at com.sun.jsfcl.std.table.HtmlDataTableState.refreshColumnInfo(Unknown Source)
     at javax.faces.component.html.HtmlDataTableLiveBeanInfo.linkBeans(Unknown Source)
     at com.sun.rave.insync.models.FacesModel.linkBeans(Unknown Source)
     at com.sun.rave.designer.DndHandler.handleLinks(Unknown Source)
     at com.sun.rave.designer.DndHandler.importBean(Unknown Source)
     at com.sun.rave.designer.DndHandler.importDataDelayed(Unknown Source)
     at com.sun.rave.designer.DndHandler.access$000(Unknown Source)
     at com.sun.rave.designer.DndHandler$1.run(Unknown Source)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caught java.lang.reflect.InvocationTargetException in SLP.invokeSetter com.sun.jsfcl.data.RowSetDataModel.rowSet to:com.sun.sql.rowset.JdbcRowSetXImpl@1fa5453 [com.sun.sql.rowset.JdbcRowSetXImpl]
*********** Exception occurred ************ at Fri Apr 01 11:46:34 BST 2005
java.lang.IllegalArgumentException: 0
     at com.sun.jsfcl.data.RowSetDataModel.getRowData(Unknown Source)
     at com.sun.jsfcl.data.RowSetDataModel.setRowIndex(Unknown Source)
     at javax.faces.component.UIData.setRowIndex(Unknown Source)
     at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:219)
[catch] at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
     at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.renderNode(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(Unknown Source)
     at com.sun.rave.css2.FacesSupport.getFacesHtml(Unknown Source)
     at com.sun.rave.css2.CssContainerBox.addNode(Unknown Source)
     at com.sun.rave.css2.CssContainerBox.createChildren(Unknown Source)
     at com.sun.rave.css2.DocumentBox.createChildren(Unknown Source)
     at com.sun.rave.css2.DocumentBox.relayout(Unknown Source)
     at com.sun.rave.css2.PageBox.layout(Unknown Source)
     at com.sun.rave.css2.PageBox.paint(Unknown Source)
     at com.sun.rave.css2.PageBox.paint(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.paintSafely(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.paint(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.update(Unknown Source)
     at javax.swing.JComponent.paintComponent(JComponent.java:541)
     at com.sun.rave.designer.DesignerPane.paintComponent(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:808)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JViewport.paint(JViewport.java:722)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4787)
     at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740)
     at javax.swing.JComponent._paintImmediately(JComponent.java:4685)
     at javax.swing.JComponent.paintImmediately(JComponent.java:4488)
     at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
     at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
INFORMATIONAL *********** Exception occurred ************ at Fri Apr 01 11:46:34 BST 2005
Annotation: Component HTML encoding error
java.lang.IllegalArgumentException: 0
     at com.sun.jsfcl.data.RowSetDataModel.getRowData(Unknown Source)
     at com.sun.jsfcl.data.RowSetDataModel.setRowIndex(Unknown Source)
     at javax.faces.component.UIData.setRowIndex(Unknown Source)
     at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:219)
[catch] at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
     at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.renderNode(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(Unknown Source)
     at com.sun.rave.css2.FacesSupport.getFacesHtml(Unknown Source)
     at com.sun.rave.css2.CssContainerBox.addNode(Unknown Source)
     at com.sun.rave.css2.CssContainerBox.createChildren(Unknown Source)
     at com.sun.rave.css2.DocumentBox.createChildren(Unknown Source)
     at com.sun.rave.css2.DocumentBox.relayout(Unknown Source)
     at com.sun.rave.css2.PageBox.layout(Unknown Source)
     at com.sun.rave.css2.PageBox.paint(Unknown Source)
     at com.sun.rave.css2.PageBox.paint(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.paintSafely(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.paint(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.update(Unknown Source)
     at javax.swing.JComponent.paintComponent(JComponent.java:541)
     at com.sun.rave.designer.DesignerPane.paintComponent(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:808)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JViewport.paint(JViewport.java:722)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4787)
     at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740)
     at javax.swing.JComponent._paintImmediately(JComponent.java:4685)
     at javax.swing.JComponent.paintImmediately(JComponent.java:4488)
     at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
     at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
INFORMATIONAL *********** Exception occurred ************ at Fri Apr 01 11:46:34 BST 2005
Annotation: Component HTML encoding error
java.lang.IllegalArgumentException: 0
     at com.sun.jsfcl.data.RowSetDataModel.getRowData(Unknown Source)
     at com.sun.jsfcl.data.RowSetDataModel.setRowIndex(Unknown Source)
     at javax.faces.component.UIData.setRowIndex(Unknown Source)
     at com.sun.faces.renderkit.html_basic.TableRenderer.encodeChildren(TableRenderer.java:219)
[catch] at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:693)
     at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.renderNode(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.renderBean(Unknown Source)
     at com.sun.rave.insync.faces.FacesPageUnit.getFacesRenderTree(Unknown Source)
     at com.sun.rave.css2.FacesSupport.getFacesHtml(Unknown Source)
     at com.sun.rave.css2.CssContainerBox.addNode(Unknown Source)
     at com.sun.rave.css2.CssContainerBox.createChildren(Unknown Source)
     at com.sun.rave.css2.DocumentBox.createChildren(Unknown Source)
     at com.sun.rave.css2.DocumentBox.relayout(Unknown Source)
     at com.sun.rave.css2.PageBox.layout(Unknown Source)
     at com.sun.rave.css2.PageBox.paint(Unknown Source)
     at com.sun.rave.css2.PageBox.paint(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.paintSafely(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.paint(Unknown Source)
     at com.sun.rave.designer.DesignerPaneUI.update(Unknown Source)
     at javax.swing.JComponent.paintComponent(JComponent.java:541)
     at com.sun.rave.designer.DesignerPane.paintComponent(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:808)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JViewport.paint(JViewport.java:722)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at com.sun.winsys.layout.impl.DnDPanel.paintChildren(Unknown Source)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintChildren(JComponent.java:647)
     at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
     at javax.swing.JComponent.paint(JComponent.java:817)
     at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4787)
     at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740)
     at javax.swing.JComponent._paintImmediately(JComponent.java:4685)
     at javax.swing.JComponent.paintImmediately(JComponent.java:4488)
     at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
     at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:117)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

Similar Messages

  • Refreshing specific cell in dataTable?

    Hi
    How do I get a dataTable to re-render a specific cell? As an example, consider Bean listed below. Initially, the dataTable displays the values as iterated over Bean.lines. Later in response to a user action (see Bean.updateLine), I'd like the appropriate cell in the dataTable to be refreshed (without of course having to press a 'Refresh' button).
    How do I achieve this with dataTable?
    public class Bean {
      private List<Line> lines = new ArrayList<Line>();
      public List<Line> getLines() {
        return lines;
      // called (in response to a user action for example) to refresh a specific line value
      public void updateLine() {
        lines.get(0).setVal("some new value");
      public class Line {
        private final String id;
        private String val;
        private Line(String id) {
          this.id = id;
        public String getId() {
          return id;
        // calling this must trigger the dataTable to refresh the appropriate cell (ideally)
        // or else the entire dataTable in the browser
        public void setVal(String val) {
          this.val = val;
        public void getVal() {
          return val;
      } // Line
            <h:dataTable value="#{bean.lines}" var="line">
              <h:column>
                <h:outputText value="#{line.id}"/>
              </h:column>
              <h:column>
                <h:outputText value="#{line.val}"/>
              </h:column>
            </h:dataTable>Help much appreciated
    Lance

    Thanks, AJAX is doing the trick nicely.
    For the benefit of a future question, I'm using onclick="doSomething()" on a component within the table (a selectBooleanCheckbox in my case).
    Main JavaScript / AJAX:
          <script type="text/javascript">
            function doSomething(elementId) {
              var rowNum = elementId.split(":")[2]; // position in table
              var someId = document.getElementById("form_id:table_id:" +
                                                  rowNum + ":textbox_id").innerHTML;
              var url = "handler?cmd=MY_SERVLET_CMD" + // handler points to HandlerServlet
                                "&some_id=" + encodeURIComponent(someId) +
                                "&row_num=" + encodeURIComponent(rowNum);
              if (typeof XMLHttpRequest != "undefined") {
                req = new XMLHttpRequest(); // AJAX
              } else if (window.ActiveXObject) {
                req = new ActiveXObject("Microsoft.XMLHTTP");
              } else {
                alert("Browser not supported!");
              req.open("GET", url, true); // true = asynchronous AJAX call
              req.onreadystatechange = doSomethingCallback; // only if asynchronous
              req.send(null);
          </script>Callback function (invoked on return from the servlet - see reference in doSomething above):
          <script type="text/javascript">
            function doSomethingCallback() {
              if (req.readyState == 4) { // checks are needed else we react before response is complete
                if (req.status == 200) { // see comment above
                  var prefix = "form_id:table_id:";
                  var suffix = ":checkbox_id"; // we want to update all check boxes - see below
                  var msg = req.responseXML.getElementsByTagName("message")[0];
                  var lineCount = msg.getElementsByTagName("line_count")[0].childNodes[0].nodeValue;
                  var rowNum = msg.getElementsByTagName("row_num")[0].childNodes[0].nodeValue;
                  var checkAll =
                    document.getElementById(prefix + rowNum + ":check_all_id"); // another check box that determines state of check boxes below
                  var lineCheckId = ""; // line checkbox element
                  for (var i = rowNum, n = parseInt(rowNum) +
                                                  parseInt(lineCount); i < n; i++) {
                    lineCheckId = prefix + i + suffix;
                    document.getElementById(lineCheckId).checked = checkAll.checked; // update the DOM
                } // status
              } // readyState
          </script>

  • Show HashMap in Datatable. UIColumn with embedded Datatable. Help Needed

    Hi,
    I am trying to display a HashMap in a datatable where the values for each key is an ArrayList e.g.
            ArrayList al = new ArrayList();
            al.add("AA");
            al.add("BB");
            al.add("CC");
            HashMap hm = new HashMap();
            hm.put("ONE", al);
            ArrayList al2 = new ArrayList();
            al2.add("AA2");
            al2.add("BB2");
            al2.add("CC2");
            hm.put("TWO", al2);Now I have a Datatable with two columns. First column shows the key and the second column I again have
    a datatable to show the ArrayList. So I will have one row with a key and the values again shown in a
    datatable. So far I no luck and need some help on how to achieve this. Here is the index2.jsp code I have:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
      <html>
        <head>
          <meta http-equiv="Content-Type"
                content="text/html; charset=windows-1252"/>
          <title>index2</title>
        </head>
        <body><h:form binding="#{backing_index2.form1}" id="form1">
        <h:dataTable value="#{backing_index2.entrySet}" var="var1"
                         binding="#{backing_index2.dataTable1}" id="dataTable1" border="1">         
              <h:column>
                <f:facet name="header">
                  <h:outputText value="Keys"/>
                </f:facet>
                <h:outputText value="#{var1.key}"/>
              </h:column>
              <h:column>
                  <f:facet name="header">
                      <h:outputText value="Values"/>
                    </f:facet>
                  <h:dataTable value="#{backing_index2.entrySet}" var="var2"
                             binding="#{backing_index2.dataTable2}" id="dataTable2">             
                      <h:column id="col2">
                        <h:outputText id="out3" value="#{var2.value}"/>
                      </h:column>
                </h:dataTable>
              </h:column>
            </h:dataTable>
        </h:form></body>
      </html>
    </f:view>And here is the backing bean Index2.java I have:
    package project1.backing;
    import java.util.ArrayList;
    import java.util.HashMap;
    import java.util.List;
    import javax.faces.component.html.HtmlDataTable;
    import javax.faces.component.html.HtmlForm;
    public class Index2 {
        private HtmlForm form1;
        private HtmlDataTable dataTable1;
        private HtmlDataTable dataTable2;
        private List entrySet;
        private HashMap hm;
        public Index2() {
            ArrayList al = new ArrayList();
            al.add("AA");
            al.add("BB");
            al.add("CC");
            hm = new HashMap();
            hm.put("ONE", al);
            ArrayList al2 = new ArrayList();
            al2.add("AA2");
            al2.add("BB2");
            al2.add("CC2");
            hm.put("TWO", al2);
            entrySet = new java.util.ArrayList(hm.entrySet());
         //here it only prints two rows as i have two keys but on the output it
         //does not come up fine
            for (int i = 0; i < entrySet.size(); i++) {
                System.out.println("==== " + entrySet.get(i));
        public void setForm1(HtmlForm form1) {
            this.form1 = form1;
        public HtmlForm getForm1() {
            return form1;
        public void setDataTable1(HtmlDataTable dataTable1) {
            this.dataTable1 = dataTable1;
        public HtmlDataTable getDataTable1() {
            return dataTable1;
        public void setDataTable2(HtmlDataTable dataTable2) {
            this.dataTable2 = dataTable2;
        public HtmlDataTable getDataTable2() {
            return dataTable2;
        public void setEntrySet(List entrySet) {
            this.entrySet = entrySet;
        public List getEntrySet() {
            return entrySet;
        public void setHm(HashMap hm) {
            this.hm = hm;
        public HashMap getHm() {
            return hm;
    }Now when I run this application the keys are shown in the respective column but values are coming up as
    [AA2, BB2, CC2] in one row rather in a separate Row as I am using a Datatable inside UIColumn to show the values.
    Here is what I see in the output:
    keys        Values
    TWO         [AA2, BB2, CC2]
                [AA, BB, CC]
    ONE         [AA2, BB2, CC2]
                [AA, BB, CC] As above output is not correct as it shows both list values in front of each key rather than what those
    keys are tied to. I wanted the following output:
    keys        Values
    ONE         AA
                BB
             CC
    TWO         AA2
                BB2
             CC2So I can do sorting pagination on the values datatable. But currently the output is not shown correctly. Any help
    is really appreciated. My hashmap will be populated dynamically so wants to show the key and values in separate column
    but also need to show the values in an embedded datatable as the list can be huge.

    Rather use a Collection of DTO's. See http://balusc.xs4all.nl/srv/dev-jep-dat.html for some insights. There is also a section "Nesting datatables".

  • Two datatables in a form problem. Please help!

    Hi,
    I have two datatables in one form. Every row renders an input which is bound to a Double propery of a list item.
    I fill both tables with some data and in one input i enter a String. I submit the form, the conversion fails and I come back to the same page, but.. the OTHER datatable loses all the changes I made! Is this expected behavior? Please help..

    Ok, I have two lists in a bean:
    List<ValueHolder> list1;
    List<ValueHolder> list2;and a form:
    <h:form>
      <h:commandButton action="#{conversationBean.submit}" value="test"/>
      <h:dataTable  value="#{conversationBean.list1}" var="entry1" id="dt1" >
        <h:column>
          <h:inputText value="#{entry1.value}" id="entryId1" />
        </h:column>
      </h:dataTable>
      <h:dataTable  value="#{conversationBean.list2}" var="entry2" id="dt2" >
        <h:column>
          <h:inputText value="#{entry2.value}" id="entryId2" />
        </h:column>
      </h:dataTable>
    </h:form>Now let's say that first table contains values 1, 1, 1 and the second table 2, 2, 2 at the moment of rendering the page. I enter values 3, 3, 3 in first table and 4, 4, aaa in the second. I sumbit the form, and I'm experiencing postback to the same page because aaa can't be converted to Double. But the state of tables after the postback is: 1, 1, 1 in first table and 4, 4, aaa in the second one. Therefore, I have lost changes I made in the first table.
    Edited by: wilczarz on Oct 24, 2008 3:28 AM

  • h:datatable error!!!who can help me??

    I had met a quession when i use the tag <h:datatable>,please help me.
    there is no problem about my managed bean.
    <%@ page language="java" pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%
         String path = request.getContextPath();
         String basePath = request.getScheme() + "://"     + request.getServerName() + ":" + request.getServerPort()+ path + "/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <base href="<%=basePath%>">
    <title>My JSF 'test.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <!--<link rel="stylesheet" type="text/css" href="styles.css">
    -->
    </head>
    <body>
       <f:view>
         <h:form>
           <h:dataTable  value="#{user.dataModel}" var="a">
                <h:column>
                <f:facet name="header">
                    <h:outputText value="id" />
               </f:facet>
                    <h:outputText value="#{a.id}" />
                </h:column>
             </h:dataTable>
           </h:form>
       </f:view>
      </body>
    </html>it's said that the error occured in <h:dataTable value="#{user.dataModel}" var="a">
    error:Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /test.jsp(34,4) According to TLD or attribute directive in tag file, attribute value does not accept any expressions
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:406)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:147)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.checkXmlAttributes(Validator.java:1128)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:818)
         at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:837)
         at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         at org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:837)
         at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2392)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:489)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336)
         at org.apache.jasper.compiler.Validator.validate(Validator.java:1679)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:178)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:404)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:228)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:212)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:818)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:624)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:445)
         at java.lang.Thread.run(Thread.java:595)thank you for your help!
    my email : [email protected]

    i have done several re-installs to date - i an now careful to thoroughly clean my machine after uninstalling...remove registry entries, removing directories, and rebooting, etc. while i have never seen that specific error, i have had problems if the machine wasn't "clean"...
    hope this helps...

  • I need help with JSF DataTable

    hi all,
    i have a problem with my DataTable items ...
    i need to access the actuell item of the Table dynamiclly something like this :
    <TD width=1000><h:dataTable id="myId" width="0" border="0" cellspacing="0" cellpadding="10"
    value="#{PageIteratorBean.first}" var="item">
    <h:column>
    <f:verbatim>
    <br>
    <h:outputText value="#{item.discription}" />
    </f:verbatim>
    <h:commandLink action="#{NewsReadBean.linkNews}" styleClass="readMoreLink">
    <h:outputText value="read more ..." styleClass="newsDate" />
    <f:param name="newsPath" value="#{item.path}" />
    </h:commandLink>
    <f:verbatim>
    <jsp:include page='<%=item.path%>' flush="true">
    </jsp:include>
    how can i realise this code ... in this 2 rows i get allways that
    "item.path" cannt be resolved.... what should i do??
    maybe u have an idea or other solutions
    help me please i need to include dynamiclly to every item some other information...
    </f:verbatim>
    </h:column>

    Hi,
    Enter:      79649908
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

  • A little help about datatable...

    Hi guys,
    i need desperately your help. I'm learning Jsf.
    I'm trying to understand datatable's use.
    I've a form with three value, Name, Lastname, City.
    The user inserts a number(5 for example) in a page and i want my
    application shows in another page a datatable with 5 rows and
    Name,Lastname,City values,to allows to user to compile 5 forms in the
    same page.
    How can i do it with datatable?
    Can you help me posting code and links or idea?
    Please help me,i'm a new user of datatable and i'm trying it too
    difficult.....

    Cause i've to create a datatable with empty fields for users,
    when i create the rows to add to list i've to add "" as value?
    Please help me....
    i need more help...THANKS

  • Datatable, "calender helper",performance

    hii everybody,
    my paroblem is about datatable and calender helper inputtext component on it .
    Problem 1: i know that , calender helper conponents dont appear in a datatable because of script bug. but i solved this problem as writing a external sript . but if large amount data with datehelper component in datatable ,at this time page is loading very slowly.
    has it been fixed this problem. pls help me .
    thanks a lot

    try to use the popupCalendar component of jenia4faces.
    Go to www.jenia.org and look for popupFamily

  • Baulsc  help - Can a custom validator display a error in the UI dataTable

    Hi balusc,
    Pls refer to my post in the topic
    "Can a custom validator display a error in the UI dataTable + jsf"
    Give me a solution pls.
    Thanks,
    Ambika&#9786;

    avoid another thread for same ?
    http://forum.java.sun.com/thread.jspa?threadID=5229577

  • Tomahawk t:dataTable  question, please help

    I am using tomahawk dataTable and dataScroller tags to display results retrieved from database. For each row, I would like to have a button that will edit a value associated with that particular row. But the JSF gave all rows on the page same id, when I press one button, every row was fired off. Any suggestion is highly appreciated.
    Here is my code:
    <t:dataTable id="data" styleClass="TabForegroundColor" headerClass="standardTable_Header" footerClass="standardTable_Header"
    rowClasses="AltRows1, AltRows2"
    columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
    var="bl" value="#{ctReportdatahandler.ctReportModel}"
    rows="#{ctReportdatahandler.noOfRows}"
    rowIndexVar="index"
    forceId="true"     forceIdIndex="true"          
    sortColumn="#{ctReportdatahandler.sort}"
    sortAscending="#{ctReportdatahandler.ascending}" preserveSort="true">
    <t:column>
    <f:facet name="header">
    <h:outputText value="" />
    </f:facet>
         <h:commandButton value="h" actionListener="{ctReportdatahandler.historyCtBarcodes}" action="#{ctReportdatahandler.dummy}" onclick="barcodeHistory('#{bl.ctBarcode}')" styleClass="Button" />               </t:column>                         
    Incorrect source:
    <tr class="AltRows1"><td class="standardTable_Column"><input id="_id26:data:_id29" name="_id26:data:_id29" type="submit" value="h" onclick="barcodeHistory('CT00468873');clear__5Fid26();document.forms['_id26'].elements['autoScroll'].value=getScrolling();" class="Button" /></td</tr>
    <tr class="AltRows1"><td class="standardTable_Column"><input id="_id26:data:_id29" name="_id26:data:_id29" type="submit" value="h" onclick="barcodeHistory('CT00468877');clear__5Fid26();document.forms['_id26'].elements['autoScroll'].value=getScrolling();" class="Button" /></td></tr>
    Both buttons are id26:data:id29, I expect the first row id26:data0:id29 and 2nd row id26:data1:id29 so if I press button for row 0, row1 button won't get fired off.

    Thank y'all for responding. I am using SUN RI with Tomahawk. For whatever reason, I am not able to get myfaces to work with my menu:
    <t:jscookMenu layout="hbr" theme="ThemeOffice">
    <%/* Availaible jscookMenu themes: ThemeIE, ThemeMiniBlack, ThemeOffice, ThemePanel
    Availaible jscookMenu layout: hbr, hbl, hur, hul, vbr, vbl, vur, vul
    respect to Heng Yuan http://www.cs.ucla.edu/~heng/JSCookMenu
    */%>
    <t:navigationMenuItem id="nav_1"
    I figured out a work around though:
    <t:commandButton value="h" forceId="true"     forceIdIndex="true" actionListener="#{ctReportdatahandler.historyCtBarcodes}" action="#{ctReportdatahandler.dummy}" onclick="barcodeHistory('#{bl.ctBarcode}')" styleClass="Button" />                         
    This gives me the unigue id that I am looking for.

  • Need Help with my JSF-Project - ResultSet to List to DataTable/c:foreach

    Hello!
    I am struggeling heavily with JSF and JSTL and JSPs...
    I want to show a list of names from a database in my JSF-Document.
    I have the following bean "Category":
    package de.fh_offenburg.audiodb.webapp;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    import javax.servlet.jsp.jstl.sql.Result;
    public class Category {
         String name = "";
         String creationDate = "";
         int id_kategorie = 0;
         ResultSet resultset;
         Result result;
         Connection con;
         String query = "";
         List result_list;
         Category() {
              result_list = new ArrayList();
              try{
                   con = new ConnectDB().connect();
                   Statement statement = con.createStatement();
                   query = "SELECT * FROM Category WHERE isUKat = '0'";
                   resultset = statement.executeQuery(query);
                   while (resultset.next()) {
                     // Get the data from the row using the column index
                     String name = resultset.getString("name");
                     // create an object for each row (yes, it is hibernate biased) ;-)
                     Cat cat = new Cat();
                     cat.setName(name);
                     cat.setId_kategorie(id_kategorie);
                     // Add the object to the list
                     result_list.add(cat);
              } catch(Exception hcat){
                   System.out.println("HCat-Problem: "+hcat.getMessage());
         public java.lang.String getCreationDate() {
              return creationDate;
         public void setCreationDate(java.lang.String creationDate) {
              this.creationDate = creationDate;
         public int getId_kategorie() {
              return id_kategorie;
         public void setId_kategorie(int id_kategorie) {
              this.id_kategorie = id_kategorie;
         public java.lang.String getName() {
              return name;
         public void setName(java.lang.String name) {
              this.name = name;
         public java.sql.ResultSet getResultset() {
              return resultset;
         public void setResult_cat(java.sql.ResultSet result_cat) {
              this.resultset = result_cat;
         public void setResult(Result result) {
              this.result = result;
         public Result getResult() {
              return result;
         public List getResult_list() {
              return result_list;
         public void setResult_list(ArrayList result_list) {
              this.result_list = result_list;
         }This Bean is registered in my faces-config.xml like this:
    <managed-bean>
      <managed-bean-name>category</managed-bean-name>
      <managed-bean-class>de.fh_offenburg.audiodb.webapp.Category</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
      <managed-property>
       <property-name>creationDate</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>id_kategorie</property-name>
       <property-class>int</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>name</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property id="result">
       <property-name>result</property-name>
       <property-class>javax.servlet.jsp.jstl.sql.Result</property-class>
       <value/>
      </managed-property>
      <managed-property id="resultset">
       <property-name>resultset</property-name>
       <property-class>java.sql.ResultSet</property-class>
       <value/>
      </managed-property>
      <managed-property id="result_list">
       <property-name>result_list</property-name>
       <property-class>java.util.List</property-class>
       <value/>
      </managed-property>
    </managed-bean>Now I try to read the list of Cats out in my JSF:
                                                      <h:dataTable value="#{category.result_list}" var="result">
                                                           <h:column>
                                                                          <h:outputText value="#{result.name}" />
                                                           </h:column>
                                                      </h:dataTable>... but that doesnt work... I got an error:
    javax.servlet.ServletException: Cannot get value for expression '#{category.result_list}'
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
         org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    root cause So what am I doing wrong?
    I did try to do the same with an JSTL-Syntax (which would be better for me, because I want to layout with DIVs not with a Table...):
                                                      <c:forEach items="#{category.result_list}" var="result">
                                                           <div class="div_mini_kat"><c:out value="#{result.name}"/></div>
                                                      </c:forEach>But that doesnt work out neigther...
    Could someone please tell me what I am doing wrong? I am trying this for days now and I am feeling like a bumble-bee in a glasshouse with one small open doorway which I dont see and thousands of m^2 to crash with...
    Thanks to everyone who answers in advance!!!
    Fuchur

    Hello!
    I am struggeling heavily with JSF and JSTL and JSPs...
    I want to show a list of names from a database in my JSF-Document.
    I have the following bean "Category":
    package de.fh_offenburg.audiodb.webapp;
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.Statement;
    import java.util.ArrayList;
    import java.util.List;
    import javax.servlet.jsp.jstl.sql.Result;
    public class Category {
         String name = "";
         String creationDate = "";
         int id_kategorie = 0;
         ResultSet resultset;
         Result result;
         Connection con;
         String query = "";
         List result_list;
         Category() {
              result_list = new ArrayList();
              try{
                   con = new ConnectDB().connect();
                   Statement statement = con.createStatement();
                   query = "SELECT * FROM Category WHERE isUKat = '0'";
                   resultset = statement.executeQuery(query);
                   while (resultset.next()) {
                     // Get the data from the row using the column index
                     String name = resultset.getString("name");
                     // create an object for each row (yes, it is hibernate biased) ;-)
                     Cat cat = new Cat();
                     cat.setName(name);
                     cat.setId_kategorie(id_kategorie);
                     // Add the object to the list
                     result_list.add(cat);
              } catch(Exception hcat){
                   System.out.println("HCat-Problem: "+hcat.getMessage());
         public java.lang.String getCreationDate() {
              return creationDate;
         public void setCreationDate(java.lang.String creationDate) {
              this.creationDate = creationDate;
         public int getId_kategorie() {
              return id_kategorie;
         public void setId_kategorie(int id_kategorie) {
              this.id_kategorie = id_kategorie;
         public java.lang.String getName() {
              return name;
         public void setName(java.lang.String name) {
              this.name = name;
         public java.sql.ResultSet getResultset() {
              return resultset;
         public void setResult_cat(java.sql.ResultSet result_cat) {
              this.resultset = result_cat;
         public void setResult(Result result) {
              this.result = result;
         public Result getResult() {
              return result;
         public List getResult_list() {
              return result_list;
         public void setResult_list(ArrayList result_list) {
              this.result_list = result_list;
         }This Bean is registered in my faces-config.xml like this:
    <managed-bean>
      <managed-bean-name>category</managed-bean-name>
      <managed-bean-class>de.fh_offenburg.audiodb.webapp.Category</managed-bean-class>
      <managed-bean-scope>application</managed-bean-scope>
      <managed-property>
       <property-name>creationDate</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>id_kategorie</property-name>
       <property-class>int</property-class>
       <value/>
      </managed-property>
      <managed-property>
       <property-name>name</property-name>
       <property-class>java.lang.String</property-class>
       <value/>
      </managed-property>
      <managed-property id="result">
       <property-name>result</property-name>
       <property-class>javax.servlet.jsp.jstl.sql.Result</property-class>
       <value/>
      </managed-property>
      <managed-property id="resultset">
       <property-name>resultset</property-name>
       <property-class>java.sql.ResultSet</property-class>
       <value/>
      </managed-property>
      <managed-property id="result_list">
       <property-name>result_list</property-name>
       <property-class>java.util.List</property-class>
       <value/>
      </managed-property>
    </managed-bean>Now I try to read the list of Cats out in my JSF:
                                                      <h:dataTable value="#{category.result_list}" var="result">
                                                           <h:column>
                                                                          <h:outputText value="#{result.name}" />
                                                           </h:column>
                                                      </h:dataTable>... but that doesnt work... I got an error:
    javax.servlet.ServletException: Cannot get value for expression '#{category.result_list}'
         javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
         org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
         org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
    root cause So what am I doing wrong?
    I did try to do the same with an JSTL-Syntax (which would be better for me, because I want to layout with DIVs not with a Table...):
                                                      <c:forEach items="#{category.result_list}" var="result">
                                                           <div class="div_mini_kat"><c:out value="#{result.name}"/></div>
                                                      </c:forEach>But that doesnt work out neigther...
    Could someone please tell me what I am doing wrong? I am trying this for days now and I am feeling like a bumble-bee in a glasshouse with one small open doorway which I dont see and thousands of m^2 to crash with...
    Thanks to everyone who answers in advance!!!
    Fuchur

  • Passing DataTable as parameter - help :(

    Hi all:
    I'm really struggling here. I've been given the task of interfacing with an Oracle stored procedure through my ASP.NET application. The issue is that the stored proc takes a cursor as a parameter.
    That wouldn't be so bad, but the issue is that I don't pull the data that would populate the cursor from a database table. It's built programmatically from the variables passed to the function.
    So I figured I'd build a datatable and try passing that along as the cursor parameter.
    OracleParameter p_input = cmd.Parameters.Add(
    "p_input",
    OracleDbType.Object,
    my_data_table,
    ParameterDirection.Input);
    As the type, I've tried Object, Array (IE, turned my datatable into an array like so:
    ArrayList l = new ArrayList(t.Rows.Count);
    int count = 0;
    foreach (DataRow r in my_data_table.Rows) {
    l.Add(my_data_table.Rows[count]);
    count ++;
    and also RefCursor.
    All of the types I try just give me:
    ERROR: Exception: System.ArgumentException: Invalid parameter binding
    I'm very frustrated and not sure where to go next..
    Any advice?
    Edited by: user9354881 on Mar 19, 2010 8:39 AM

    Hi,
    I'm not clear as to what you're trying to do. You're trying to pass a .NET DataTable IN to a plsql stored procedure? Or you're trying to populate a DataTable via a refcursor?
    You cant pass a datatable in to a stored procedure; you'd need to pass an Oracle type, and you certainly cant pass in a cursor unless you got the cursor from the database.
    If you want to pass in a structure similar to a datatable, you could pass a TABLE OF OBJECT parameter if you're using 11.1.0.6.20 or higher ODP.
    If you want to populate a datatable from a refcursor, see the sample4.cs example on your hard drive in the %ORACLEHOME%\ODP.NET\samples\2.x\RefCursor folder.
    Cheers,
    Greg

  • Help getting data from a DataTable

    Hi:
    How can I get the information of a DataTable that I Get from
    a WebService?
    The response from the WebService is:
    &lt;OBTENERUSUARIOResponse xmlns=&quot;
    http://(IP)/(WebService)/&quot;
    xmlns:xsd=&quot;
    http://www.w3.org/2001/XMLSchema&quot;
    xmlns:xsi=&quot;
    http://www.w3.org/2001/XMLSchema-instance&quot;
    xmlns:soap=&quot;
    http://schemas.xmlsoap.org/soap/envelope/&quot;&gt;
    &lt;OBTENERUSUARIOResult&gt;
    &lt;xsd:schema id=&quot;NewDataSet&quot;
    xmlns:msdata=&quot;urn:schemas-microsoft-com:xml-msdata&quot;
    xmlns:xs=&quot;
    http://www.w3.org/2001/XMLSchema&quot;&gt;
    &lt;xsd:element name=&quot;NewDataSet&quot;
    msdata:MainDataTable=&quot;tblTemporal&quot;
    msdata:UseCurrentLocale=&quot;true&quot;
    msdata:IsDataSet=&quot;true&quot;&gt;
    &lt;xsd:complexType&gt;
    &lt;xsd:choice maxOccurs=&quot;unbounded&quot;
    minOccurs=&quot;0&quot;&gt;
    &lt;xsd:element
    name=&quot;tblTemporal&quot;&gt;
    &lt;xsd:complexType&gt;
    &lt;xsd:sequence&gt;
    &lt;xsd:element name=&quot;CodigoUsuario&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:long&quot;/&gt;
    &lt;xsd:element name=&quot;Condicion&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;Nivel&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:unsignedByte&quot;/&gt;
    &lt;xsd:element name=&quot;Nombre&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;Usuario&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;Clave&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:string&quot;/&gt;
    &lt;xsd:element name=&quot;CodigoServicio&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:long&quot;/&gt;
    &lt;xsd:element name=&quot;NroDocumento&quot;
    minOccurs=&quot;0&quot;
    type=&quot;xs:int&quot;/&gt;
    &lt;/xsd:sequence&gt;
    &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
    &lt;/xsd:choice&gt;
    &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
    &lt;/xsd:schema&gt;
    &lt;diffgr:diffgram
    xmlns:msdata=&quot;urn:schemas-microsoft-com:xml-msdata&quot;
    xmlns:diffgr=&quot;urn:schemas-microsoft-com:xml-diffgram-v1&quot;&gt;
    &lt;NewDataSet&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal1&quot;
    msdata:rowOrder=&quot;0&quot;&gt;
    &lt;CodigoUsuario&gt;1&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Sr.&lt;/Condicion&gt;
    &lt;Nivel&gt;1&lt;/Nivel&gt;
    &lt;Nombre&gt;NN001&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal2&quot;
    msdata:rowOrder=&quot;1&quot;&gt;
    &lt;CodigoUsuario&gt;2&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Dr.&lt;/Condicion&gt;
    &lt;Nivel&gt;1&lt;/Nivel&gt;
    &lt;Nombre&gt;NN002&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;****&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal3&quot;
    msdata:rowOrder=&quot;2&quot;&gt;
    &lt;CodigoUsuario&gt;3&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Pac.&lt;/Condicion&gt;
    &lt;Nivel&gt;3&lt;/Nivel&gt;
    &lt;Nombre&gt;NN003&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal4&quot;
    msdata:rowOrder=&quot;3&quot;&gt;
    &lt;CodigoUsuario&gt;4&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Pac.&lt;/Condicion&gt;
    &lt;Nivel&gt;3&lt;/Nivel&gt;
    &lt;Nombre&gt;NN004&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;tblTemporal
    diffgr:id=&quot;tblTemporal5&quot;
    msdata:rowOrder=&quot;4&quot;&gt;
    &lt;CodigoUsuario&gt;8&lt;/CodigoUsuario&gt;
    &lt;Condicion&gt;Pac.&lt;/Condicion&gt;
    &lt;Nivel&gt;3&lt;/Nivel&gt;
    &lt;Nombre&gt;NN005&lt;/Nombre&gt;
    &lt;Usuario&gt;***&lt;/Usuario&gt;
    &lt;Clave&gt;***&lt;/Clave&gt;
    &lt;CodigoServicio&gt;1&lt;/CodigoServicio&gt;
    &lt;NroDocumento&gt;***&lt;/NroDocumento&gt;
    &lt;/tblTemporal&gt;
    &lt;/NewDataSet&gt;
    &lt;/diffgr:diffgram&gt;
    &lt;/OBTENERUSUARIOResult&gt;
    &lt;/OBTENERUSUARIOResponse&gt;
    FLEX 2 Code:
    public function resultHandler(event:ResultEvent):void {
    if (event.result.diffgram == &quot;&quot;)
    ////nothing
    else
    lblNombre.text =
    event.result.diffgram.NewDataset.tblTemporal[1].Nombre;
    If I use lblNombre.text =
    event.result.diffgram.NewDataset.tblTemporal.Nombre; returns an
    empty string and if I use lblNombre.text =
    event.result.diffgram.NewDataset.tblTemporal[1].Nombre; the code
    stops there and nothing happens.
    Can you tell me if this code is correct?
    I made the WebService with Visual Basic 2005 and returns a
    DataTable Variable not a DataSet.

    hi,
    sorry for a poorly framed question.
    this is what i m trying to do.
    i call google with a header generated.
    now i want to read back the content in the google search result page onto my jsp page.
    possible?
    first.jsp calls google. i m using redirect (url)
    the url is modified based on user input
    now i want the links in the google page to be put up in my page itself. so i want to read the links there...
    Message was edited by:
    on_track

  • How can i use one datatable inside the other?

    Hi all,
    i need help ... i have this page that shows information from a relational table... for example a mapped table "Countries" that has a java.util.Set inside named "Cities" and i would like 2 know how can i do this using jsf...
    The display would be like this:
    Brasil
    Rio de Janeiro
    Sao Paulo
    USA
    New York
    Washington
    New Orleans
    And Goes on... So i guess it would be a dataTable inside the other, right? but i dunno how to do it...
    Thanks for any info. cya

    this is somehow a messy example. But just focus on the var attribute of outer datatable and how value attribute of inner datatable is referencing it.
    <h:dataTable id="table1" value="#{pc_City_state.listofstates.states}" var="varstates" styleClass="dataTable">
                   <h:column id="column1">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="StateName" id="text2"></h:outputText>
                        </f:facet>
                        <h:outputText id="text3" value="#{varstates.stateName}" styleClass="outputText">
                        </h:outputText>
                   </h:column>
                   <h:column id="column3">
    <f:facet name="header">
    </f:facet>
              <h:dataTable id="table2" value="#{varstates.cities}" var="varcities" styleClass="dataTable">
                                       <f:facet name="footer">
                                       </f:facet>
                                       <h:column id="column4">
              <f:facet name="header">
              <h:outputText styleClass="outputText" value="CityName" id="text6"></h:outputText>
              </f:facet>
              <h:outputText id="text7" value="#{varcities.cityName}" styleClass="outputText">
              </h:outputText></h:column>
              </h:dataTable>
    </h:column>
    </h:dataTable>

  • I can't view dataTable in JSF

    Hi, anyone who can help me with java server faces, i want to put data from a resultset to dataTable, i made everithing but my table is not visible.
    My code is:
    <?xml version='1.0' encoding='windows-1252'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">
    <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
    doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
    <jsp:directive.page contentType="text/html;charset=windows-1252"/>
    <f:view>
    <html>
    <head>
    <meta http-equiv="Content-Type"
    content="text/html; charset=windows-1252"/>
    <title>Consultas</title>
    </head>
    <body><h:form binding="#{backing_Consultas.form1}" id="form1">
    <h:commandButton value="commandButton1"
    binding="#{backing_Consultas.commandButton1}"
    id="commandButton1"
    action="#{backing_Consultas.commandButton1_action}"/>
    </p>
    <p>
    <h:dataTable border="1" var="#{backing_Consultas.dataTable1}"
    id="dataTable1">
    <h:column binding="#{backing_Consultas.column1}"/>
    <h:column binding="#{backing_Consultas.column2}"/>
    <h:column binding="#{backing_Consultas.column3}"/>
    <h:column binding="#{backing_Consultas.column4}"/>
    </h:dataTable>
    </h:form></body>
    </html>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:backing_Consultas-->
    </jsp:root>
    This es a JSPX page.
    Please any idea
    thanks
    alex

    Try to disable the hardware acceleration in the Flash Player.
    See [[Cannot view full screen Flash videos]]
    Flash "Display settings" window:
    * http://www.macromedia.com/support/documentation/en/flashplayer/help/help01.html

Maybe you are looking for

  • How can I set iTunes to play one song only.

    i Want to play one song.  And select the next to be played

  • Simple jsp not running

    404 Not Found JSP Error: Request URI:/j2ee/oRAA/Demo.jsp Exception: OracleJSP:java.io.FileNotFoundException: D:\Oracle\OC4J10.1.3\j2ee\home\default-web-app\oRAA\Demo.jsp (The system cannot find the path specified) I am getting this error while runnin

  • "Installation is forbidden by system policy -  Error: 1625" when installing Adobe Products.

    Hi All, We run Windows 7 Ent 64 bit OS in our company and recently we have started getting the following error "Installation is forbidden by system policy -  Error: 1625" when installing Adobe Products even though i am logged in as an Administrator.

  • Frame (no) resize not broser consistent - help.

    I've got a simple left frame/right frame setup. I have my navigation frame set for no resizing and it works great in Safari, but no other browser. If I resize the window, the main content area pushes over the navigation frame. In Safari, it works per

  • How to run a form built in 10g by a browser remotely?

    Hi All, I've built a form by developer 10g at the server, I want to run it by a browser remotely. How? I did it before but I've forgot it! I think using URL like this: http://<server_host_name>/forms/form_name.fmx