Skip to Content
author's profile photo
Former Member

JSP tag syntax : TableView.setStyleForCell

According to the PDK6 documentation you can specify the background colour of an individual cell/row with the following, however it produces only an error.

Syntax:

setStyleForCell

(int rowIndex, int colIndex

TableCellStyle.NEGATIVE)

Code:

<hbj:tableView id="SearchListTable"

model= "MyJCoBean.searchListModel"

design = "ALTERNATING"

headerVisible = "TRUE"

footerVisible = "TRUE"

fillUpEmptyRows = "TRUE"

selectionMode = "SINGLESELECT"

navigationMode = "BYPAGE"

visibleRowCount = "15"

width = "795"

headerText = "Partner Search Results"

visibleFirstRow = "<%=MyJCoBean.getVisibleFirstRow() %>"

onNavigate="myOnNavigate">

<% SearchListTable.selectRow(MyJCoBean.getSelectedRow(),false);

SearchListTable.setOnRowSelection("myOnRowSelection");

SearchListTable.setStyleForCell(2, 2 TableCellStyle.NEGATIVE) ;

%>

</hbj:tableView>

Error Message:

Caused by: com.sapportals.portal.prt.component.PortalComponentException: PortalComponentException

Component : null

Component class : null

Caused by: com.sapportals.portal.prt.servlets_jsp.server.compiler.CompilingException: C:/usr/sap/EPSB/j2ee/j2ee_00/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/WEB-INF/portal/portalapps/com.sappi.crm.customerinfo9/work/pagelet/_sapportalsjsp_CustomerInfoSearch.java:224: ')' expected SearchListTable.setStyleForCell(2, 2

TableCellStyle.NEGATIVE) ;

^

C:/usr/sap/EPSB/j2ee/j2ee_00/cluster/server/services/servlet_jsp/work/jspTemp/irj/root/WEB-INF/portal/portalapps/com.sappi.crm.customerinfo9/work/pagelet/_sapportalsjsp_CustomerInfoSearch.java:224: setStyleForCell(int,int,com.sapportals.htmlb.enum.TableCellStyle) in com.sapportals.htmlb.table.TableView cannot be applied to (int,int)

SearchListTable.setStyleForCell(2, 2

TableCellStyle.NEGATIVE) ;

2 errors

Comments appreciated.

Thanks,

Fraser

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    May 24, 2004 at 02:11 PM

    You are missing a comma

    SearchListTable.setStyleForCell(2, 2 TableCellStyle.NEGATIVE) ;

    Should be

    SearchListTable.setStyleForCell(2, 2,TableCellStyle.NEGATIVE) ;

    Add comment
    10|10000 characters needed characters exceeded