Skip to Content
0
Oct 12, 2006 at 07:22 AM

JSPDynPage TableView Button in row

27 Views

Hello folks,

I'm having some problems with adding a button to the row of a table whilst programming a JSPDynPage app.

Relevant JSP code

         <hbj:tableView id="resultTable"
                        model="theBean.ResultModel"
                        design="alternating"
                        headerVisible="false"
                        footerVisible="true"
                        fillUpEmptyRows="false"
                        navigationMode="bypage"
                        selectionMode="none"
                        onNavigate="NavigateResultTable"
                        visibleFirstRow="<%=theBean.getFirstVisibleRow()%>"
                        visibleRowCount="8"/>

Relevant Java code

Button reg = new Button("But"+room.getId());
reg.setText("Register");
reg.setOnClick("RegisterUser");
currentRow.addElement(reg);

model.getColumn("Registration").setType(TableColumnType.BUTTON);

The problems are

i) Button text is not what I've set but the button object ID, com.sap.portals.htmlb.Button@xxxxxxx

ii) The event is not being raised onClick.

Any help greatly appreciated, thanks...

Patrick.