Skip to Content
Jul 31, 2012 at 04:29 AM

TableView rowselection & Group visibility in HTMLB



I am using TableView and Group UI in my JSPDynpage.

Requirement is when user selects a row in Table, details of the selected row are displayed in group below.

I have created tablemodel and following is what I did so far: -

Also, in Dynpage, I have written event handler for rowselectionEvent.


<% if(myTktsTbl != null && myTktsTbl.getModel()!= null && myTktsTbl.getModel().getRowCount()>0){%>

<hbj:tableView id="ticketsTable"

model= "myTktsTbl.model"

design = "ALTERNATING"

headerVisible = "true"

footerVisible = "true"

fillUpEmptyRows = "false"

selectionMode = "SINGLESELECT"

headerText = "My Tickets"

visibleRowCount = "10"

width = "100%" >



ticketsTable.setUserTypeCellRenderer(new TableViewCellRenderer());

ticketsTable.setHeaderCellRenderer(new CustomHeaderCellRenderer());




<% if(ticketDetailsBean != null){%>

<hbj:group id="ticketDetailsGroup" design="SAPCOLOR" title="<%=selTktNum %>" tooltip="<%=selTktNum %>" width="100%">


<hbj:gridLayout id="myGridLayout" width="100%" debugMode="False">

<hbj:gridLayoutCell rowIndex="1" columnIndex="1" horizontalAlignment="LEFT">
<hbj:label id="label_TicketNumber" encode = "false" text="<b>Ticket Number</b>" design="LABEL" labelFor="txv_TicketNumber"/>
<hbj:gridLayoutCell rowIndex="2" columnIndex="1" horizontalAlignment="LEFT" colSpan="100">
<hbj:textEdit id="txe_Description" rows="5" cols="100" wrapping="SOFT" text="<%=ticketDetailsBean.getDescription()%>" />



<% } //End of IF for Details Group

} //End of IF for Ticket Table



Now, this works fine except few issues: -

1. When I click on a table row, it doesnt show that row as "selected". That is, the radio button for that row doesnt appear 'selected'.

2. When iView loads & I haven't yet selected any row in table, the group UI appears. It should be visible only when user selects a row in table.

3. In Group, I am using TextEdit UI element which I want to use to display a paragraph in read-only mode. When I set 'enabled="false" ' attribute of TextEdit, I get jsp compilation exception saying attribute 'enabled' is not defined for textEdit.

Please help.

Thanks & Regards,