Highlight field when the table row is selected

I have a table view with a couple of lines in there. such a line has a white and gray text. now, when I select the line, the background turns blue to indicate the selection. the problem is that can not read the grey-blue text correctly. you have an idea on how to change the color when this specific line is selected? I need somehow to be able to receive the event in my implementation of custom label to react accordingly on the selection within my method of painting. Thanks, remo

well, the thing is a little naughty...

It takes extends a TableController and overwrite the navigationMovement (...) method that acts as an event listener.

Then you can get the fields and the model of line data and access.

int rowNr = (getView()) .getRowNumberWithFocus () (TableView);

Model DataTemplate = (getView()) .getDataTemplate (rowNr) (TableView);

Scope of fields [] = template.getDataFields (rowNr + 1); I want to get the next line!

Tags: BlackBerry Developers

Similar Questions

  • Fill in the fields when the check box is selected

    I have a simple question...

    I have a simple form, which requires the user to enter a shipping address and a billing address. I added a checkbox, I want to complete the address fields expedition with the billing address fields if they are identical. This is so that the user has to type two times. You've seen this in a lot of shopping cart checkout systems.

    I don't know anything about scripts in LiveCycle, but I think you can use Javascript? I am somewhat familiar with it, but not enough to achieve this. Can someone help me with this? I would appreciate.

    I realize there are some people older solutions to this problem on other threads, but the links are broken, and nothing has worked.

    I have attached the PDF in question.

    Thank you

    Here you go... .the code is located on the change event of the checkbox.

    Paul

  • I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    Mr President.

    I create a form based on two tables that have sequences also. When I create insert only row is inserted in the fields in table first and second fields of the table are empty. Why?

    formdoubletables.png

    the page source is

    <?xml version='1.0' encoding='UTF-8'?>
    <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                    xmlns:f="http://java.sun.com/jsf/core">
      <af:panelFormLayout id="pfl1">
        <af:group id="Group">
          <af:inputText value="#{bindings.VoucherId.inputValue}" label="#{bindings.VoucherId.hints.label}"
                        required="#{bindings.VoucherId.hints.mandatory}" columns="#{bindings.VoucherId.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId.hints.precision}"
                        shortDesc="#{bindings.VoucherId.hints.tooltip}" id="it1">
            <f:validator binding="#{bindings.VoucherId.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId.format}"/>
          </af:inputText>
          <af:inputDate value="#{bindings.VoucherDate.inputValue}" label="#{bindings.VoucherDate.hints.label}"
                        required="#{bindings.VoucherDate.hints.mandatory}"
                        columns="#{bindings.VoucherDate.hints.displayWidth}"
                        shortDesc="#{bindings.VoucherDate.hints.tooltip}" id="id1">
            <f:validator binding="#{bindings.VoucherDate.validator}"/>
            <af:convertDateTime pattern="#{bindings.VoucherDate.format}"/>
          </af:inputDate>
          <af:inputText value="#{bindings.Credit.inputValue}" label="#{bindings.Credit.hints.label}"
                        required="#{bindings.Credit.hints.mandatory}" columns="#{bindings.Credit.hints.displayWidth}"
                        maximumLength="#{bindings.Credit.hints.precision}" shortDesc="#{bindings.Credit.hints.tooltip}"
                        id="it2">
            <f:validator binding="#{bindings.Credit.validator}"/>
          </af:inputText>
        </af:group>
        <af:group id="g1">
          <af:inputText value="#{bindings.Lineitem.inputValue}" label="#{bindings.Lineitem.hints.label}"
                        required="#{bindings.Lineitem.hints.mandatory}" columns="#{bindings.Lineitem.hints.displayWidth}"
                        maximumLength="#{bindings.Lineitem.hints.precision}" shortDesc="#{bindings.Lineitem.hints.tooltip}"
                        id="it3">
            <f:validator binding="#{bindings.Lineitem.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Lineitem.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.VoucherId1.inputValue}" label="#{bindings.VoucherId1.hints.label}"
                        required="#{bindings.VoucherId1.hints.mandatory}"
                        columns="#{bindings.VoucherId1.hints.displayWidth}"
                        maximumLength="#{bindings.VoucherId1.hints.precision}"
                        shortDesc="#{bindings.VoucherId1.hints.tooltip}" id="it4">
            <f:validator binding="#{bindings.VoucherId1.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.VoucherId1.format}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Debit.inputValue}" label="#{bindings.Debit.hints.label}"
                        required="#{bindings.Debit.hints.mandatory}" columns="#{bindings.Debit.hints.displayWidth}"
                        maximumLength="#{bindings.Debit.hints.precision}" shortDesc="#{bindings.Debit.hints.tooltip}"
                        id="it5">
            <f:validator binding="#{bindings.Debit.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Credit1.inputValue}" label="#{bindings.Credit1.hints.label}"
                        required="#{bindings.Credit1.hints.mandatory}" columns="#{bindings.Credit1.hints.displayWidth}"
                        maximumLength="#{bindings.Credit1.hints.precision}" shortDesc="#{bindings.Credit1.hints.tooltip}"
                        id="it6">
            <f:validator binding="#{bindings.Credit1.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Particulars.inputValue}" label="#{bindings.Particulars.hints.label}"
                        required="#{bindings.Particulars.hints.mandatory}"
                        columns="#{bindings.Particulars.hints.displayWidth}"
                        maximumLength="#{bindings.Particulars.hints.precision}"
                        shortDesc="#{bindings.Particulars.hints.tooltip}" id="it7">
            <f:validator binding="#{bindings.Particulars.validator}"/>
          </af:inputText>
          <af:inputText value="#{bindings.Amount.inputValue}" label="#{bindings.Amount.hints.label}"
                        required="#{bindings.Amount.hints.mandatory}" columns="#{bindings.Amount.hints.displayWidth}"
                        maximumLength="#{bindings.Amount.hints.precision}" shortDesc="#{bindings.Amount.hints.tooltip}"
                        id="it8">
            <f:validator binding="#{bindings.Amount.validator}"/>
            <af:convertNumber groupingUsed="false" pattern="#{bindings.Amount.format}"/>
          </af:inputText>
        </af:group>
        <f:facet name="footer">
          <af:button text="Submit" id="b1"/>
          <af:button actionListener="#{bindings.CreateInsert.execute}" text="CreateInsert"
                     disabled="#{!bindings.CreateInsert.enabled}" id="b2"/>     
          <af:button actionListener="#{bindings.Commit.execute}" text="Commit" disabled="#{!bindings.Commit.enabled}"
                     id="b3"/>
          <af:button actionListener="#{bindings.Rollback.execute}" text="Rollback" disabled="#{!bindings.Rollback.enabled}"
                     immediate="true" id="b4">
            <af:resetActionListener/>
          </af:button>
        </f:facet>
      </af:panelFormLayout>
    </ui:composition>
    
    
    
    

    Concerning

    Go to your VO Wizard, select the tab of the entity and to check if both the EO is editable or not.

    See you soon

    AJ

  • How to add two lines when the second row is not visible, but also gets the first data line too?

    Mr President

    Jdev worm is 12.2.1

    How to add two lines when the second row is not visible, but also gets the first data line too?

    I want to add two lines like below picture, but want the second to remain invisible.

    tworows.png

    I asked this question but my way of asking was wrong, that's why for me once again.

    Concerning

    Try to follow these steps:

    1. in the database table to add the new column "JOIN_COLUMN" and add the new sequence "JOIN_SEQ".

    2. Add this new column in the entity object. (You can add this in entity object by right clicking on the entity object and then select "Synchronize with database" then the new column and press on sync)

    3. in your bookmark create button to create only one line NOT 2 rows.

    4 - Open the object entity--> java--> java class--> on the entity object class generate and Tick tick on the accessors and methods of data manipulation

    5 - Open the generated class to EntityImpl and go to the doDML method and write this code

      protected void doDML(int operation, TransactionEvent e)
      {
        if(operation == DML_INSERT)
        {
          SequenceImpl seq = new SequenceImpl("JOIN_SEQ", getDBTransaction());
          oracle.jbo.domain.Number seqValue = seq.getSequenceNumber();
          setJoinColumn(seqValue);
          insertSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        if(operation == DML_UPDATE)
        {
          updateSecondRowInDatabase(getAttribute1(), getAttribute2(), getAttribute3(), getJoinColumn());
        }
    
        super.doDML(operation, e);
      }
    
      private void insertSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "Insert into table_name (COLUMN_1,COLUMN_2,COLUMN_3,JOIN_COLUMN, HIDDEN_COLUMN) values ('" + value1 + "','" + value2 + "','" + value3 + "','" + joinColumn + "', 1)";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
      private void updateSecondRowInDatabase(Object value1, Object value2, Object value3, Object joinColumn)
      {
        PreparedStatement stat = null;
        try
        {
          String sql = "update table_name set column_1='" + value1 + "', column_2='" + value2 + "', column_3='" + value3 + "' where JOIN_COLUMN='" + joinColumn + "'";
          stat = getDBTransaction().createPreparedStatement(sql, 1);
          stat.executeUpdate();
        }
        catch (Exception e)
        {
          e.printStackTrace();
        }
        finally
        {
          try
          {
            stat.close();
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
        }
      }
    
  • Erase all the data of the table row

    Is there a small script to make all fields in the same row (whiteboard) null? I want to erase all the data when this row is deleted.

    Hello

    This JavaScript function will reset all the fields in the line taken in;

    function clear (row)

    {

    var resetList = [];

    fields var = row.resolveNodes ("#field [*]");

    for (var i = 0; i)< fields.length;="">

    {

    resetList.push (fields.item (i) .somExpression);

    }

    xfa.host.resetData (resetList.join(","));

    }

    So to remove all data from the second line we could call him for help;

    Clear (xfa.resolveNode("Table1.Row[1]"));

    Hope that helps

    Bruce

  • Change the font color in the field when the checkbox is enabled

    I have a form that contains two (2) text fields that must have the font color changes from black to red when a check box is selected. This would also work if the fill color changes to red when the check box is selected.

    If we have a named checkbox: checkbox and export value: Yes

    and a textbox named: text

    Paste this code in the mouse box event

    -beginning of code-

    checkbox var = this.getField ("checkbox");

    textField var = this.getField ("text");

    If (checkbox.value is 'Yes')

    {

    textField.fillColor = color.red;

    } else

    {

    textField.fillColor = color.white;

    }

    //---------------code End-----------------

  • skin of the ADF, stationary of the table row

    Hello

    I'm having confussion with adf-stripping.
    I can effect hover so the user each time a row in a table in a hover, it will change the background color of the line?
    Should what class I use in my css?
    I tried with af | : the table-row data: highlighted, af | : data of the table-row: hover...

    If there is anyone who knows the link where I can download an adf-skin model then she also be very useful to me...

    Best regards.

    Hello

    I found this in the forum. It works for you?

    Re: Comment on the blog of Frank added effect hover at table

    AF | table: content TR:hover {background-color: InfoBackground ;}}
    AF | table: content TR:hover TD {background-color: transparent ;}}

    concerning
    Peter

  • Select the fields in the table based on the selection + valueChangeListener

    I have an af:table with selectonebooleanbox and some entry box.

    Once selected through the box of selectoneboolean lines I want to activate the input box that is initially disabled.

    I have a property called isEnabled is related to the inputBox like this

    < af:inputText value = "#{row.quantity}" disabled = "#{row.isEditable}" > "

    ValuechangeListener I can set this property to false so that the field becomes editable, but the table or list of the tobe table should refresh on the selection of each selectOneBoolean.

    Any poniters how to do this?

    JDeveloper 11.1.4 and jsf pure application (adf as display technology)

    JSF code:

    < af:table value = "#{createOpportunity.dataList}" var = 'row' "
    rowBandingInterval = binding = "#{demo.t1 '0'}" id = "t21" > "
    < af:column headerText = "Model" >
    < af:selectBooleanCheckbox text = "#{row.modelRange} '"
    Label = "Label 1"id = "sbc1" value ="#{row.selected}".
    valueChangeListener = "#{createOpportunity.enableEditing}" / >
    < / af:column >
    < af:column headerText = "Description" >
    < af:outputText value = "#{row.description}" / >
    < / af:column >


    < af:column >
    < af:inputText value = "#{row.quantity}" disabled = "#{row.isEditable}" > "
    < af:convertNumber type = "number" integerOnly = "true" / >
    < / af:inputText >
    < / af:column >
    < / af:table >

    Screw the bean code

    {} public void enableEditing (ValueChangeEvent valueChangeEvent)

    for (dataItem ModelDescription: dataList) {}
    If (dataItem.isSelected ()) {}
    dataItem.setIsEditable (true);
    }
    }
    }


    Thnks.

    Published by: Wannabe Java Guru on March 9, 2011 03:04

    Published by: Wannabe Java Guru on March 9, 2011 05:12

    Add the code snippet in the value change listener and see if help to:

    valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ());

    That is to say

    {} public void enableEditing (ValueChangeEvent valueChangeEvent)
    valueChangeEvent.getComponent () .processUpdates (FacesContext.getCurrentInstance ());
    System.out.println ("in enableEditing");
    selectedDataList = new ArrayList ();
    for (dataItem ModelDescription: dataList) {}
    If (dataItem.isSelected ()) {}
    dataItem.setIsEditable (true);
    }
    }
    }

    Thank you
    Nini

  • Hide text in the field when the drop-down list is selected

    Hello, I am looking for a way to hide text in a text field when a number is from a drop-down list. For example, I have a table with text field that have a line pre-populated text in them. I would like the text to be deleted if 'Yes' is selected in a data entry drop-down list in the text box empty now.   Here's what I have so far:

    If (this.rawValue == 'Yes') {SubStandard_A.StandardPkgTbl.Row1.TextField2.rawValue == ' ' ;}}

    I tried .rawValue == "", .rawValue == null, .clearItems

    Any help is greatly appreciated!

    Hello

    Just spotted your original script had a double == when assigning the value to the rawValue. You must use the double == equality test.

    Here is a sample.

    We hope that make you it work.

    Niall

  • Total of a column when the check box is selected in table form

    Hi all

    Total of a column when the checkbox is enabled in the form of tables, but is not work, help

    https://Apex.Oracle.com/pls/Apex/f?p=82062

    My credentials for my worksapce:

    https://Apex.Oracle.com/pls/apex/

    Workspace: GB

    USERNAE: [email protected]

    PASSWORD; GB

    Thank you.

    abb.JPG

    abcd.JPG

    abcde.JPG

    Kind regards

    GB

    Hi user13028844,

    user13028844 wrote:

    Please change your login username of "user13028844" to something meaningful. Reference: Video tutorial how to change username available

    The second button is a javascript function call, which is not a summary. the javascript function has a problem

    This function has the problem help me correct, whereas we can summarize the amount of lines checked

    I have made changes to your page. Check the "Display of Javascript" button, now it shows the correct amount for active items.

    Made the following changes:

    • The following are removed from the section "run when Page Loads:
    Declare
      p_qty          number;
      p_total_qty    number := 0 ;
    Begin
    for i in 1..APEX_APPLICATION.G_F01.COUNT LOOP
      select nvl(qty,0) qty into p_qty from DURATION
        where id = to_number(APEX_APPLICATION.G_F01(i));
       p_total_qty := p_total_qty + p_qty;
    end loop;
        --htp.prn(p_total_qty);
    htp.prn('');
    apex_application.g_print_success_message := 'Checked total qty:'||p_total_qty  ;
    End;
    

    NOTE: The section "run when Page Loads" is intended for JavaScript code to perform the loading of the Page and NOT PL/SQL code.

    • The following code removed from the section "Header HTML":
    
    

    This code was going nowhere, so removed and replaced with code below.

    • Added the following code in the section "function and Global Variable declaration:
    function enableButton() {
        // code goes here
    }
    
    function total_checked() {
       var total = 0; var qty = 0;
       $( 'input[name="f01"]' ).each(function() {
         if ( $(this).is(':checked') ){
           qty = $(this).closest('tr').find('td[headers="quantity"]').text();
           total += parseFloat(qty);
         }
       });
       alert("Checked Total Quantity : " + total);
    }
    

    Your APEX_ITEM. BOX calls a JS "enableButton" function, but it has no definition, dummy definition so added.

    Kind regards

    Kiran

  • How to make a table header row to repeat when the table extends to another page?

    I have a table that breaks (spans) on another page.  I want that line of table headers to repeat (as in Word).

    If the header line is a true header row, it repeats automatically.

    To add a header row:

    1. On the table menu, select add rows or columns.
    2. Select Add 1 rank.
    3. Select this option for the title.
    4. Click on Add.
    5. Remove the false header line.
  • Highlight cell when the value is different from the value of the cell in the next row.

    I have a requirement for a table (af:table, not a DB table), in cases where a cell value differs from the value in the row slot, the cell must be highlighted to indicate.

    the entire line can not be highlighted, only the cells with differences. For example, if the table contains data:
    90111    $1000    Widget
    90111    $1000    Cart
    The cell containing the value 'Widget' in the first row must be highlighted, other cells get no highlighting.

    The data comes from a DB, through VO table based on an OA.

    Is it possible to do this in the ADF (11g)?

    Thank you-
    -george

    There is no declarative way to do what the rows of the table are marked. This means that there is no way to access a value as a (+ 1) .attributename
    Here's a few codes. Check http://lucbors.blogspot.de/2012/02/adf-11g-fancy-master-detail-or-how-to.html and http://lucbors.blogspot.de/2012/02/adf-11g-even-fancier-multi-master-multi.html that might help you to implement your case.

    Timo

  • addInstance does not work when the table has no rows

    I am trying to add a line to an empty table (no line) and it seems that addInstance does not work.

    table. Row. instanceManager.addInstance (1);

    Is there a different syntex if the table has no line?

    Thank you

    Try to use the shortcut to underscore for the instance Manager, it allows you to get items that do not yet exist.

    Then

    table.row.instanceManager.addInstance (1);

    becomes

    table._Row.addInstance (1);

  • * URGENT * how to turn the table rows programmatically?

    Hi Experts ADF,

    I am a developer of the ADF, but not an expert. Here is my requirement, please help me to achieve the same. It is very urgent and would be a great help.

    In our ADF Faces application, we have a SEARCH page where we assume to design a table with 3 rows and 2 columns. While the search page is loading only the first line must be activated and the other below 2 rows should be disabled (can be visible, but gradout). In the first column of each row is a box of choice (which will be rated Firstname, lastname, Department,... UserID) and the next column is a free text box (input field).

    Ex: In the first row when we select Firstname and enter the value in the free text box, then the second row should be activated when we tab out of the text box line. If the top textbox is empty then the second row should not be enabled. When I get the value in the text field of the line of the 2nd and the 3rd row must be enabled. Max 3 lines. All 3 rows may be visible on the page, but the last 2 rows should be gradout.

    How to do the same, please help me with a little explanation. Do I have to use the ADF PPR to do the same, if so, how do the same? Thanks in advance.

    Thank you
    klogube

    Sorry, it took a little time :-(

    I implemented a small example, if you get the picture...

    Page code:

    
               
                  
                    
                  
                  
                    
                  
                  
                    
                  
                
    

    Bean code:

    public class IPTBean
    {
        String mS1;
        String mS2;
    
        public IPTBean()
        {
            super();
        }
    
        public void setS1(String aS1)
        {
            this.mS1 = aS1;
        }
    
        public String getS1()
        {
            return mS1;
        }
    
        public void setS2(String aS2)
        {
            this.mS2 = aS2;
        }
    
        public String getS2()
        {
            return mS2;
        }
    }
    

    I put the bean in the flowrate range of page (but you can use any variable you like i.e. links)

    When you run the page, you see a tabled text input and a button. Type something in the files and hit return or the tab out of the field and you see the next filed.

    Now you can use this technique to hide and show your user interface.

    Timo

  • How to disable the warning of validation on the calculation (read-only) field in the table

    Is it possible to add a line in a calculation script (JavaScript) that prevents a dialog box of a calculation field validation?

    Scenario:

    • Working with fields in a table inserted.
    • In each line, I have a couple of fields that the user has entered. These fields have a Validation model has allowed that the user must enter the data correctly.
    • There is a calculated field based on the data entered by the users. It is this field that throws a warning dialog box "the value entered for Total_Row1 is not valid. "To ignore the validations for Total_Row1, click on ignore.

    Even if I turn off the Model Validation on fields used for the calculation of the warning dialog box always appears. So, it seems to be isolated in the field of computing.

    The calculation area displays the time and I got it originally set as a Date/time field, but also tried to use a text field (as the calculation should appear as 0:45 for 45 minutes in this area).

    I have a suspicion that the warning appears only because I used an array for formatting fields, as I used similar validation profiles and other calculation fields and see not the message when the fields do not appear inside the table.

    I think of easier workaround would be to disable validation for this particular calculation field, but I have no idea how the script that. Any help appreciated lot.

    CARI

    I discovered the problem.  In a word: it was a mistake by naming the fields.

    • I have fields named with line numbers in the field name (for example FieldName_Row1).
    • and fields calls with FieldName_Row1.formattedVallue must have triggered some confusion.

    As soon as I removed the word 'Row' of file names, the question of the warning dialog validation mystery Adobe Acrobat for the calculation field have disappeared.

    Ago about 3-4 hours of my life that I won't be back... ha - ha but if someone else has the problem, I thought I better share my discoveries

Maybe you are looking for