Skip to Content
avatar image
Former Member

TableView onNavigate error

Hi,

I get a runtime error when using the OnNavigate event of TableView control. My code is almost exactly the same as in the samples provided in the HTMLB documentation.. Can anyone tell me what I'm missing here? I'm doing this in EP6 PDK. Other event handling code in the program is OK except for this...

Thanks

-


In the JSP...

<hbj:tableView

id="myTableView1"

model="myTableViewBean.model"

design="ALTERNATING"

headerVisible="true"

footerVisible="true"

fillUpEmptyRows="true"

navigationMode="BYLINE"

selectionMode="NONE"

headerText="Details"

onNavigate="onNavigate"

visibleFirstRow="<%= myTableViewBean.getVisibleRow() %>"

visibleRowCount="5"

rowCount="20"

width="500 px"

/>

-


In the main java (JSPDynPage)

public void onNavigate(Event event) throws PageException {

if (event instanceof TableNavigationEvent) {

TableNavigationEvent tne = (TableNavigationEvent) vent;

if (tne != null) {

this.visibleRow = tne.getFirstVisibleRowAfter();

if (beanData != null) {

beanData.setVisibleRow(new Integer(this.visibleRow).toString());

}

}

}

}

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 05, 2004 at 01:38 PM

    Hi,

    I have had problems with this as well. I'm not convinced the PDK5 examples actually work! Are you sure your bean object is not null?

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 06, 2004 at 04:09 PM

    Try removing the rowCount attribute from your JSP. I think I had a problem with that attribute.

    Brian Daws

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 06, 2004 at 10:38 PM

    Hi,

    I managed to solve this problem. Apparently, one of the beans I'm using is not properly initialized thus causing the error. Tahir, thanks for the insight.

    Add comment
    10|10000 characters needed characters exceeded