cancel
Showing results for 
Search instead for 
Did you mean: 

TableView rowselection & Group visibility in HTMLB

Amey-Mogare
Contributor
0 Kudos

Hello,

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.setOnRowSelection("rowSelectEvent");

      ticketsTable.setUserTypeCellRenderer(new TableViewCellRenderer());          

      ticketsTable.setHeaderCellRenderer(new CustomHeaderCellRenderer());

     %>

      </hbj:tableView>

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

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

    <hbj:groupBody>

     <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>
      <hbj:gridLayoutCell rowIndex="2" columnIndex="1" horizontalAlignment="LEFT" colSpan="100">
       <hbj:textEdit id="txe_Description" rows="5" cols="100" wrapping="SOFT"  text="<%=ticketDetailsBean.getDescription()%>"  />
      </hbj:gridLayoutCell>

     </hbj:gridLayout>

     </hbj:groupBody>
    </hbj:group>

   <%  } //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,

Amey

Accepted Solutions (0)

Answers (1)

Answers (1)

saar_dagan
Employee
Employee
0 Kudos

Hi Amey,

for read only paragraph I would use TextView and not Text Edit.

Group UI doesn't have visibility flag but if only the header are shown before you select an item you can choose group.setHeaderVisible to false.

hope this helped a little.

Best Regards,

Saar