Dynamically changing name of JPA Table via @Table(name=..)

In my application I need to change dynamically the name of a table to create, which is annotated
via @Table(name="MyTable")
The problem is that the application handled all tables with an internal prefix so that MyTable would
be changed to something like "application1_MyTable". In xml mappings it is possible by injecting
a modified version of the xml mapping content, in plain jdbc only dynamic statements must be used
for this kind of renaming. But how can I achive this with (immutable) annotations?

Serethos_0 wrote:
No, I'm betting that you really don't.
Sounds like a very bad design.
I'd be shocked if you could manage to give a good, coherent reason beyond "because I said so".There is always a trap which can force you to support a bad design despite better knowledge:Or, if you're really smart, refactor the trap out of existence.
legacy issues. Depending on the project an old chunk of application code lets you only change
design to a certain degree (based on time, effort, dependencies to other systems). In my case
there is a need to keep the distinction of tables by a dynamic prefix.I'll agree that I might not understand fully. Why not temporary tables or materialized views? Is your idea the only way to accomplish this?
%

Similar Messages

  • Dynamically change the Priority Group of Logical Table Sources in OBIEE 11g

    Hi All,
    I have 2 Logical Table Sources(LTS 1 and LTS 2 for a Logical Table in BMM Layer).
    Example: Logical Table : Sample
    LTS Source 1 : Sample 1(Priority Group Set to 1)
    LTS Source 2 : Sample 2(Priority Group Set to 0)
    I have set the Priority Group of Sample 1 LTS Source to 1 and Priority Group of Sample 2 LTS Source to 0.
    I need to dynamically change the Priority Group of Sample 1 LTS Source to 0 if my role is DEVELOPER where role is a column in database.
    If my role is not equal to DEVELOPER then the Priority Group of Sample 1 LTS Source will remain same(1).
    Please suggest how can i achieve this.
    Thanks,
    Soukath Ali

    hello Soukath Ali,
    didi you find a way to dinamically changing Priority Group?
    thanks,
    Maria Teresa Marchetti

  • Dynamically changing row color in an ADF table?

    Hi,
    I am using Build JDEVADF_11.1.1.3.PS2_GENERIC_100408.2356.5660. Can anyone please let me know the code for dynamically changing the row color of an ADF table?
    Thanks,
    Vik

    well you can use EL on af:column inlineStyle property to change the color on condition
    e.g
    inlineStyle='#{(row.SelectedRow)?"background-color: Silver":""};a example can be found here it is changing color based on Checkbox selection http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html

  • Dynamically change the cell editor in the table control

    Hi..
         I have 3 columns in a table . of which in one column we need to change the cell editor dynamically at runtime.
    i.e for example i have  columns as carrid, connid and fldate.
    For the first 2 rows the cell editor for the carrid  clomn shud be a dropdown and from there on in the next rows for the same  carrid column it shud be a input field.
    Can experts plz help me how to achieve this as this is very high priority issue....
    Regards,
    Madhu...

    This is actaully fairly simple to do.  You will need to add a cellVariant to your table column. You can then dataBind a context attribute to the selectedCellVariant property of the column to control which cellVariant will be used. This allows you to control row-by-row which cell editor you want to output.
    http://help.sap.com/saphelp_nw70/helpdata/EN/bd/5d9041d3c72e7be10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/56/5e9041d3c72e7be10000000a1550b0/frameset.htm
    Also here is an example that I did the other day that uses Cell Variants within ALV.  This process is actually a little more complicated because you have to go through the ALV APIs.  To do this in a normal table is actually easier because you can create the cellVariant in the layout designer.
    Re: Freely-programmed value help for a single ALV cell

  • Populating custom tables via Table Events.

    Hi  ,
    I have a ztable having the following fields:
    MANDT
    FAREA
    REVID
    NAME
    EMAIL
    Out of this fields I need to populate the field REVID  and EMAIL from two standard table USR21 and ADR6.
    Like if I  enter user id and hit enter  tab, then the fields like  email address will automatically be fetched from given tables and populated
    I found that via tablemaintenance --> events this can be done.
    Can you please suggest as to how to proceed with the coding...do I have to use Select from those standard tables and then pass it to the ztable.
    Please help.
    Thanks,
    Suchi.

    I have created  a event via the table maintenance generator-environment events.
    I have used 05-- create new entry as the event code and inserted the following code :
    FORM zat_newentry.
      TYPES : BEGIN OF ty_requester,
              bname      TYPE usr21-bname ,
              persnumber TYPE usr21-persnumber,
              addrnumber TYPE usr21-addrnumber,
              END OF ty_requester,
              BEGIN OF ty_addreq,
              persnumber TYPE adr6-persnumber,
              addrnumber TYPE adr6-addrnumber,
              smtp_addr TYPE adr6-smtp_addr,
              END OF ty_addreq.
      DATA : i_requester TYPE STANDARD TABLE OF ty_requester WITH HEADER LINE,
             i_addreq TYPE STANDARD TABLE OF ty_addreq WITH HEADER LINE.
      SELECT bname
             persnumber
             addrnumber
             FROM usr21
        INTO TABLE i_requester
        WHERE bname = zinf_reviewer-rev.
      IF i_requester[] IS NOT INITIAL.
        SELECT persnumber
               addrnumber
               smtp_addr
               FROM adr6
               INTO TABLE i_addreq
               FOR ALL ENTRIES IN i_requester
               WHERE persnumber = i_requester-persnumber
               AND addrnumber = i_requester-addrnumber .
      ENDIF.
      zinf_reviewer-rev = i_requester-bname.
      zinf_reviewer-email = i_addreq-smtp_addr.
    endform.
    But while trying to create a new entry I am getting the error message saying : "An entry with the key already exists".
    Please suggest.

  • Block sensitive table via Table browser

    Hello
    We have implemented HCM on out existing R/3 and now we have all the sensitive data in the production.
    In my production system there are some users who has SE16(data browser) and thet can dump those sensitive data from the production system.
    I want to restrict those sensitive data for non HR users.Can any one guide me that how to do.I have some small idea this can be done trough authorization object.(S_TABU_DIS)
    Pls provide me step by step procedure guide for this.I am totally new to SAP Basis and pls provide me the procedure doc if u have.
    Thanks
    Roshantha

    am not a basis guy but creating an authroization object and restricint it via profile would do the trick. pls check it....u can restrict at table level only for the users and not at data level

  • Calculations while entering data into table via table maintenance generator

    Hi all,
    This is the following requirement.
    I created a ztable and also I created the table maintenance generator.  I have two fields which accept integer data.
    The requirement is when I enter value in the first field from the tcode SM30 the data should be populated into the second field automatically by subtracting the first value from 100.
    Can anyone explain me how I can do that.
    Thanks,
    Daniel

    hi,
    take the help of events in TMG and write the code in that event
    like field2 = field1 - 100
    steps to create events
    Step: 1: Create a table
    Step: 2: In SE11, go to Utilities --> table maintenance generator.
    Step: 3: Follow the path Environment --> Modification --> Events.
    Step: 4: Click new entries, select a table maintenance dialog event which suits your requirement.
    Step: 5: Create a form routine.
    Step: 6: Include your logic in the routine created in step 5.
    Hope this helps you.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
    Re: bdc
    reward if helpful
    prasanth

  • Strange data inserted into table via table trigger

    Hi ,
    There is some strange phenomenon happen occasionally where some tables update records will have a TRIGGER to insert records into a table and once in a while, the record has some strange data inserted which looks like a memory corruption. It is running on 10.2.0.3.
    Does anyone ever encounter this before?
    Strange result:
    PRIM_KEY
    -3.614364951000000000000000000000000E-47
    -3.614364951000000000000000000000000E-47
    Normal result:
    PRIM_KEY
    1137KT
    1137KT
    ana

    Hi,
    What is strange in this? Its not memory corruption. Its just one of the numeric form of representation of number
    -3.614364951000000000000000000000000E-47it means -3.614364951 * 10 to the power of -47.
    Whatever value has been entered into the table depends on your business logic you coded, and user input.
    Regards

  • How can I dynamically change group field column?

    Hello!
    I need to group data and create group totals for that table. Is
    it possible to dynamically change group field column for
    specific table, depending on data retreived from parameter form?
    Thanks,
    Mario.

    quote:
    Originally posted by:
    ljonny18
    Hi,
    I am using a grid within a component in my Flex application.
    I have an XML dataProvider, and I want to change the row
    colour of my Grid depending on a value coming form my dataProvider
    – but I cant seem to get this to work :(
    can anyone help / advise me on how I can dynamically change the
    colour of my grid row depending on a value coming from my XML
    DataProvider????
    Thanks,
    Jon.
    Hi,
    a few hours ago I stumbled across this cookbook entry - it
    didn't solve MY problem, but maybe it provides a way to solve your
    problem?
    http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&postId=61&product Id=2&loc=en_US
    From the article:
    quote:
    Changing the background color of a DataGrid cell is not as
    simple as changing some style because the default renderer for a
    DataGrid cell does not have a backgroundColor. Therefore, to do
    this simple task, you have to create a custom itemRenderer where
    you draw your own background in the updateDisplayList function.
    HTH
    Uwe

  • Dynamically change table selecting from

    in 3.2 on 11g database is there a way to dynamically change the table used in a select statement for an interactive report? I have a series of similar tables, one for each month of the year. I want to click a month on one page and bring up a report from the table for that month. I want to use one page for this report and have all links from previous page link to the same page, just different result based on what month was clicked.
    I know I could just setup 12 different reports and conditionally display each region based on a value passed to the that page, but I'd prefer to only create one page & one report on that page.
    Thanks for any ideas or solutions.

    Your function will have the code dynamically built.. What you do is you build your sql and pass in the table name and any other items that will change based upon your requirements..
    here is an example...
    function inventory_report (p_State IN VARCHAR2) RETURN VARCHAR2 IS
    declare
      q varchar2(4000);
    begin
      q:='   select p.category, ';
      q:=q||'       p.product_name, ';
      q:=q||'       p.quantity, ';
      q:=q||'       p.unit_price '; 
    -- Here is where we substitute the passed in state name for the data table we extract data from
      q:=q||'  from ' || V('p_State') || ' p, ';
      q:=q||' where p.product_quantity > 0 ';
      return q;
    end;Thank you,
    Tony Miller
    Webster, TX

  • Dynamic Creation of cells or change of cell behaviour of a table at runtime

    Hello all,
    Can anybody tell me how can we change the cell behaviour of a table at runtime or creating the table row with different cell properties dynamically at runtime in ABAP webdynpro.
    for ex the table at runtime can be like...
    The 1st row the 1st cell can be a check box.
    The 2nd row the 1st cell can be a input field.
    The 3rd row the 1st cell can be a radio selection field.
    Business Ex : Dynamic Attributes in BID Invitation
    Thanks in advance in clarifying the doubt.

    Hi Mani,
    You could use code similar to the following code in your WDDOMODIFY method of the view in which the table is placed.
    data wd_table_cell_editor type ref to cl_Wd_view_element.
      data wd_table_column      type ref to cl_wd_table_column.
    wd_table_cell_editor ?= view->get_element( ID ). (Or any other way to get the refernce to the table cell editor)
    wd_table_column ?= wd_table_cell_editor->get__parent( ).
    (Get a refernce to table column throught table cell editor or directly)
    Now use the set_cell_editor method of wd_table_column to set the column to check box or input or any other field of your requirement.
    Also, I suggest you to use ALV as it is simpler change the cell editor and it provides many other improved functionalities.
    Regards,
    Srini.

  • How to Sort Dimension in Pivot Table via Order Column which is changing like Factual values

    Hi,
    Recently in of our product offerings we got stuck on this following question:
    How to Sort Dimension based on the Order Value which Keeps Changing with Factual Values??
    We have a data source laid out as (example)
    In the above the “Order” columns are changing per
    Company/(DimensionA) for DimesnsionB.
    Instead what we want is: (But only if we can get the following result without putting the “Order” Column in the “Values” Section. 
    If there are any configurations that we can make to our power pivot model for the similar data set so that the
    DimesnionB in this case can be sorted by the Order column, would be greatly helpful to us. 
    Sample File:
    http://tms.managility.com.au/query_example.xlsx
    Thanks
    Amol 

    Hi Amol,
    According to your description, you need to sort dimension members in Pivot Table via order column, and you don't want the order column show on the Pivot table, right?
    Based on my research, we can sort the data on the Pivot table based on one of the columns in that table, and we cannot sort the data based on the columns that not existed on the Pivot table. So in your scenario, to achieve your requirement, you can
    add the column to pivot table and hide it.
    https://support.office.com/en-gb/article/Sort-data-in-a-PivotTable-or-a-PivotChart-report-49efc50a-c8d9-4d34-a254-632794ff1e6e
    Regards,
    Charlie Liao
    TechNet Community Support

  • Dynamically changing internal table in 'gui_download'

    Hi Experts,
                     i have to download 4 internal tables, each with different structures, to the presentation server using 'gui_download', based on which radio-button is selected in the selection screen. I am hoping to use a single 'form' and 4 'perform' calls. how can I dynamically change the tables in the 'gui_download' function modules.
    plz help.....................

    Hi ,
    Build the field catalog dynamically based on the internal table structure based on the radio button selected.Use the dynamic internal table generated from the filedcatalog and use in GUI_DOWNLOAD.
    See the below code:
    *& Report  ZRAJESH02
    REPORT  zrajesh02.
    Dynamic internal table
    TYPE-POOLS: slis.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                  <dyn_wa>.
    DATA: alv_fldcat TYPE slis_t_fieldcat_alv,
          it_fldcat TYPE lvc_t_fcat.
    DATA: lv_monate TYPE f,
          lv_months TYPE i,
          lv_date TYPE sy-datum,
          p_check1 type n value '1'.
    lv_date = sy-datum + 360.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_check TYPE c.
    SELECTION-SCREEN END OF BLOCK b1.
    START-OF-SELECTION.
      CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
        EXPORTING
          i_datum_bis   = lv_date
          i_datum_von   = sy-datum
          i_kz_incl_bis = ' '
        IMPORTING
          e_monate      = lv_monate.
      lv_months = lv_monate.
      PERFORM f_fcat USING 'AUFNR' 'CHAR' '12'.
      PERFORM f_fcat USING 'POSNR' 'CHAR' '06'.
      while p_check1 LE p_check.
      PERFORM f_fcat USING p_check1 'CHAR' '1'.
      p_check1 = p_check1 + 1.
      endwhile.
      PERFORM build_dyn_itab.
      LOOP AT <dyn_table> INTO <dyn_wa>.
        WRITE:/ <dyn_wa>.
      ENDLOOP.
    FORM f_fcat USING fieldname dattyp length.
      DATA:wa_it_fldcat TYPE lvc_s_fcat.
      CLEAR wa_it_fldcat.
      wa_it_fldcat-fieldname = fieldname.
      wa_it_fldcat-datatype = dattyp.
      wa_it_fldcat-intlen = length.
      APPEND wa_it_fldcat TO it_fldcat .
    ENDFORM.                    "f_fcat
    *&      Form  build_dyn_itab
          text
    FORM build_dyn_itab.
      DATA: new_table TYPE REF TO data,
      new_line TYPE REF TO data.
    wa_it_fldcat TYPE lvc_s_fcat.
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'AUFNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 12.
    APPEND wa_it_fldcat TO it_fldcat .
    CLEAR wa_it_fldcat.
    wa_it_fldcat-fieldname = 'POSNR'.
    wa_it_fldcat-datatype = 'CHAR'.
    wa_it_fldcat-intlen = 6.
    APPEND wa_it_fldcat TO it_fldcat .
    Create dynamic internal table and assign to FS
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = it_fldcat
        IMPORTING
          ep_table        = new_table.
      ASSIGN new_table->* TO <dyn_table>.
    Create dynamic work area and assign to FS
      CREATE DATA new_line LIKE LINE OF <dyn_table>.
      ASSIGN new_line->* TO <dyn_wa>.
    ENDFORM.                    "build_dyn_itab
    Thanks,
    Rajesh.

  • Is it possible to find the transaction code via table name ??

    Hi
    Can any body please let me know is it possible to find the transaction code via table name ??
    Thanks in advance
    Sesh
    Edited by: seshu_sapfico on Dec 8, 2009 12:21 PM

    Please, specify your requirement... A table could be modified by various programs which are called by numerous transactions.

  • Dynamically changing single to multiselect in Table in OAF

    Hi,
    I am trying to programmaticallychange single selection to multiple selection of Table in Controler. From UI point of view everything is replaced correctly, but when I am trying to get values of selected rows ALWAYS only the first row is returned as selected (I think it is a default value of singleselection). I have also set rendered option to false for singleselection using personalisation page. Do you know what I am doing wrong or what I should check?
    The second issue is a dialog page. As I noticed the page context (table selection values) are lost when I am using confirmation page (dialog page with yes/no option). How should I pass page context to dialog page (table multiselection)?
    Controler Code:
        public void processRequest(OAPageContext pageContext, OAWebBean webBean) {
            super.processRequest(pageContext, webBean);
            OATableBean tableBean = (OATableBean)webBean;
            tableBean.prepareForRendering(pageContext);
            // Define new table selection (multi)
            OAMultipleSelectionBean mySelection = (OAMultipleSelectionBean)createWebBean(pageContext, MULTIPLE_SELECTION_BEAN);
            mySelection.setViewUsageName("EventResultsVO1");
            mySelection.setViewAttributeName("SelectFlag");
            //String sEventSelectText = pageContext.getMessage("XLA", "XX_XLA_EVENT_SELECT", null);
            tableBean.setTableSelection(mySelection);
            /* Workaround selection works - not satisfied
                OAMessageCheckBoxBean checkboxSelection = (OAMessageCheckBoxBean)createWebBean(pageContext, OAWebBeanConstants.MESSAGE_CHECKBOX_BEAN);
                checkboxSelection.setViewUsageName("EventResultsVO1");
                checkboxSelection.setViewAttributeName("SelectFlag");
                checkboxSelection.setChecked(false);
                checkboxSelection.setLabel("Wybierz");
                tableBean.addIndexedChild(0,checkboxSelection);
             /* Workaround selection */
            // FireAction for Change Status Button
            OAFlowLayoutBean tableActionBean = (OAFlowLayoutBean)tableBean.getTableActions();
            FireAction FireActionAddGroup = new FireAction();
            FireActionAddGroup.setEvent("ChangeStatusEvent");
            // Change Status Button
            OASubmitButtonBean myButtonBean = (OASubmitButtonBean)createWebBean(pageContext, BUTTON_SUBMIT_BEAN);
            myButtonBean.setPrimaryClientAction(FireActionAddGroup);
            String sChangeStatusButton = pageContext.getMessage("XLA", "XX_XLA_CHANGE_STATUS", null);
            myButtonBean.setText(sChangeStatusButton);
            // Text Item
            OAMessagePromptBean myMessagePromptBean = (OAMessagePromptBean)createWebBean(pageContext, MESSAGE_PROMPT_BEAN);
            String sSpecifyReasonText = pageContext.getMessage("XLA", "XX_XLA_SPECIFY_REASON", null);
            myMessagePromptBean.setPrompt(sSpecifyReasonText+": ");
            myMessagePromptBean.setCSSClass("OraDataText");
            // Text Field Item
            OATextInputBean myTextInputBean = (OATextInputBean)createWebBean(pageContext, TEXT_INPUT_BEAN);
            myTextInputBean.setName("xxPrzyczynaZmianyStatusu");
            myTextInputBean.setID("xxPrzyczynaZmianyStatusu");
            myTextInputBean.setLabel("Przyczyna zmiany statusu");
            myTextInputBean.setMaximumLength(240);
            // Table Action Bean
            tableActionBean.addIndexedChild(0,myMessagePromptBean);
            tableActionBean.addIndexedChild(1,myTextInputBean);
            tableActionBean.addIndexedChild(2,myButtonBean);
        public void processFormRequest(OAPageContext pageContext, OAWebBean webBean) {
              super.processFormRequest(pageContext, webBean);
              String event = pageContext.getParameter(EVENT_PARAM);
              if (event != null && "ChangeStatusEvent".equals(event)) {
                  String statusChangeReasonField = pageContext.getParameter("xxPrzyczynaZmianyStatusu");
                  if ((statusChangeReasonField != null) && (!"".equals(statusChangeReasonField))) {
                      //Prepare Dialog Page
                      String sChangeConfirmationText = pageContext.getMessage("XLA", "XX_XLA_CHNG_CONF", null);
                      OAException message = new OAException(sChangeConfirmationText);
                      OADialogPage dialogPage = new OADialogPage(OAException.CONFIRMATION, message, null, "","");
                      dialogPage.setOkButtonItemName("ChangeSelectedYesButton");
                      dialogPage.setNoButtonItemName("ChangeSelectedNoButton");
                      dialogPage.setOkButtonToPost(true);
                      dialogPage.setNoButtonToPost(true);
                      dialogPage.setPostToCallingPage(true);
                      String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
                      String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
                      dialogPage.setOkButtonLabel(yes);
                      dialogPage.setNoButtonLabel(no);
                      //Pass changeReason argument to dialogPage
                      Hashtable formParams = new Hashtable(1);
                      formParams.put("statusChangeReasonField", statusChangeReasonField);
                      dialogPage.setFormParameters(formParams);
                      pageContext.redirectToDialogPage(dialogPage);
                  } else {
                      //ChangeReason empty
                      String sSpecifyReasonText = pageContext.getMessage("XLA", "XX_XLA_SPECIFY_REASON", null);
                      throw new OAException(sSpecifyReasonText+"!", OAException.WARNING);
              else if(pageContext.getParameter("ChangeSelectedYesButton")!=null) {
                    OAApplicationModule am = pageContext.getApplicationModule(webBean);
                    String changeReason = pageContext.getParameter("statusChangeReasonField");
                    Serializable parameters[] = {changeReason};
                    am.invokeMethod("XXchangeSelectedEvents", parameters);
                    OAException confMessage = new OAException("XLA","XX_XLA_DIALOG_MESSAGE", null, OAException.CONFIRMATION, null);
                    pageContext.putDialogMessage(confMessage);
    Application Module code:
    public class xxEventsInquiryAMImpl extends EventsInquiryAMImpl {
        /**This is the default constructor (do not remove)
        public xxEventsInquiryAMImpl() {
        /**Sample main for debugging Business Components code using the tester.
        public static void main(String[] args) {
            launchTester("pzu.oracle.apps.xla.eventsinquiry.server", /* package name */
          "xxEventsInquiryAMLocal" /* Configuration Name */);
        public void XXchangeSelectedEvents(String changeReason) {
            OAViewObject vo = (OAViewObject)getEventResultsVO1();
            EventResultsVORowImpl row = null;
            int fetchedRowCount = vo.getFetchedRowCount();
            RowSetIterator updateIter = vo.createRowSetIterator("updateIter");
            if (fetchedRowCount > 0) {
                updateIter.setRangeStart(0);
                updateIter.setRangeSize(fetchedRowCount);
                    // TEST - get number of selected rows
                    Row[] selectedRows = updateIter.getFilteredRows("SelectFlag","Y");
                    int numRows=selectedRows.length;
                for (int i = 0; i < fetchedRowCount; i++) {
                  row = (EventResultsVORowImpl)updateIter.getRowAtRangeIndex(i);
                  if (row != null && row.getSelectFlag() != null && row.getSelectFlag().equals("Y") ) {
                      Number rowEventId = (Number)row.getAttribute("EventId");
                      if (rowEventId != null) {
                          CallableStatement st = null;
                          try {
                              String stmt = "begin XX_DSP_FAH_010_API.set_no_action(:1, :2); end;";
                              //XX_DSP_FAH_010_API.set_no_action(p_event_id,p_reason,p_error_code,p_error_desc)
                              OADBTransaction tr = getOADBTransaction();
                              st = tr.createCallableStatement(stmt, 1);
                              st.setInt(1, rowEventId.intValue());
                              st.setString(2, changeReason);
                              st.close();
                              OAExceptionUtils.checkErrors(tr);
                          catch(SQLException sqle) {
                              throw OAException.wrapperException(sqle);
            updateIter.closeRowSetIterator();

    Hi,
    you can do this by surrounding the cell components (outputText, inputText, checkBox etc) with e.g. a panelLabelAndMessage component. Then on this component inlineStyle property use EL to reference a managed bean property. The managed bean property can now evaluate the check box select state. The trick part in your question is to tell upon rendering of the previous and next row that the check box in the row between has been selected. So you need to find a way to tell this. One option would be to apply logic like below
    JUCtrlHierNodeBinding currentRenderedAdfRow = ... use facesContext --> getApplication --> getExpressionFactory --> createValueExpression to create a handle to the #{row} expression
    Row rw = currentRenderedAdfRow.getRow();
    BindingContext bctx = BindingContext.getCurrent();
    BindingContainer bindings = bctx.getCurrentBindingEntries();
    DCIteratorBinding dciterator = (DCIteratorBinding ) bindings.get("Name of iterator used by table ");
    RowSetIterator rsIterator = dciterator .getRowSetIterator();
    Row prevRow = rsIterator.setCurrentRow(rw);
    int currRowIndex = rsIterator.getCurrentRowIndex();
    Row prevRow = getRowAtRangeIndex(currRowIndex-1); 
    Row nextRow = getRowAtRangeIndex(currRowIndex-1); 
    //return CSS that colors the background if the following conditions are true
    if ( ((DataType) rw.getAttribute("checkBoxAttr")) ||  ((DataType) prevRow .getAttribute("checkBoxAttr")) |  ((DataType) nextRow .getAttribute("checkBoxAttr"))){
      //color background returning CSS
    else{
      return empty string
    }I wrote this code from the top of my head, so ensure you check for null pointers (e.g. if a prev-row doesn't exist). Also consider caching of the calculation so that it doesn't need to be performed for each cell in a row but only once per row. E.g. you can save the color and the row key in a managed bean in view scope and then compare the key with this managed bean before performing the calculation
    Frank

Maybe you are looking for

  • Why can't I open picture I see in iPhoto 8?

    I imported from a CD (slides I had transferred to a CD) to iPhoto8, but when I click on the photo get an error message that "The volume cannot be found." This seems to be happening on all that I imported. What does that mean? If it helps any, I do ke

  • How to generate a new rhread for every request

    Hello, I'm trying to write a server side program that does the following, recieves a Single connection from a client, client sends a request to the server side program, the server side program sends to a third party(back end) and waits for a reply. T

  • UnsatisfiedLinkError on CallableStatement Execute

    I am using the oci client. I am making a function call to an oracle package/function that is returning a value. I am getting at the execute statement an UnsatisfiedLinkError on oracle.jdbc.oci8.OCIDBAccess.copy_value_from_binds(Native Method). I am u

  • How do I exit or eliminate the album cover screen in the music player?

    THe music app on iPhone6 has a screen with pictures of album covers of the music on the phone.  Once that screen appears how do I exit that screen to control the music?  Better eliminate that screen altogether as it seems useless.

  • Adding an effect to a sound, not the entire track

    Hey All, I am looking to simply add a effect to a single sound, not the entire track, is that possible with Logic? I am coming from pro tools, and I know I was able to do that there, I was hoping I could do the same here. Thanks so much!