Button column in tableview

Hi All,
I've got a tableview that I've added a button column onto. The button runs the onRequestClick() method fine but I need to know which particular button was clicked ( on which row ).
The button has been created using the code :
col = model.getColumn("REQUEST");
col.setTitle(bean.getChangeOrderRequestText());
col.setCellType(-1, TableColumnType.BUTTON);
col.setOnCellClick("requestClick");
The event handler is :
public void onRequestClick(Event event) {
//TableHeaderClickEvent tne = (TableHeaderClickEvent) event;
How can I tell which of the 10 buttons ( 10 rows in the tableview) was clicked.
Cheers
Richard

Hi Richard,
probably clicking the button raises a TableCellClickEvent. You can retrieve the visible Rownumber by
TableCellClickEvent cellClickEvent = (TableCellClickEvent)event;
int visibleClickedRow = cellClickEvent.getVisibleRowIndex();          
Then you have to add the firstVisibleRowNumber in case your table has more than one page, but I don't know the details for sure right now.
Hope that helps.

Similar Messages

  • How to create an ADF table which has a command button column?

    Hi
    Thank you for reading my post
    how i can create a tabl that one of its column is a command button.
    when i press the command button it will , for example delete that row or do some action.
    indeed i want to know
    -how to have a command button column
    -how to find the rowID or some row identifier that help me locate that row in the database.
    thanks

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Rainer Wagner ([email protected]):
    Imagine a table T_Q with columns C_1, C_2, C_3 and UN_123.
    C_1, C_2 and C_3 are all numeric and given by the user.
    UN_123 has to be a calculated sequence number starting by 1 and incremented by 1 for each combination of C_1, C_2 and C_3, i.e., the sequence number depends on the key values C_1, C_2 and C_3.
    Could anybody provide a code sample on how to create a BEFORE INSERT trigger , which calculates the value of the column UN_123 based on the values of C_1, C_2 and C_3 ??
    Premise: Rather than using any sequence, the trigger code should only be based on the table T_Q<HR></BLOCKQUOTE>
    null

  • How to increase the width of the column in Tableview

    Hi ALL,
    How to increase the width of the column in tableview?I have name column where big name is displaying in rows.Does any one have any idea how to increase the width of the column dynamically in tableview.Please respond its little urgent.
    Thanks in advance

    Hi Peter,
    Here is my Dynpage
    package com.ust.jcatotable;     
    import java.awt.Event;
    import javax.resource.cci.MappedRecord;
    import javax.resource.cci.RecordFactory;
    import com.sapportals.connector.connection.IConnection;
    import com.sapportals.connector.execution.functions.IInteraction;
    import com.sapportals.connector.execution.functions.IInteractionSpec;
    import com.sapportals.connector.execution.structures.IRecordSet;
    import com.sapportals.htmlb.DropdownListBox;
    import com.sapportals.htmlb.event.TableNavigationEvent;
    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.ivs.cg.ConnectionProperties;
    import com.sapportals.portal.ivs.cg.IConnectorGatewayService;
    import com.sapportals.portal.ivs.cg.IConnectorService;
    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.IPortalComponentResponse;
    import com.sapportals.portal.prt.runtime.PortalRuntime;
    public class Display extends PageProcessorComponent {
      public DynPage getPage(){
         return new DisplayDynPage();
    public static class DisplayDynPage extends JSPDynPage{
         private Object formatFlag;
         public static IConnection connection ;
         private IPortalComponentRequest request;
         private IPortalComponentContext context;
         private IPortalComponentProfile profile;
         private IPortalComponentResponse  response;
         private int visibleRow=1;
         TableBean myBean;
         public void doInitialization(){
                   response = (IPortalComponentResponse) this.getResponse();
                   request = (IPortalComponentRequest) this.getRequest();
                    context = request.getComponentContext();
                    profile = context.getProfile();
                    IPortalComponentProfile profile = context.getProfile();
                    Object o = context.getValue("myBean");
                    if(o==null || !(o instanceof TableBean)){
                       myBean = new TableBean();
                       setBeanFromProfile(profile, myBean);
                       context.putValue("myBean",myBean);
                     }else {
                       setBeanFromProfile(profile, myBean);
                        myBean = (TableBean) o;
                    this.getData();
         public void myOnNavigate(Event event) throws PageException{
              TableNavigationEvent tne = (TableNavigationEvent) event;
              this.visibleRow = tne.getFirstVisibleRowAfter();
              if(myBean!=null)
              myBean.setVisibleRow(new Integer(this.visibleRow).toString());

  • Push button column in table control

    Hi,
    I have to add a few push button columns into table control. This columns has to be placed between fields of DDic table. How to do this? Shall I create new DDic structure with all the needed fields  from DDic table and add also fields for push button columns? Which data element shal I use in this case for push button field? Or is the better solution to add DDic table fields one by one and then using drag and drop technique to add push button column behind it?
    Thanks.

    Hi ,
        Your Last option is better first add columns into DDIC table then  Drag and
    Drop it on table control .
      That will better definitely.................................
    if useful rewards the point..............
    Thanks .
    Nilesh Jain

  • Button column delete row

    Hi guys i have a problem i have a code to delete row from datagridview following:
     If DataGridViewX1.SelectedRowsRows.Count > 0 Then
                DataGridViewX1.Rows.Remove(DataGridViewX1.SelectedRows(0))
            Else
                MessageBox.Show("DUMB SELECT A ROW TO DELETE")
            End I f
    but when i am using this code on button of button column its not working bcz this code wants a row to be selected. i want to delete row using a button in button column.
     Plz Help
    Thank You.

    Hi guys i have a problem i have a code to delete row from datagridview following:
     If DataGridViewX1.SelectedRowsRows.Count > 0 Then
                DataGridViewX1.Rows.Remove(DataGridViewX1.SelectedRows(0))
            Else
                MessageBox.Show("DUMB SELECT A ROW TO DELETE")
            End I f
    but when i am using this code on button of button column its not working bcz this code wants a row to be selected. i want to delete row using a button in button column.
     Plz Help
    Thank You.
    Hello,
    You could get that task done inside its cellcontent_click event, because we could get the rowindex of that row which we clicked. You could refer to the sample below.
    Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
    Dim senderGrid = DirectCast(sender, DataGridView)
    If TypeOf senderGrid.Columns(e.ColumnIndex) Is DataGridViewButtonColumn AndAlso
    (e.RowIndex >= 0 And e.RowIndex < senderGrid.RowCount - 1) Then
    If MsgBox("Would you like to remove this row?", MsgBoxStyle.YesNo, "Delete Row") = MsgBoxResult.Yes Then
    senderGrid.Rows().RemoveAt(e.RowIndex)
    End If
    End If
    End Sub
    Regards.
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Method to locate row and column in TableView

    In a TableView.setOnMouseClicked ()
    How to capture that row and column were clicked?

    I am having problem in populating data from a table in one screen to a Text Field in the other screen. I have two classes FirstClass containing a textbox and a button. On pressing a button a second window is opened containing a Table of values. As the user double clicks a row the value of the second column of the row should be inserted into the textbox of the FirstClass. Code of both the classes is attached. Thanking you in anticipation.
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Stage;
    public class FirstClass extends Application {
    public static void main(String[] args) {
         launch(args);
    @Override
    public void start(final Stage primaryStage) {
         primaryStage.setTitle("First Class");
    GridPane gridpane = new GridPane();
              gridpane.setPadding(new Insets(5));
              gridpane.setHgap(5);
              gridpane.setVgap(5);
    final TextField userNameFld = new TextField();
    gridpane.add(userNameFld, 1, 1);
    Button btn = new Button();
    btn.setText("Show Table");
    gridpane.add(btn, 1, 3);
    btn.setOnAction(new EventHandler<ActionEvent>() {
    @Override
    public void handle(ActionEvent event) {
         String a = TableClass.showDialog(primaryStage, true, "Table Window" );
         userNameFld.setText(a);
    StackPane root = new StackPane();
    Scene scene =new Scene(root, 300, 250);
    root.getChildren().addAll(gridpane);
    primaryStage.setScene(scene);
    primaryStage.show();
    import javafx.beans.property.SimpleStringProperty;
    import javafx.collections.FXCollections;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.scene.Scene;
    import javafx.scene.control.TableColumn;
    import javafx.scene.control.TableView;
    import javafx.scene.control.cell.PropertyValueFactory;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.GridPane;
    import javafx.scene.layout.StackPane;
    import javafx.stage.Modality;
    import javafx.stage.Stage;
    public class TableClass extends Stage {
         private static TableClass dialog;
         private static String value = "";
         public static class Person {
    private final SimpleStringProperty firstName;
    private final SimpleStringProperty lastName;
    private Person(String fName, String lName) {
    this.firstName = new SimpleStringProperty(fName);
    this.lastName = new SimpleStringProperty(lName);
    public String getFirstName() {
    return firstName.get();
    public void setFirstName(String fName) {
    firstName.set(fName);
    public String getLastName() {
    return lastName.get();
    public void setLastName(String fName) {
    lastName.set(fName);
         private TableView<Person> table = new TableView<Person>();
         private final ObservableList<Person> data =
         FXCollections.observableArrayList(
         new Person("JACK", "BROWN"),
         new Person("JOHN", "VIANNEYS"),
         new Person("MICHAEL", "NELSON"),
         new Person("WILLIAM", " CAREY")
         public TableClass(Stage owner, boolean modality, String title) {
              super();
              initOwner(owner);
              Modality m = modality ? Modality.APPLICATION_MODAL : Modality.NONE;
              initModality(m);
              setOpacity(1);
              setTitle(title);
              StackPane root = new StackPane();
              Scene scene = new Scene(root, 750, 750);
              setScene(scene);
              GridPane gridpane = new GridPane();
              gridpane.setPadding(new Insets(5));
              gridpane.setHgap(5);
              gridpane.setVgap(5);
              TableColumn firstNameCol = new TableColumn("First Name");
         firstNameCol.setMinWidth(100);
         firstNameCol.setCellValueFactory(
         new PropertyValueFactory<Person,String>("firstName")
         TableColumn lastNameCol = new TableColumn("Last Name");
         lastNameCol.setMinWidth(200);
         lastNameCol.setCellValueFactory(
         new PropertyValueFactory<Person,String>("lastName")
         table.setItems(data);
         table.getColumns().addAll(firstNameCol, lastNameCol);
         table.setOnMouseClicked(new EventHandler<MouseEvent>() {
                   public void handle(MouseEvent me) {
                        if (me.getClickCount() >= 2) {
                   String srr = table.getItems().get(table.getSelectionModel().getSelectedIndex()).getLastName();
                   value = srr;
                   dialog.hide();
         gridpane.add(table, 1, 5,1,20 );
              root.getChildren().add(gridpane);
         public static String showDialog(Stage stg, Boolean a , String title){
              dialog = new TableClass( stg,a, title);
              dialog.show();
              return value;
    }

  • 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.

  • Set filter for only one column in tableview

    Hi
    i am using in MVC a htmlb:tableview with filter in only one column of 8.
    This is all working fine, except that the user can enter a searchsting in the filterfield for all columns, but in handle_event (of the controller) ; i only react to a text in the filterfield of column 4 and ignore all other filtertext , which were maybe entered in the other columns.
    My question:
    how can i  enter the filter only for one column, in a way that the user cannot enter any text in the filterfield of the other columns, only in column 4 ?
    my view:
    <htmlb:tableView id             = "requirements"
                     table          = "//model/pdst_reqs"
                     filter         = "APPLICATION"                
                     keyColumn       = "EXTID"
                     iterator        = "<%=model%>"
                     footerVisible   = "FALSE"
                     encode          = "TRUE"
                     visibleRowCount = "<%=model->rowcount%>"
                     width           = "100%"/>
    Best Regards
    Britta

    You can disbale the Filter for the particular column by setting the DISABLE_FILTER in the Iterator method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS. Here is the sample code
    method IF_HTMLB_TABLEVIEW_ITERATOR~GET_COLUMN_DEFINITIONS .
      CLEAR p_column_definitions.
      CLEAR p_overwrites.
      data tv_column TYPE TABLEVIEWCONTROL.
      tv_column-COLUMNNAME          = 'FLDATE'.
      tv_column-SORT                = 'X'.
      tv_column-EDIT                = 'X'.
      tv_column-ONCELLCLICK         = 'MyCellClick1'.
      tv_column-title               = 'Date '.
      APPEND tv_column TO p_column_definitions.
      CLEAR tv_column.
      tv_column-COLUMNNAME          = 'PRICE'.
      tv_column-horizontalAlignment = 'right'.
      tv_column-verticalAlignment   = 'middle'.
      tv_column-ONCELLCLICK         = 'MyCellClick2'.
      tv_column-title               = 'Currency'. 
      tv_column-EDIT                = 'X'.
      tv_column-DISABLE_FILTER      = 'X'.    " <-------Like this
      APPEND tv_column TO p_column_definitions.
    endmethod.
    Hope this will solve your problem.
    Raja

  • Single column in Tableview

    Hi all,
            I want to know how can we display single column of a table using tableview. In the syntax we have  <htmlb:tableView table =......>
    My actual requirement is to display a single column on pressing F4 help and that needs to be done using tableview, but i want to display only one required column instead of all the columns. Plz suggest.
    Regards,
    Rohit Khetarpal

    Hi,
    this code sample can help you..
      <htmlb:tableView id              = "tab01"
                                   table           = "<%= itab2 %>"
                                   headerText      = "Channel and Account Details"
                                   headerVisible   = "TRUE"
                                   width           = "100%"
                                   filter          = "server"
                                   footerVisible   = "true"
                                   visibleRowCount = "10"
                                   onRowSelection  = "myEvent"
                                   selectionMode   = "LINEEDIT" >
                    <htmlb:tableViewColumns>
                      <htmlb:tableViewColumn title      = "Division "
                                             columnName = "DIVISION"
                                             wrapping   = "True" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Distribution Channel"
                                             columnName = "DISTR_CHAN" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Sales Org"
                                             columnName = "SALESORG" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Channel"
                                             columnName = "CHANNEL"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                      <htmlb:tableViewColumn title      = "Account"
                                             columnName = "ACCOUNT"
                                             edit       = "TRUE" >
                      </htmlb:tableViewColumn>
                    </htmlb:tableViewColumns>
                  </htmlb:tableView>
    Regards,
    Ravikiran.

  • Adding inputhelp to a particular column in tableview

    Hi experts,
      I need to display a particlular column by providing inputhelp in tableview.My requirement is to save the data entered in the tableview to the database. but in particlular coulmn v should select data from the inpuhelp.please help me out.Please anybody help me how should i make particular column as inputhelp in tableview. This is urgent requirement.
    Thanks in advance.
    Regards,
    sireesha

    Hi,
    Can anybody tell me whats wrong with the following script.and also can see the layout here.
    <script language="JavaScript" type="text/javascript">
              function pass_data()
                   if (top.window.dialogArguments) {
                   if ( document.form1.row_sel.value )
    top.dialogArguments.document.form1.tab01_6_2.value=document.form1.row_sel.value;
                   top.close();
    <htmlb:content design="design2003" >
      <htmlb:page title=" " >
        <htmlb:form id="form1" >
          <htmlb:tableView id              = "tab01"
                           table           = "<%= flights %>"
                           visibleRowCount = "14"
                           width           = "100%"
                           design          = "ALTERNATING"
                           footerVisible   = "TRUE"
                           onRowSelection  = "my_event"
                           selectionMode   = "SINGLESELECT" >
          </htmlb:tableView>
          <htmlb:inputField id      = "row_sel"
                            value   = "<%= rowselected %>"
                            visible = "false" />
    In this script am getting the following error:
    <b>top.dialogArguments.document.form1.tab01_6_2.value is null or not an object.</b>
    In the OnInputProcessing the event is getting triggered when i click on the row in tableview. And that selected value is also assigned to the inputfield.But in the layout am getting the above error.Can anybody pls help me out.I dont know the javascript.
    How should i pass this selected value to the inputfield in the parent window.
    Pls help me out.
    Thanks in advance
    Regards
    sireesha
    In the OnInputProcessing

  • Add Button Column in IR

    Hi,
    I have created an Interactive report on a table. I want to add two buttons in each row: Accept and Reject, so that i can change the status(db column) of the corresponding record on button action.
    How can I do so?

    Hi poojaC,
    Try the below code,
    i am giving the idea to add buttons..may be this is not the way you want.
    step1
    -- put this code in report region
    select "ROWID",
    '<input type="button" value="Accept"  onclick="func('||EMPNO||')">'  as "Accept",
    '<input type="button" value="Reject"  onclick="func('||EMPNO||')">'  as "Reject",
    "EMPNO",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "#OWNER#"."EMP"
    -- edit the Accept and reject column and change Display type to "standard report column"Step 2 : create one function in page header like
    -- here you can execute your process on button action
    <script>
    function func(id)
    alert(id);
    </script>Hope this will give you some idea.
    Regards,
    Jitendra

  • How to avoid the page to move up when I click the button on the Tableview?

    Hi, EP fellows.
    I currently have 3 tableViews and 1 header form set in one jsp page (I know, it may not be a good design to put three tableView in one jsp page.....but for the sake of avoiding client side eventing between each tableViews..I combined them into one jsp page). I set the Load/Navigation value to be URL. 
    Here is the problem. Everytimes I click on the Navigation button (Up/Down) to navigate the tableView data to another page, the whole page will move up and away from the table that I navigating.
    I know it is bacause the page get refreshed, and go to the first item of the page. In this case, how do I avaoid the page to move up and away form the tableView? As it is really look bad when user click on the button, they have to scroll back to the tableView they click.
    Thanks for advices.
    Kent

    As far as i remember,this javascript function pops user a dialog to save a file:
    javascript: document.execCommand('SaveAs','1',null);
    But i m not sure will it pop up for pdf, just try to google javascript to save a pdf file.
    --Mukul                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Radio button column in the tabular report

    Hi everyone,
    I have a tabular report. I wanted to have radio button and check box some of the field. Please take a look at my sample application.
    http://apex.oracle.com/pls/otn/
    Workspace ==> SHYIN
    username ==> SHY
    password ==> shy
    Application ID : 29879 - TabularForm
    On page 2, of the detail form, I want to have radio button in Primary Contact column and check box in status column. I would appreciate any suggession. Thanks.
    SHY

    Hi Andy,
    I surely come back with new question!
    Now, I am trying to change the status column to check box. I can see the correct status the check box in the form. But when I tried to add new rows or update anything, I am getting "No data found" error.
    here is my query
    SELECT
    APEX_ITEM.HIDDEN(1, SEQ_ID) || APEX_ITEM.HIDDEN(2, C001) || APEX_ITEM.RADIOGROUP(3, C001, NULL, NULL, 'onclick="javascript:$x(''P2_SELECTED_ID'').value=' || C001 || '"') PRIMARY_CONTACT,
    apex_item.text(4,C002) name,
    apex_item.text(5,C004) phone,
    APEX_ITEM.HIDDEN(6, C006) || apex_item.checkbox(7,C001, null, C005) INACTIVE
    from apex_collections
    where collection_name = 'C_CONTACT_INFO'
    this is the updated Contact_Collection
    begin
    IF NOT APEX_COLLECTION.COLLECTION_EXISTS('C_CONTACT_INFO') THEN
    apex_collection.create_or_truncate_collection(p_collection_name => 'C_CONTACT_INFO');
    for y in (select ID,
    NAME,
    PRIMARY_CONTACT,
    PHONE,
    decode(STATUS, 'I', ID, null) status,
    CUSTOMER_ID
    from CONTACTS
    where CUSTOMER_ID = :P2_CUSTOMER_ID)
    LOOP
    apex_collection.add_member(
    p_collection_name => 'C_CONTACT_INFO',
    p_c001 => y.ID,
    p_c002 => y.NAME,
    p_c003 => y.PRIMARY_CONTACT,
    p_c004 => y.PHONE,
    p_c005 => y.STATUS,
    p_c006 => y.CUSTOMER_ID);
    end loop;
    END IF;
    end;
    here is my updated Update_Collection process
    DECLARE
    V_C003 CHAR(1);
    V_C001 NUMBER;
    V_C005 CHAR(1);
    BEGIN
    FOR X IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
    V_C001 := APEX_APPLICATION.G_F02(X);
    IF V_C001 = :P2_SELECTED_ID THEN
    --HTP.P('YES');
    V_C003 := 'Y';
    ELSE
    --HTP.P('NO');
    V_C003 := 'N';
    END IF;
    if APEX_APPLICATION.G_F07(X) = APEX_APPLICATION.G_F02(X) THEN
    V_C005 := 'I';
    ELSE
    V_C005 := 'A';
    END IF;
    APEX_COLLECTION.UPDATE_MEMBER (
    P_COLLECTION_NAME => 'C_CONTACT_INFO',
    P_SEQ => APEX_APPLICATION.G_F01(X),
    P_C001 => APEX_APPLICATION.G_F02(X),
    P_C002 => APEX_APPLICATION.G_F04(X),
    P_C003 => V_C003,
    P_C004 => APEX_APPLICATION.G_F05(X),
    P_C005 => V_C005,
    P_C006 => APEX_APPLICATION.G_F06(X));
    END LOOP;
    END;
    I did not make any changes to Save_Contacts process.
    Thanks
    SHY

  • Color a column based on value in another column in tableview

    I am using a tableview iterator to display data in a bsp page. I want to color a cell in particular column (column 4), when a value in another column (column 2) on that same row is greater than 20. I can color the cell in column 2 but am not able to color the cell in column 4. How can I accomplish this?
    This is what I have. Looks like val1 is losing it's value.
    CASE p_column_index.
        WHEN 2.
          ASSIGN p_row_data_ref->* TO <row>.
          ASSIGN COMPONENT 'ZTGT' OF STRUCTURE <row> TO <col>.
          VAL = <col>.
          IF VAL GT '20'.
            val1 = p_row_index.
            p_style = 'celldesign:CRITICALVALUE_DARK'.
          ENDIF.
        WHEN 4.
            if p_row_index = val1.
              p_style = 'celldesign:CRITICALVALUE_DARK'.
            endif.
        WHEN OTHERS.
    do nothing
      ENDCASE.

    The reason val1 is "loosing its' value" is presumably because you have defined it in the method as a local variable. So each time you call the RENDER_CELL_START method it is is newly initialised. So if you make this an instance attribute it will retain its' contents across method calls.
    Cheers
    Graham Robbo

  • F4 help for a column in tableview

    Hi all,
    I have achieved F4 help using java script for input field, but i want to use it to fill each value of a column, i am using iterator for the column properties. Is the method of displaying help same as used for input field. I want to do it without using the concept of MVC.
    Any pointers are welcome...
    Regards,
    Rohit Khetarpal

    Rohit,
    Here you go. Using Flowlogic..used Flight example to narrate this..
    Just i added pieces which is mandatory so that you can develope the full code..
    In Iterator of Main Tableview:
    IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START
    DATA col_inputField TYPE REF TO CL_HTMLB_INPUTFIELD.
          CREATE OBJECT col8_inputField.
          col_inputField->id        = p_cell_id.
          col_inputField->width     = '100%'.
          col_inputField->maxlength = 40.
          col_inputField->showHelp = 'X'.
          row_index = p_row_index.
          condense row_index.
          concatenate `openF4Window('` row_index `','` p_cell_id `');` into javascript.
          col_inputField->onValueHelp = javascript.
          _value = p_row_index.
          condense _value.
          concatenate 'flights[' _value '].connid' into attribute_path.
          col_inputField->_value   = p_cell_binding.
          p_replacement_bee         = col_inputField.
    <b>Main page Layout:</b>
      <htmlb:page>
        <script language="JavaScript" type="text/javascript">
          function openF4Window(row_index,p_cell_id)
            document.getElementById("row_index").value=row_index;
            document.getElementById("p_cell_id").value=p_cell_id;
            var s=0;
            var r=1;
            var w=260;
            var h=100;
            var x=screen.width/2;
            x=x-w/2;
            var y=screen.height/2;
            y=y-h/2;
            popUp=window.open('f4.htm', '_blank', 'Emp Details','width=100,height=300');
        </script>
          <htmlb:tableView id               = "main"
                           width            = "200"
                           headerVisible    = "true"
                           design           = "alternating"
                           visibleRowCount  = "10"
                           fillUpEmptyRows  = "true"
                           selectionMode    = "SINGLESELECT"
                           selectedRowIndex = "<%= row_index %>"
                           onRowSelection   = "MyEventRowSelection"
                           showNoMatchText  = "true"
                           filter           = "server"
                           sort             = "server"
                           onHeaderClick    = "MyEventHeaderClick"
                           table            = "<%= it_sflight %>"
                           iterator         = "<%= iterator %>" >
    <b>f4.htm page Layout:</b>
    <%@page language="abap" %>
    <%@extension name="htmlb" prefix="htmlb" %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Test" >
        <htmlb:form id="my_window" >
          <%
      data TV_ITERATOR Type Ref To zcl_itr." - Iterator Function
      data iterator type ref to IF_HTMLB_TABLEVIEW_ITERATOR.
      create object tv_iterator exporting appl_cons = application.
      iterator = tv_iterator.
          %>
          <htmlb:tableView id               = "pop"
                           width            = "200"
                           headerVisible    = "true"
                           design           = "alternating"
                           visibleRowCount  = "10"
                           fillUpEmptyRows  = "true"
                           selectionMode    = "SINGLESELECT"
                           selectedRowIndex = "<%= row_index %>"
                           onRowSelection   = "MyEventRowSelection"
                           showNoMatchText  = "true"
                           filter           = "server"
                           sort             = "server"
                           onHeaderClick    = "MyEventHeaderClick"
                           table            = "<%= it_help %>"
                           iterator         = "<%= iterator2 %>" >
          </htmlb:tableView>
          <%
      if connid is not initial.
          %>
          <htmlb:inputField id      = "checked"
                            visible = "FALSE"
                            value   = "<%= lv_checked %>" />
                <script for="checked" language="javascript" even="onLoad()">
            var row_index=opener.document.getElementById("row_index").value;
            var p_cell_id=opener.document.getElementById("p_cell_id").value;
            opener.document.forms[0][p_cell_id].value=document.getElementById("connid").value;
                       window.self.close();
          </script>
          <%
      endif.
          %>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    <b>Oninputprocessing of F4.htm</b>
    DATA: IND TYPE I.
      DATA: TV TYPE REF TO CL_HTMLB_TABLEVIEW.
      DATA: EVENT1 TYPE REF TO CL_HTMLB_EVENT.
      EVENT1 = CL_HTMLB_MANAGER=>GET_EVENT( RUNTIME->SERVER->REQUEST ).
      TV ?= CL_HTMLB_MANAGER=>GET_DATA(
      REQUEST = RUNTIME->SERVER->REQUEST
      NAME = 'tableView'
      ID = 'pop' ).
      IF TV IS NOT INITIAL.
        DATA: TV_DATA TYPE REF TO CL_HTMLB_EVENT_TABLEVIEW.
        TV_DATA = TV->DATA.
        IF TV_DATA->SELECTEDROWINDEX IS NOT INITIAL.
          DATA: ROW LIKE LINE OF APPL->ITAB.
          READ TABLE APPL->ITAB INDEX TV_DATA->SELECTEDROWINDEX INTO ROW.
          DATA VALUE TYPE STRING.
          APPL->CONNID = ROW-CONNID.
        ENDIF.
      ENDIF.
    Hope this will solve your problem.
    Raja T

Maybe you are looking for

  • Field with predefined values (F4 field) in sales order

    My customer needs to enter data in sales order and then filter/sort on it in VA04/VA05 and currently uses field "Name" in the header but this is is text field and errors occur. Is there another field, where list of values can be predefined (field wit

  • Link to bookmark in MS Word baggage file

    [RoboHelp 9] I'm sure this must have come up before but I haven't found it. I have bookmarks in a Word document, and that document is a baggage file in the current project. How do I insert a hyperlink in my topic that opens the Word doc at a bookmark

  • Index/Welcome page not coming up??

    Greetings - I am just getting things switched over from Windoze to our new iMac, and I finally figured out how to get my old web pages into iWeb for updating and publishing. I am able to get the site published to a folder (I'm not using .mac) and the

  • Xorg.conf for a dualhead setup with an ATI/AMD graphic card

    Hello Guys first I would mention that I've searched for a solution but I've not found one now back to the problem. I would configure my system so that I can work with two displays like Xinerama. But when I use $ startx then my two monitors have a whi

  • URL iview issue for intranet sites

    Hi Guys, I am creating a simple url iview for one of our Sharepoint site. when I preview the iview it works fine. but when I assign it to some Role, it doesn't load. "Page cann't be displayed" error comes. Some prefix with the text  "res://ieframe.dl