TableView as ValueHelp in HTMLB.

Hi all.
I'm quite new to HTMLB and I was wondering if it was possible to use a TableView as ValueHelp to an InputField? The TableView should be shown as the DateNavigator is shown.
Regards,
Jacob

Hi Praveen,
I would like to show a list of country names, country ISO codes and country regions in a tableview. When showing the tableview I also want to give the user the possibility to search for countries and their ISO codes. The user should be able to select multiple values. The selected values returned to the InputField is a comma-separeted list of ISO codes.
What I've done so far is show the tableview in a separate popup dialog, but I think the way DateNavigator is shown is more elegant.
I think what I actually need is a way to show a Document - instead of a HoverMenu - in a PopupTrigger kind-a-way.
Regards,
Jacob
Message was edited by: Jacob Frank Vandborg

Similar Messages

  • Tableview getting refreshed when changing data in the rows

    Hi Gurus,
    Iu2019m doing a BSP with MVC. The requirement is as below.
    In the main page there is a button u2018Create Orderu2019, to create a sales order, once I click this button, another screen (pop up) comes up and within that I have a Tableview display with the below fields with the data of 20 records.
    Material no
    Quantity
    Delivery Date
    Here user is allowed to choose the quantity and delivery date by selecting each row.(with MULTISELECT option in BSP)
    The issue is after I select first row and change the quantity and date, and if I click on second row, the Tableview gets refreshed to enable the second row to be editable and the changes what I did on the first row are also refreshed.
    So i want the Tableview not to be refreshed when selecting the multiple rows. So that I can keep the changes I make to the quantity and date fields Can you please suggest any method.
    Cheers,
    Srini.

    Hi Srinivas,
    You need to capture the value entered by user in Quantity and date field and update the internal table with these values for the current selected row.
    For ex.
    The tableView code is like:
                          <htmlb:tableView id                  = "material"
                                     headerText          = "<%= otr(Z_SUS/HEADER_TEXT_MATERIALS) %>"
                                     headerVisible       = "true"
                                     design              = "alternating"
                                     onRowSelection      = "MyEventRowSelection"
                                     selectionMode       = "MULTILINEEDIT"
                                     width               = "880"
                                     filter              = "SERVER"
                                     emptyTableText      = "<%= otr(Z_SUS/EMPTYTABLE_MATERIALS) %>"
                                     iterator            = "<%= iterator %>"
                                     table               = "<%= gt_materials %>" />
    In eventhandler OnInputProcessing :
    DATA: lt_fields type tihttpnvp ,
               ls_fields like line of lt_fields.
    call method request->get_form_fields
                changing
                  fields = lt_fields
    Now the internal table lt_fields contains all the editable cell values , just update the internal table of your tableview with these values.
    You can try these threads
    [Thread-I.|Re: Retrieve changes made in tableView]
    [Thread-II|https://forums.sdn.sap.com/click.jspa?searchID=24460585&messageID=5516977]
    Search the forum for more information on this.
    Regards,
    Anubhav

  • How to read vales from dropdownlistbox placed in tableView Cells

    Hi,
      Thanks for reply.. I got problem of reading values from Dropdownlist box placed in tableView Cells. Please correct me or give some sample to read vales from dropdownlistbox placed in tableView Cells.
    TableView column defined as
            <htmlb:tableViewColumn columnName = "OT_REASON_CODE"
                                   title      = "OT Reason"
                                   type       = "User"
                                   width = "6"
                                   edit       = "true" >
              <htmlb:dropdownListBox id                = "rcode"
                                     table             = "<%= I_YH008 %>"
                                     nameOfKeyColumn   = "OT_REASON_CODE"
                                     nameOfValueColumn = "OT_REASON_DESC" />
            </htmlb:tableViewColumn>
    OnInput processing I am trying to read dorpdown list values selected.
              W_YH022-ENDUZ = TABLE_EVENT->GET_CELL_VALUE(
              ROW_INDEX = SY-TABIX
              COLUMN_INDEX = 3 ).  " Get time
    DATA: data TYPE REF TO CL_HTMLB_DROPDOWNLISTBOX.
    DATA: value type string.
         value = TABLE_EVENT->GET_CELL_ID( row_index    = SY-TABIX
                                      column_index = '7').  " get Cell ID
    data ?= CL_HTMLB_MANAGER=>GET_DATA(
                                     request = runtime->server->request
                                     name    = 'dropdownlistbox'
                                     id      = value
    IF data IS NOT INITIAL.
    W_YH022-OT_REASON_CODE = data->selection. " +Cell Values...I am not getting cell values here+
    endif.

    Hi:
    Do like this
    Layout
          <htmlb:dropdownListBox id="mydropdownlist" >
            <htmlb:listBoxItem key   = "bpno"
                               value = "Business Partner Details" />
            <htmlb:listBoxItem key   = "bpaddress"
                               value = "Business Partner Address" />
          </htmlb:dropdownListBox>
    OnInpurProcessing event - >
    DATA: lcl_dropdown TYPE REF TO cl_htmlb_dropdownlistbox.
    data : selection2 type string.
    lcl_dropdown ?= cl_htmlb_manager=>get_data(
        request = runtime->server->request
        name    = 'dropdownListBox'
        id      = 'mydropdownlist' ).   
    IF NOT lcl_dropdown->selection IS INITIAL.
      selection2 = lcl_dropdown->selection.
    ENDIF.
    Regards
    Shshi

  • Problem with iterator in tableview

    Hi, Im having a problem with an iterator in a tableview. Sometime ago I use an iterator in a BSP with flow logic, I created the class fill the methods GET_COLUMN_DEFINITIONS and RENDER_CELL_START. And worked fine.
    Now, Im working in another BSP and this time I wanted to use MVC, so I have been reading but cant figure it out what Im missing out.
    In the controller of my page I add the Interface IF_HTMLB_TABLEVIEW_ITERATOR
    I ridefine the methods GET_COLUMN_DEFINITIONS and RENDER_CELL_START (I think that you dont have to redifine GET_COLUMN_DEFINITIONS but did it anyway just in case).
    This is my RENDER_CELL_START
      IF NOT ( p_column_key = 'ICON' ).
        RETURN.
      ENDIF.
      FIELD-SYMBOLS: <row> TYPE ANY, <col> TYPE ANY.
      DATA: ti_results TYPE ZBSPREP_VEND_T,
                 wa_results TYPE ZBSPREP_VEND.
      ASSIGN p_row_data_ref->* TO <row>.
      ASSIGN COMPONENT p_column_key OF STRUCTURE <row> TO <col>.
      wa_results = <col>.
      DATA: html_bee TYPE REF TO CL_BSP_BEE_HTML.
      CREATE OBJECT html_bee.
      LOOP AT it_results INTO wa_results.
        icon = CL_BSP_MIMES=>SAP_ICON( id = 'ICON_GREEN_LIGHT' ).
      ENDLOOP.
      p_replacement_bee = CL_HTMLB_IMAGE=>FACTORY( id = p_cell_id src = icon ).
    In my table view the column ICON doesnt show anything and the rare part is if I put breakpoint in the method and execute the page doesnt stop.
    So I dont know if Im missing something.
    My tableview layout is this:
    <htmlb:tableView id             = "Monitor"
                                     selectionMode  = "SINGLESELECT"
                                     onRowSelection = "rowSelection"
                                     table          = "<%= it_results %>"
                                     iterator        = "<%= iterator  %>"
                                     design         = "ALTERNATING"
                                     filter         = "SERVER"
                                     sort           = "SERVER"
                                     headerVisible  = "FALSE"
                                     footerVisible  = "FALSE">
    I declare a attribute iterator TYPE IF_HTMLB_TABLEVIEW_ITERATOR.
    Someone could give a hand ?

    Solved, I forget to set the attribute of the view in the REQUEST Method.
    result_view->set_attribute( name = 'iterator' value = me ).

  • Image Column in Tableview

    Hi all,
    here's the thing: I'm trying to add an image column to a tableview but it doesn't work (there's no error, but the image doesn't appear). I've tried it with an iterator.
    Page Layout:
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design           = "design2003"
                   controlRendering = "SAP" >
      <htmlb:document>
        <htmlb:documentHead>
        </htmlb:documentHead>
        <htmlb:documentBody>
          <htmlb:form>
            <htmlb:tableView id            = "tableview_scarr"
                             table         = "<%= pa_tab_scarr %>"
                             headerText    = "Table SCARR"
                             headerVisible = "TRUE"
                             iterator      = "<%= application %>" >
            </htmlb:tableView>
            <%
      IF page->messages->num_messages( ) > 0.
            %>
            Error
            <%
      ENDIF.
            %>
          </htmlb:form>
        </htmlb:documentBody>
      </htmlb:document>
    </htmlb:content>
    OnInitialization:
    SELECT * FROM scarr INTO TABLE pa_tab_scarr.
    My application class is my iterator. It implements GET_COLUMN_DEFINITIONS:
    METHOD if_htmlb_tableview_iterator~get_column_definitions.
      DATA tv_column TYPE tableviewcontrol.
      tv_column-columnname          = 'SHOW_ICON'.
      tv_column-title               = 'SHOW_ICON'.
      tv_column-encode = 'X'.
      tv_column-width               = '100'.
      APPEND tv_column TO p_column_definitions.
      CLEAR tv_column.
      tv_column-columnname          = 'CARRID'.
      tv_column-width               = '100'.
      APPEND tv_column TO p_column_definitions.
    ENDMETHOD.
    ...and it implements RENDER_CELL_START:
    METHOD if_htmlb_tableview_iterator~render_cell_start.
      CASE p_column_key.
        WHEN 'SHOW_ICON'.
          DATA col_image TYPE REF TO cl_htmlb_image.
          CREATE OBJECT col_image.
          col_image->src = "@2N@".
          col_image->width = '16'.
          col_image->height = '14'.
          p_replacement_bee = col_image.
      ENDCASE.
    ENDMETHOD.
    I've checked the SICF, but all services concerning icons are activated. This is my first Iterator so i'm not sure if i've forgotten something. Why the image is not shown?
    Regards
    Mark-André

    Hi Mark,
    First of all, define an object named iterator in page attributes type ref to iterator_class_name
    i.e
    iterator TYPE REF TO ZCL_ITERATOR(or iterator_class_name)
    Then in <b>onInitialization</b> use
    create object iterator.
    Also you can use any name of the iterator object...but the name application is reserved for the application class....
    So your tableView code will be
            <htmlb:tableView id            = "tableview_scarr"
                             table         = "<%= pa_tab_scarr %>"
                             headerText    = "Table SCARR"
                             headerVisible = "TRUE"
                             iterator      = "<%= iterator %>" >
    Rest all is fine...!!
    Hope this helps.
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • Java script error  when click on the  Tableview  in the BSp screen

    Hi All,
              I am getting a javascript error saying
    Line : 7770
    Char :5
    Error : 'rows' is null  or not an object
    Code : 0
    URL : http://saperpdev01............
    I checked the source code on the BSP displayed page. It don't has that line 7770 specified in the error.
    My Layout code is :
    <%@page language="abap"%>
    <%@extension name="htmlb" prefix="htmlb"%>
    <htmlb:content design="design2003">
      <htmlb:page title = "Open Work Screen with Pre Approval and Rejected Invoices ">
        <htmlb:form id = "openwork" method = "post" >
    <%
      data: l_num_msgs  type i,
      l_condition type string,
      l_message   type string,
      l_severity  type i.
    %>
        <img align="left" src="hl_invoicing.gif"/>
          <BR>
          <p align="left">      </p>
          <p align="left">      Complete the form below to create and submit a vehicle repair invoice to Schwans Home Service.</p>
          <p align="left">      See
          <htmlb:link id            = "paymenttermslink"
                      text          = "Payment Terms"
                      onClientClick = "return parent.EPCM.doNavigate ('ROLES://portal_content/com.schwans.tsfc.The_Schwans_Food_Company/HS/iView_folder/External_Content/KM_iViews/Fleet_Payment_Terms', 1);"
                           />
          for payment details.</p>
          <%
              l_num_msgs = page->messages->num_messages( ).
              do l_num_msgs times.
              clear : l_message, l_condition, l_severity.
              call method page->messages->Get_message
              exporting index     = sy-index
              importing condition = l_condition
              message   = l_message
              severity  = l_severity.
              if l_condition eq 'error'.
          %>
          <h3 align="left"> <font size=2 color="Red"><b>      <%= l_message %></b></font></h3>
          <%
              elseif l_condition eq 'warning'.
          %>
          <h3 align="left"> <font size=2 color="orange"><b>      <%= l_message %></b></font></h3>
          <%
              endif.
              enddo.
          %>
          <htmlb:group id     = "groupone"
                       design = "sapcolor" >
         <htmlb:groupHeader>
            <table width="100%" border="0" cellpadding="5" cellspacing="1" >
                <tr>
                    <td align="left" width="100%">
                      <!--<b> Invoicing </b> -->
                      <htmlb:textView id      = "tv1"
                                      text    = "Select a  Work Order Number"
                                      design  = "HEADER1" / >
                    </td>
                </tr>
            </table>
        </htmlb:groupHeader>
        <htmlb:groupBody>
        <table width="100%" border="0" cellpadding="5" cellspacing="1" >
                <tr>
                    <td align="left" width="100%">
                      <!--<b> Invoicing </b> -->
                      <htmlb:textView id      = "tv2"
                                      text    = "Pre-approved work"
                                      design  = "HEADER2" / >
                    </td>
                </tr>
            </table>
        <table width = "100%">
          <tr>
          <td>
          <htmlb:tableView id               = "openwork"
                           table            = "<%= INVOICE->AT_OPENWORK %>"
                           design           = "STANDARD"
                           width            = "100%"
                           selectionMode    = "SINGLESELECT"
                           selectedRowIndex = "<%= INVOICE->A_OPENWORKSELECTION %>"
                           visibleRowCount  = "10"
                           footerVisible    = "TRUE"
                           emptyTableText   = "No Open Work Exists"
                           keyColumn        = "OPENWORKNO"
                           onRowSelection   = "openworktable" >
            <htmlb:tableViewColumns>
              <table width = "100%">
              <tr>
              <td >
              <htmlb:tableViewColumn columnName = "OPENWORKNO"
                                     title      = "Reference Number"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "DOC_TYPE_TEXT"
                                     title      = "Document Type"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "CREATEDDATE"
                                     title      = "Created On"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "FLEETNO"
                                     title      = "Fleet Number"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "VMRS_TEXT"
                                     title      = "VMRS Code"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              </tr>
              </table>
            </htmlb:tableViewColumns>
          </htmlb:tableView>
          </td>
          </tr>
          </table>
        </htmlb:groupBody>
        </htmlb:group>
        <htmlb:group id     = "grouptwo"
                       design = "sapcolor" >
         <htmlb:groupHeader>
         </htmlb:groupHeader>
        <htmlb:groupBody>
             <table width="100%" border="0" cellpadding="0" cellspacing="0" >
                <tr>
                    <td align="left" width="100%">
                      <!--<b> Invoicing </b> -->
                      <htmlb:textView id      = "tv3"
                                      text    = "Rejected Invoices"
                                      design  = "HEADER2" / >
                    </td>
                </tr>
            </table>
          <table width = "100%">
          <tr>
          <td>
          <htmlb:tableView id               = "rejectedinvoice"
                           table            = "<%= INVOICE->AT_REJECTED_INVOICES %>"
                           design           = "STANDARD"
                           width            = "100%"
                           selectionMode    = "SINGLESELECT"
                           selectedRowIndex = "<%= INVOICE->A_REJECTEDINVOICESELECTION %>"
                           visibleRowCount  = "10"
                           footerVisible    = "TRUE"
                           emptyTableText   = "No Rejected invoices Exists"
                           keyColumn        = "INVOICENO"
                           onRowSelection   = "rejectedinvoicetable" >
            <htmlb:tableViewColumns>
              <table width = "100%">
              <tr>
              <td >
              <htmlb:tableViewColumn columnName         = "VENDOR_INVOICE_NUMBER"
                                     title              = "Reference Number"
                                     width      = "30%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "CREATEDDATE"
                                     title      = "Invoice Date"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "FLEETNO"
                                     title      = "Fleet Number"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "REJECTION_REASON"
                                     title      = "Reason for Rejection"
                                     width      = "30%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              </tr>
              </table>
            </htmlb:tableViewColumns>
          </htmlb:tableView>
          </td>
          </tr>
          </table>
      </htmlb:groupBody>
    </htmlb:group>
    <htmlb:textView id     = "tv1"
                    text   = "Select a Reference Number from the table above and click the Select button - or - Click the Create New button to create a new invoice."
                    design = "LABEL" />
         <table width="100%" border="0" cellspacing="1"  align="center" >
           <tr>
           <td  align="center" nowrap="TRUE">          
             <htmlb:button    id            = "selectbtn"
                              text          = "SELECT"
                              onClick       = "btnselect" />
             <htmlb:button    id            = "createnewbtn"
                              text          = "Create New"
                              onClick       = "btncreatenew" />
             </td>
           </tr>
          </table>
        </htmlb:form>
        <%@include file="footer.htm" %>
      </htmlb:page>
    </htmlb:content>
    What may be wrong????
    If I click anywhere on the table view it's giving a javascript error. If I try to select a row from the table also it's giving error for one or two times and on the third time i am able to select the table content and can able to navigate to the next page.
    Thanks for your help in advance.
    Thanks,
    Greetson

    Hi Raja,
         please kindly recheck the code if mine i have two tables ..... one for heading and another one for Body.
    it looks correct to me.
    <table width = "100%">
    >     <tr>
    >     <td>
          <htmlb:tableView id               = "rejectedinvoice"
                           table            = "<%= INVOICE->AT_REJECTED_INVOICES %>"
                           design           = "STANDARD"
                           width            = "100%"
                           selectionMode    = "SINGLESELECT"
                           selectedRowIndex = "<%= INVOICE->A_REJECTEDINVOICESELECTION %>"
                           visibleRowCount  = "10"
                           footerVisible    = "TRUE"
                           emptyTableText   = "No Rejected invoices Exists"
                           keyColumn        = "INVOICENO"
                           onRowSelection   = "rejectedinvoicetable" >
            <htmlb:tableViewColumns>
              <table width = "100%">
              <tr>
              <td >
              <htmlb:tableViewColumn columnName         = "VENDOR_INVOICE_NUMBER"
                                     title              = "Reference Number"
                                     width      = "30%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "CREATEDDATE"
                                     title      = "Invoice Date"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "FLEETNO"
                                     title      = "Fleet Number"
                                     width      = "20%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              <td >
              <htmlb:tableViewColumn columnName = "REJECTION_REASON"
                                     title      = "Reason for Rejection"
                                     width      = "30%"
                                     horizontalAlignment = "LEFT" >
              </htmlb:tableViewColumn>
              </td>
              </tr>
              </table>
            </htmlb:tableViewColumns>
          </htmlb:tableView>
    >     </td>
    >    </tr>
          </table>

  • How to put custom check box in a tableview column

    Hi,
    I would like to put a custom checkbox in a tableview column for each row of the table.
    Such that when the user selects the rows and among those rows if for fews rows this checkbox is active, i need to do some special processing. how can i add a custom check box to a tableview column.
    Can anyone help me in this regard?
    Thanks and Regards,
    Kumar

    Hi,
    You can use the checkbox code within your tableview column:
    <htmlb:tableView id = ".."
    >
    <htmlb:tableViewColumn id = " "
    type = "USER"
    >
    <htmlb:checkBox id = ".."
    selected = " "
    />
    </htmlb:tableViewColumn>
    </htmlb:tableView>
    I hope it helps.
    regards,
    Rohit

  • JSP TableView Sorting Problem

    I have been trying to get a tableview to be sortable by clicking on the header of columns.  I have been reviewing existing threads on the forum in particular the one below.
    https://forums.sdn.sap.com/thread.jspa?threadID=16417
    I seem to understand the concept but for some reason my table does not sort, it just does nothing.  Could someone take a look and see if you can find any problems - I can't wait to give points.
    Here is all my code.
    Here is the Java....
    package MSSPackage;
    import MSSBeanPackage.PositionOverviewBean;
    import MSSPackage.SortTableModel;
    import com.sapportals.htmlb.page.DynPage;
    import com.sapportals.htmlb.page.PageException;
    import com.sapportals.portal.htmlb.page.JSPDynPage;
    import com.sapportals.portal.htmlb.page.PageProcessorComponent;
    import com.sapportals.portal.prt.component.IPortalComponentContext;
    import com.sapportals.portal.prt.component.IPortalComponentProfile;
    import com.sapportals.portal.prt.component.IPortalComponentRequest;
    import com.sapportals.portal.prt.component.IPortalComponentSession;
    import com.sapportals.htmlb.event.*;
    import com.sapportals.htmlb.*;
    import com.sapportals.htmlb.table.*;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    import javax.servlet.http.*;
    // SAP RFC Imports
    import com.sap.mw.jco.IFunctionTemplate;
    import com.sap.mw.jco.JCO;
    import com.sapportals.portal.prt.service.jco.IJCOClientPoolEntry;
    import com.sapportals.portal.prt.service.jco.IJCOClientService;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    import java.util.*;
    public class PositionOverview extends PageProcessorComponent {
      public DynPage getPage(){
         return new PositionOverviewDynPage();
      public static class PositionOverviewDynPage extends JSPDynPage{
         JCO.Repository mRepository;
         public JCO.Table tblRelations;
         public JCO.Table tblPositions;     
         public SortTableModel tableModel;
         public int visibleRow = 1;     
         private boolean OrgUnitSelected = false;
         public void doInitialization(){
              IPortalComponentSession oSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
              PositionOverviewBean oBean = new PositionOverviewBean();
              // Table Start row
              oBean.setvisibleRow(new Integer(this.visibleRow).toString());          
              oSession.putValue("myBean", oBean);
              // Define request, context and profile containers         
              IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
              IPortalComponentContext myContext = request.getComponentContext();
              IPortalComponentProfile myProfile = myContext.getProfile();
              // Define bean reference to bean
              PositionOverviewBean myBean = new PositionOverviewBean();
              // Table Start row
              myBean.setvisibleRow(new Integer(this.visibleRow).toString());
              // Place bean in user profile.          
              myProfile.putValue("myBean", myBean);
         public void doProcessAfterInput() throws PageException {
         public void doProcessBeforeOutput() throws PageException {
              String NavType = "RCORGUNIT";
              String OType = "O";
              //String OBjid = "10004399";
              String OBjid = "";
              String sapSystem = "SAP_R3_HumanResources";          
              IPortalComponentSession oSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
              PositionOverviewBean myBean = (PositionOverviewBean) oSession.getValue("myBean");
              // Define request, context and profile containers         
              IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
    /*          IPortalComponentContext myContext = request.getComponentContext();
              IPortalComponentProfile myProfile = myContext.getProfile();
              //HttpSession session = request.getServletRequest().getSession();          //dmm
              //Get Bean from Profile
              PositionOverviewBean myBean = (PositionOverviewBean) myProfile.getValue("myBean");
              //PositionOverviewBean myDataBean = (PositionOverviewBean) session.getValue("POviewBean");               //dmm
              String ddlbSelection = "";
              String ddlbValue = "";
              DropdownListBox ddlbOrgUnits = (DropdownListBox) getComponentByName("ddlbOrgUnits");
              if (ddlbOrgUnits != null)
                   ddlbSelection = ddlbOrgUnits.getSelection();
                   ddlbValue = ddlbOrgUnits.getValueAsDataType().getValueAsString();
                   OBjid = ddlbValue;
                   myBean.setObjId(OBjid);
              else
                   OBjid = "";
                   myBean.setObjId(OBjid);                 
              IJCOClientService clientService;
              IJCOClientPoolEntry poolEntry;          
              JCO.Client client;          
              try
                   clientService = (IJCOClientService) PortalRuntime.getRuntimeResources().getService(IJCOClientService.KEY);
                   poolEntry = clientService.getJCOClientPoolEntry(sapSystem, request);
                   client = poolEntry.getJCOClient();
                // connect to SAP system, logon
                   client.connect();
                // Create Jco Repository Object
                   mRepository = new JCO.Repository("R3USERMENU", client);
                // Reset function object
                   JCO.Function function = null;
                // Run RFC Module on SAP system
                   function = this.createFunction("HRWPC_GET_NAV_OBJECTS");
                   JCO.ParameterList input = function.getImportParameterList();
                   input.setValue("RCORGUNIT", "NAVTYPE");               
                   client.execute(function);
                   tblRelations = function.getTableParameterList().getTable("RESULT_OBJEC");
                   myBean.setRowcnt(tblRelations.getNumRows());
                   if (tblRelations.getNumRows() != 0)               
                        myBean.setOrgUnits(tblRelations);
                        if (ddlbOrgUnits == null)
                             // check to see if there is not a position id already assigned
                             tblRelations.setRow(0);
                             OBjid = tblRelations.getString("OBJID");
                             myBean.setObjId(OBjid);
                             //myBean.sTemp = OBjid;                         
                   // GET THE POSITION DETAILS
                   function = null;
                   input = null;
                   function = this.createFunction("Z_GET_POSITION_OVERVIEW");
                   input = function.getImportParameterList();               
                   input.setValue(NavType, "NAVTYPE");               
                   input.setValue(OType, "OTYPE");
                   input.setValue(OBjid, "OBJID");               
                   client.execute(function);
                   tblPositions = function.getTableParameterList().getTable("RESULT_OBJEC");
                   myBean.setRowcnt(tblPositions.getNumRows());
                   tableViewFormat();
                   tableModel.setTesting("Startxxxx");
                   myBean.settableModel(tableModel);
                   //tableModel.setTesting("SSSS");               
                   //myDataBean.settableModel(tableModel);                                             //dmm               
                   //session.setAttribute("POviewBean", myDataBean);                                //dmm
                   oSession.putValue("myBean", myBean);
              //Release pool entry
              poolEntry.release();                           
           catch(Exception ex)
                //name = ex.getMessage();                         
           //String sTest = "this is a test";      
           //request.getComponentSession().putValue("Test", sTest);
           //myProfile.putValue("Testx", sTest);
           this.setJspName("PositionOverviewJSP.jsp");
         public void getPositions()
              String NavType;
              String Root_Ot;
              String Root_ObjId;
         public void tableViewFormat()
              // Define the vectors used to build tableView
              Vector tempRec = new Vector();
              Vector dataRec = new Vector();
              String sDate = "";
              String sPosLink = "";
              String sPosVal = "";
              String sENameLink = "";
              String sENameVal = "";
              String sStatus = "";
              // Loop at company code list and add to vectors
              for (int i = 0; i < tblPositions.getNumRows(); i++)
                   tblPositions.setRow(i);
                   tempRec = new Vector();
                   sStatus = (String) tblPositions.getString("STATUS");
                   if (sStatus != null)
                        if (sStatus.equals("0"))                    
                             sDate = tblPositions.getString("ZHR_VACANT_BEGDA");
                             sDate = sDate.substring(5, 7) + "/" + sDate.substring(8, 10) + "/" +  sDate.substring(0, 4);                         
                        else
                             sDate = "";                    
                   sPosVal = tblPositions.getString("STEXT");
                   sENameVal = tblPositions.getString("ENAME");
                   if (sPosVal.equals(""))
                        sPosLink = sPosVal;
                   else
                        sPosLink = "<a HREF="myLink" onclick="return EPCM.doNavigate('ROLES://portal_content/com.sap.portal.migrated/ep_5.0/pages/com.sap.pct.hcm.positionprofile?CKey=000000" + tblPositions.getString("OBJID") + "', 1)">" + tblPositions.getString("STEXT") + "</a>";
                   if (sENameVal.equals(""))
                        sENameLink = sENameVal;
                   else
                        sENameLink = "<a HREF="myLink" onclick="return EPCM.doNavigate('ROLES://portal_content/com.phi/com.phi.mgt/com.phi.mss/com.phi.hr/com.phi.pages/com.phi.mgt.mss.hr.pages.positionholder?CKey=000000" + tblPositions.getString("OBJID") + "', 1)">" + tblPositions.getString("ENAME") + "</a>";
                   tempRec.addElement(sStatus);
                   tempRec.addElement(tblPositions.getString("OBJID"));
                   tempRec.addElement(sPosLink);
                   tempRec.addElement(sENameLink);
                   tempRec.addElement(sDate);               
                   dataRec.addElement(tempRec);
              // Then define the technical column names
              Vector colNames = new Vector();
              colNames.addElement("STATUS");
              colNames.addElement("OBJID");
              colNames.addElement("STEXT");     
              colNames.addElement("ENAME");
              colNames.addElement("ZHR_VACANT_BEGDA");
              // Now we build the actual tableView
              //tableModel = new DefaultTableViewModel(dataRec, colNames);
              tableModel = new SortTableModel(dataRec, colNames, 5);     
              // Define tableView parameters
              tableModel.setKeyColumn(2);
              TableColumn column = tableModel.getColumn("STATUS");
              column.setEncode(false);
              column.setType(com.sapportals.htmlb.enum.TableColumnType.USER);
              column.setTitle("Vacant");
              column = tableModel.getColumn("OBJID");
              column.setTitle("Position Number");
              column = tableModel.getColumn("STEXT");
              column.setTitle("Position");
              column = tableModel.getColumn("ENAME");
              column.setTitle("Holder of Position");          
              column = tableModel.getColumn("ZHR_VACANT_BEGDA");
              column.setTitle("Vacant as of");
         //     * Navigation Button Clicked
         public void myOnNavigate(Event event)
              TableNavigationEvent tne = (TableNavigationEvent) event;
              visibleRow = tne.getFirstVisibleRowAfter();
              // Define request, context and profile containers         
              IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
              IPortalComponentContext myContext = request.getComponentContext();
              IPortalComponentProfile myProfile = myContext.getProfile();
              // Get Bean from profile
              PositionOverviewBean myBean = (PositionOverviewBean) myProfile.getValue("myBean");
              // Table Start row
              myBean.setvisibleRow(new Integer(this.visibleRow).toString());
         public void onHeaderClick(Event event)
              IPortalComponentSession oSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
              PositionOverviewBean myBean = (PositionOverviewBean) oSession.getValue("myBean");
              TableHeaderClickEvent tne = (TableHeaderClickEvent) event; // get the event
              SortTableModel tblModel = myBean.gettableModel();
              //tblModel.sort();
              int col = 3;
              tblModel.sortByColumn(col);
              myBean.settableModel(tblModel);
              oSession.putValue("myBean", myBean);
         // Create Function object for RFC Calls
         public JCO.Function createFunction(String name) throws Exception
              try
                   IFunctionTemplate ft = mRepository.getFunctionTemplate(name.toUpperCase());
                   if (ft == null)
                        return null;
                   return ft.getFunction();
              catch (Exception ex)
                   ex.printStackTrace();
                   throw new Exception("Problem retrieving JCO.Function object");
         public void onSelectddlbOrgUnits(Event event) throws PageException
              OrgUnitSelected = true;          
    Here is the JSP
    <%@ page import="com.sap.mw.jco.*" %>
    <%@ page import="com.sapportals.htmlb.enum.*" %>
    <%@ page import="MSSPackage.TableViewCellRenderer" %>
    <%@ page import="com.sapportals.portal.prt.component.IPortalComponentRequest" %>
    <%@ page import="javax.servlet.http.*" %>
    <%@ page import="com.sapportals.portal.prt.component.IPortalComponentContext" %>
    <%@ taglib uri="tagLib" prefix="hbj" %>
    <hbj:content id="myContext" >
         <hbj:page title="PageTitle">
              <hbj:form id="myFormId" >  
              <jsp:useBean id="myBean" scope="session" class="MSSBeanPackage.PositionOverviewBean" />     
                   <hbj:gridLayout rowSize="1" columnSize="1" cellSpacing="1">
                        <hbj:gridLayoutCell columnIndex="1" rowIndex="1">
                             <hbj:textView id="ddlbLable" text="Select organizational unit to display positions" design="STANDARD" />
                        </hbj:gridLayoutCell>                         
                        <hbj:gridLayoutCell columnIndex="1" rowIndex="2">
                             <hbj:dropdownListBox id="ddlbOrgUnits" onSelect="onSelectddlbOrgUnits" selection="<%=myBean.getObjId()%>">                                                       
                                  <%                         
                                       JCO.Table org_units = null;                                                       
                                       org_units = myBean.getOrgUnits();
                                       for (int i = 0; i < org_units.getNumRows(); i++)
                                            org_units.setRow(i);
                                            String sUnit = org_units.getString("STEXT");
                                            String Unit_Id = org_units.getString("OBJID");
                                  %>
                                  <hbj:listBoxItem key="<%=Unit_Id%>" value="<%=sUnit%>" />
                                  <%
                                  %>
                             </hbj:dropdownListBox>                                                                                                   
                        </hbj:gridLayoutCell>
                        <hbj:gridLayoutCell columnIndex="1" rowIndex="3">
                             <hbj:textView id="listLable" text="To designate a vacant position, click the icon in the 'Create Form' column" design="STANDARD" />                    
                        </hbj:gridLayoutCell>                    
                        <hbj:gridLayoutCell columnIndex="1" rowIndex="4">     
                             <hbj:tableView
                                  id="myTableView"
                                  headerVisible="true"
                                  footerVisible="true"
                                  fillUpEmptyRows="true"
                                  selectionMode="NONE"                              
                                  navigationMode="BYPAGE"
                                  onNavigate="myOnNavigate"                                        
                                  visibleFirstRow="<%= myBean.getvisibleRow() %>"                                                  
                                  visibleRowCount="5" >                                                            
                                  <%
                                  myTableView.setOnHeaderClick("onHeaderClick");
                                  myTableView.setUserTypeCellRenderer(new TableViewCellRenderer());                                                             
                                  myTableView.setModel(myBean.gettableModel());
                                  myTableView.setColumnType(TableColumnType.LINK, 3);
                                  myTableView.setColumnType(TableColumnType.LINK, 4);                              
                                  %>
                             </hbj:tableView>
                        </hbj:gridLayoutCell>                                        
                   </hbj:gridLayout>   
              </hbj:form>
         </hbj:page>
    </hbj:content>
    Here is the BEAN
    package MSSBeanPackage;
    //import com.sapportals.htmlb.enum.TableColumnType;
    import MSSPackage.SortTableModel;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    //import com.sapportals.htmlb.table.TableColumn;
    //import com.sapportals.htmlb.table.TableView;
    //import com.sapportals.htmlb.table.TableViewModel;
    import com.sap.mw.jco.JCO;
    import com.sap.mw.jco.JCO.Table;
    public class PositionOverviewBean {
    //     public DefaultTableViewModel tableModel;
         public SortTableModel tableModel;
         public JCO.Table OrgUnits;
         public String ObjId;
         public String visibleRow;
         public int rowcnt;
         public String sTemp;
         // Get and Set methods for table model
    //     public DefaultTableViewModel gettableModel() { return tableModel; }
    //     public void settableModel(DefaultTableViewModel tableModel)     { this.tableModel = tableModel;     }
         public SortTableModel gettableModel() { return tableModel; }
         public void settableModel(SortTableModel IntableModel)     { this.tableModel = IntableModel;     }     
         public JCO.Table getOrgUnits()     { return OrgUnits; }
         public void setOrgUnits(JCO.Table value) { this.OrgUnits = value; }
         // Get and Set methods for visiblerow
         public String getvisibleRow() {     return visibleRow; }
         public void setvisibleRow(String visibleRow) { this.visibleRow = visibleRow; }     
         public int getRowcnt() { return this.rowcnt; }
         public void setRowcnt(int rowcnt) { this.rowcnt = rowcnt; }
         public String getObjId() { return this.ObjId; }
         public void setObjId(String value) { this.ObjId = value; }     
    Here is the sorting class
    package MSSPackage;
    import java.util.Collections;
    import java.util.Comparator;
    import java.util.Vector;
    import com.sapportals.htmlb.table.DefaultTableViewModel;
    public class SortTableModel extends DefaultTableViewModel implements Comparator {
         //protected int currCol;
         public int currCol;
         protected Vector ascendCol; // this vector stores the state (ascending or descending) of each column
         protected Integer one = new Integer(1);
         protected Integer minusOne = new Integer(-1);
         public String testing;
         public SortTableModel()
              super();
              ascendCol = new Vector();
         public SortTableModel(Vector vec)
              super(vec);
              ascendCol = new Vector();
         public SortTableModel(Vector vec, Vector vec2, int numberOfColumns)
              super(vec, vec2);
              ascendCol = new Vector();
              setSortOrder(numberOfColumns);
         public int compare (Object v1, Object v2)
              // the comparison is between 2 vectors, each representing a row
              // the comparison is done between 2 objects from the different rows that are in the column that is being sorted
              int ascending = ((Integer)ascendCol.get(currCol)).intValue();
              if (v1 == null && v2 == null)
                   return 0;
              else if (v2 == null)
              { // Define null less than everything.
                   return 1 * ascending;
              else if (v1 == null)
                   return -1 * ascending;
              Object o1 = ((Vector)v1).get(currCol);
              Object o2 = ((Vector)v2).get(currCol);
              // If both values are null, return 0.
              if (o1 == null && o2 == null)
                   return 0;
              else if (o2 == null)
              { // Define null less than everything.
                   return 1 * ascending;
              else if (o1 == null)
                   return -1 * ascending;
              if (o1 instanceof Number && o2 instanceof Number)
                   Number n1 = (Number)o1;
                   double d1 = n1.doubleValue();
                   Number n2 = (Number)o2;
                   double d2 = n2.doubleValue();
                   if (d1 == d2)
                        return 0;
                   else if (d1 > d2)
                        return 1 * ascending;
                   else {
                        return -1 * ascending;
              else if (o1 instanceof Boolean && o2 instanceof Boolean)
                   Boolean bool1 = (Boolean)o1;
                   boolean b1 = bool1.booleanValue();
                   Boolean bool2 = (Boolean)o2;
                   boolean b2 = bool2.booleanValue();
                   if (b1 == b2)
                        return 0;
                   else if (b1)
                        return 1 * ascending;
                   else
                        return -1 * ascending;
              else
                   // default case
                   if (o1 instanceof Comparable && o2 instanceof Comparable)
                        Comparable c1 = (Comparable)o1;
                        Comparable c2 = (Comparable)o2; // superflous cast, no need for it!
                        try
                             return c1.compareTo(c2) * ascending;
                        catch (ClassCastException cce)
                        // forget it... we'll deal with them like 2 normal objects below.
                   String s1 = o1.toString();
                   String s2 = o2.toString();
                   return s1.compareTo(s2) * ascending;
         * This method sorts the rows using Java's Collections class.
         * After sorting, it changes the state of the column -
         * if the column was ascending, its new state is descending, and vice versa.
         public void sort()
              Collections.sort(dataVector, this);          
              //Collections.sort(dataVector);
              Integer val = (Integer)ascendCol.get(currCol);
              ascendCol.remove(currCol);
              if (val.equals(one)) // change the state of the column
                   ascendCol.add(currCol, minusOne);
              else
                   ascendCol.add(currCol, one);
         public void sortByColumn(int column)
              this.currCol = column;
              sort();
         public void setSortOrder(int numberOfColumns)
              for (int i = 0; i < numberOfColumns; i++)
                   ascendCol.add(one);
         public void setTesting(String inStr)
              testing = inStr;
    Any help would be greatly apprciated and rewarded...

    Hi Don,
    be aware that after the method onHeaderClick(Event event) is executed the method doProcessBeforeOutput() is executed as well.
    I look over your code and found the following:
    1) In method onHeaderClick you sort the table model and store the table model in the bean
    2) In method doProcessBeforeOutput() you create a new table model from scratch (in helper method tableViewFormat())and store it in the bean. Thus you overwrite the sorted model.
    I suggest that you move the initial creation of the table model in method doInitialization(). Do not forget to store the created table in the bean. In method doProcessBeforeOutput() you retrieve the table model from the bean instead of creating a new one for every request.
    Best regards,
    Martin

  • Merging cells in Tableview

    Hi,
    I am creating a tableview in which I would like to merge few cells for few of the rows (based on some condition). I am also trying to make use of Table Iterator for the same but not getting proper clue.
    Can someone please help.
    Thanks and regards,
    Sachin K

    There are about a millions sources here in this forum for that A quick search will provide several for you.
    Here are some links you should check out...
    BSP Element - Dynamic tableView with Internal Table
    And of course the basics...
    <a href="/people/brian.mckellar/blog/2004/06/11/bsp-trouble-shooting-getting-help">BSP Trouble Shooting: Getting Help</a>
    <a href="/people/brian.mckellar/blog/2003/10/31/bsp-programming-htmlb-tableview-iterator">BSP Programming: HTMLB TableView Iterator</a>
    Here is a code sample of doing something in the <b>IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS</b>
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
      FIELD-SYMBOLS: <def> LIKE LINE OF p_column_definitions.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
      <def>-COLUMNNAME = 'SID'.
      <def>-TITLE      = 'System'.
      <def>-WIDTH      = '10%'.
      <def>-SORT       = 'X'.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
      <def>-COLUMNNAME  = 'STATUS'.
      <def>-TITLE       = 'Status'.
      <def>-WIDTH       = '10%'.
      <def>-SORT       = 'X'.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
      <def>-COLUMNNAME = 'CREATIMEDA'.
      <def>-TITLE      = 'Date'.
      <def>-WIDTH      = '10%'.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
      <def>-COLUMNNAME = 'CREATIMETI'.
      <def>-TITLE      = 'Time'.
      <def>-WIDTH      = '10%'.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
      <def>-COLUMNNAME = 'ALERTMSG'.
      <def>-TITLE      = 'Text'.
      <def>-WIDTH      = '50%'.
      <def>-WRAPPING   = 'X'.
      APPEND INITIAL LINE TO p_column_definitions ASSIGNING <def>.
      <def>-COLUMNNAME = 'UNAME'.
      <def>-TITLE      = 'Assigned User'.
      <def>-WIDTH      = '10%'.
      <def>-SORT       = 'X'.
    endmethod.
    Follow that with the code from <i><b>IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START</b></i>
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_ROW_START .
      m_row_ref ?= p_row_data_ref.
    endmethod.
    and ending with this code from <i><b>IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START</b></i>
    method IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START .
    * Data Declarations
      DATA: dataValue TYPE STRING,
            tmp TYPE STRING,
            tmptext TYPE STRING.
      CASE p_column_key.
        WHEN 'STATUS'.
          dataValue = m_row_ref->STATUS.
          case dataValue.
            when ''.
              tmp = '@5B@'.
              tmptext = m_row_ref->STATUST.
            when 'C'.
              tmp = '@5B@'.
              tmptext = m_row_ref->STATUST.
            when 'D'.
              tmp = '@5D@'.
              tmptext = m_row_ref->STATUST.
            when 'E'.
              tmp = '@5C@'.
              tmptext = m_row_ref->STATUST.
          endcase.
          DATA: image TYPE REF TO CL_HTMLB_IMAGE.
          p_replacement_bee = cl_htmlb_image=>factory( id = 'img'
                      src = tmp
                      alt = tmptext ).
      ENDCASE.
    endmethod.

  • Html in htmlB Tree Title

    We're moving our portal apps from ep6.20 onto Netweaver SP12, and I've found several htmlB components that no longer seem to accept Html in various "text" settings (Tree Title and TableView Header notably)--the HtmlB component seems to always encode the text.
    Does anyone know of a way to include Html in a Tree Title? 
    TableView provides a HeaderRenderer, which is an acceptable workaround for that component.  Are there any known workarounds for Tree Title?
    Thanks,
    Curt

    Hi Prakash
    That's sort of the approach I've taken for now.  I'm currently writing html as the content for other nodes, so this was the solution that came immediately to mind.  However, it appears that even if you set
    root.setShowExpander(false);
    , the expander always shows.  Goal was to have non-expandable "title" for tree.  May need to consider wrapping the tree in a Group.
    Thanks for the suggestion,
    Curt

  • MVC Tableview Singleselect and sorting

    Dear all,
    I have a tableview defined as follows:
    <htmlb:tableView id              = "result"
                     design          = "ALTERNATING"
                     keepSelectedRow = "true"
                     headerText      = "Header Text"
                     onNavigate      = "onMyNavigate"
                     selectionMode   = "SINGLESELECT"
                     emptyTableText  = "Keine Daten selektiert"
                     fillUpEmptyRows = "true"
                     filter          = "Server"
                     sort            = "Server"
                     keyColumn       = "pernr"
                     selectedRowKey  = "//aref_model/awa_persdata.pernr"
                     onRowSelection  = "onMyRowSelection"
                     table           = "//aref_model/ait_persdata"
                     iterator        = "<%= aref_iterator %>"
                     visibleRowCount = "5" >
    On my first approach I had simply the singleselect and found out that after resorting the index number remain the same (thus another person was marked selected). To overcome the problem I added the selectedRowKey but before I added keyColumn the entries in selectionRowKey remained initial. Now, I can see (while debugging in DO_HANDLE_EVENT that the attributes are set, (even the page displays the different person in another tray. However, the line is not marked anymore.
    Am I on a completly wrong track here? Could you give me some hints or directions? I checked the SBSPEXT_TABLE but it seems to work different since there is no MVC behind.
    Christian

    Dear all,
    I have solved the issue (rather accidently):
    Obviously the model binding does not work for the attibute selectedRowKey.
    I changed it
    from
    <htmlb:tableView id              = "result"
                     design          = "ALTERNATING"
                     keepSelectedRow = "true"
                     headerText      = "Header Text"
                     onNavigate      = "onMyNavigate"
                     selectionMode   = "SINGLESELECT"
                     emptyTableText  = "Keine Daten selektiert"
                     fillUpEmptyRows = "true"
                     filter          = "Server"
                     sort            = "Server"
                     keyColumn       = "pernr"
                     selectedRowKey  = "//aref_model/awa_persdata.pernr"
                     onRowSelection  = "onMyRowSelection"
                     table           = "//aref_model/ait_persdata"
                     iterator        = "<%= aref_iterator %>"
                     visibleRowCount = "5" >
    to
    <htmlb:tableView id              = "result"
                     design          = "ALTERNATING"
                     keepSelectedRow = "true"
                     headerText      = "Header Text"
                     onNavigate      = "onMyNavigate"
                     selectionMode   = "SINGLESELECT"
                     emptyTableText  = "Keine Daten selektiert"
                     fillUpEmptyRows = "true"
                     filter          = "Server"
                     sort            = "Server"
                     keyColumn       = "pernr"
                     selectedRowKey  = <b>"<%=aref_model->awa_persdata-pernr %>"</b>
                     onRowSelection  = "onMyRowSelection"
                     table           = "//aref_model/ait_persdata"
                     iterator        = "<%= aref_iterator %>"
                     visibleRowCount = "5" >
    and now it works....
    Christian
    Message was edited by: Christian Finkbeiner

  • Tableview  pager

    Hi friends
    I am using the xhtmlb pager for table view .it is working fine , but when
        using filter for tableview and i have given the 'SERVER' Option for filter . so it is taking care by htmlb but how can i know the No of records which were satisifed the filter selection condition.
    so That i can display the page no in pager .
       Ofcourse when using the default xhtmlb pager for tableview it is displaying automatically but here my requirement is different pager.
    Message was edited by: Shiva
    Message was edited by: Shiva

    Hi Raja,
    Sorry for the late reply....
    Now i have a problem with this....The script is working fine....what i have used is
    <script for="TV1_pager-btn-4" event=onclick type="text/javascript">
        alert('Unsaved data will be lost');
    </script>
    But when ever i do onClick it displays the message and then doesn't go to the next page...it stays there itself....
    Also should i declare this in the main javascript section or should I cover it around the tableView extension like this :
    <htmlb:tableView id="TV1"
    >
    <script for="TV1_pager-btn-4" event=onclick type="text/javascript">
        alert('Unsaved data will be lost');
    </script>
    </htmlb:tableView>
    Please help.
    Thanks,
    Tatvagna.

  • Modify hbj:tableView with JavaScript

    Hi forum-team,
    does anyone know if it is possible to modify the contents of a hbj:tableView-Cell with JavaScript (e.g. modify the text within a cell)?
    I only found some getClickedRow methods within the JavaScript API.
    Regards,
    Frank

    Hi,
      I can't get a code for this but can guide you.
    There is onClientCellClick event for tableview which can be used for this. You will have to implement separate methods for each cell click, I hope. Also this is a classlib and not taglib. Check the documentation for more info on this.
    http://help.sap.com/saphelp_nw70/helpdata/en/fd/01f34026d70b06e10000000a155106/frameset.htm
    Also check these.
    onClientRowSelection for tableView's
    onClientCellClick in htmlb tableview
    Regards,
    Harini S

  • OnClientClick on tableView pager event

    Hello All,
    Is is possible to provide onClientClick event on the tableView pager event.
    I have a tableView in which two columns are rendered as inputFields...Now I want to a pop-up for the tableView footer, which displays the number of pages....such that if the user clicks on this it should say
    " You have unsaved data on this page...would you like to save it..? "
    A code snippet would be highly appreciated....a push in the correct direction would be very greatful....
    Thanks in advance.
    Tatvagna.

    Hi Raja,
    Sorry for the late reply....
    Now i have a problem with this....The script is working fine....what i have used is
    <script for="TV1_pager-btn-4" event=onclick type="text/javascript">
        alert('Unsaved data will be lost');
    </script>
    But when ever i do onClick it displays the message and then doesn't go to the next page...it stays there itself....
    Also should i declare this in the main javascript section or should I cover it around the tableView extension like this :
    <htmlb:tableView id="TV1"
    >
    <script for="TV1_pager-btn-4" event=onclick type="text/javascript">
        alert('Unsaved data will be lost');
    </script>
    </htmlb:tableView>
    Please help.
    Thanks,
    Tatvagna.

  • TableView Customizing Problems

    Hi all,
    i`m trying to display a Table with a some columns and a selektor (radio button).
    I have different tables with this setup, but i can`t set the width of the differnt cells. I tried via TableView getColumn("xx" and setWidth("100 px") or setWidth("50 %"); but without success.
    Then i implemented an own CellRenderer. And it renders my cells, but i cannot influence the width of the TextView. (I have set the width AND set the wrapping attribute to true, to get the width repsected)
    Ok, now i`m a little clueless.
    How can i set the width of the different cells ?
    In my simplest table i want to have a table with the radio button and one cell that spans the remaining row size.
    Maybe someone can point me in the right directions or supply me some sample code.
    Best Regards
    Odo

    Hi,
    here is the code that i use to setup the tableView:
    <hbj:tableView
         id="tagTableView"
         design="ALTERNATING"
         headerVisible="true"
         footerVisible="true"
         fillUpEmptyRows="true"
         navigationMode="BYPAGE"
         selectionMode="SINGLESELECT"
         visibleFirstRow="1"
         visibleRowCount="5"
         width="100 %" >
         <%      
    tagTableView.setModel(tagTableBean.getTagTable().getModel());
    tagTableView.useRowSelection(tagTableBean.getTagTable().getTableView());
    tagTableView.setHeaderText("Defined Tags");
    tagTableView.setOnNavigate("onTagNavigate");
    tagTableView.setOnRowSelection("onTagRowSelection");
    %>
    I have tried to set the width of the column in the scriptlet but with no success.
    com.sapportals.htmlb.table.TableView tv = (com.sapportals.htmlb.table.TableView)pageContext.findAttribute("tagTableView");
    tv.getColumn(1).setWidth("100 %");
    Hi,
    the problem is solved. When a table has only two columns (one select box / radio button and one content column) the  
    img that is placed in the radio button column needs to have the size set (1x1). If not, the IE6 stretches this column and it looks ugly.
    A workaround for this is to add an empty column and set the width of the middle column to max. Works and do not look that ugly.
    Better solutions are welcome.
    Best Regards,
    Odo
    Message was edited by: Oliver Dohmen

Maybe you are looking for

  • Saved Real Player Videos only play Audio, video won't display

    I can watch videos on youtube, but all the videos i have snatched with realplayer won't play anything but the audio, i've restarted and redownloaded realplayer 11, so i'm lost.. . i found a lot of people had the opposite problem, video no audio but i

  • Printing Documents

    Hi, Does anyone know how to print documents (a Purchase Order) via the document object ? - or if this is possible at all ?? thanks, Mark

  • My phone won't connect to my PC (windows 7)

    When i plug in my iPhone 4s, the computer doesn't respond.  The device does not appear in iTunes or even start charging.  I'm certain it's a problem in the PC itself.  When I plugged in my iPad, it started charging, so it was either the phone or the

  • Null cipher key?

    We had a snoop program ran against our WLS servers and found that some of our hosts allow a null cipher key, which means SSL communication could occur over clear text. We do not run our servers on SSL, how do I configure WLS to not allow a null ciphe

  • What's the weblogic 7.1?

    I hear a lot about problem in weblogic 7.1, but cannot any official document about weblogic 7.1. What's the actual official version number for this '7.1'? Is it actually weblogic 8.1? or weblogic 7.0 with high service pack?