Form row banding interval - style every second field (skinning)

Hello,
I have a panelFormLayout on my ADF page, and I want to style every second filed.
The problem is I can't set the styleClass statically because form fields are rendered conditionally.
In a table there is RowBandingInterval adn certain pseudoclasses.
Is there any simple solution for form?
Well, I could call some Java bean (pagePhaseListener?) to iterate over form chlidren and to apply styleClass to every second, but I wouldn't call this a simnple solution.
Maybe there's a skinning solution?
Thanks.
ADF 11.1.2.1

Not sure if this will work, but you can give it a try.
You can use an EL to set the style of each cell pointing to a bean method. Inside the bean method you can decide which style you return according to a static variable you init with 0 and increase it with every call of the method.
Timo

Similar Messages

  • Every second or third row

    a statement SELECT Column FROM Table returns all elements of Column ...
    is there any way to return only every second or every third or every ...-th element?

    I don't know about other databases, but in Oracle every row has a pseudo-column ROWNUM that you can use to do this easily. For example, every other row ought to be:
    SELECT Column FROM
    (SELECT Column, rownum i FROM Table ORDER BY somethinguseful)
    WHERE mod(i, 2) = 0

  • Formatting every second rows in Reports??

    Hi!Would like to add a shadow to every second row in Hyperion Reports. Cannot find a good solution to this since I'm using dynamic rows i.e. Children of xxxx.Does anybody have a good tip och trick on how to solve this.Thank you in advance,Erik

    Did you ever get resolution on this? I'm running into the same problem here and cannot figure it out myself.<BR><BR><BR>Thanks Much,

  • Adding every other field of two separate rows together.

    Hi,
    We're using Oracle 11.1.
    I's like to add two rows from two different queries together,
    I'd like it to look something like:
    with
    a as
    ( select 'a' q,'b' r,'c' s,'d' t,'e' u from dual),
    b as
    ( select '1' q, '2' r,'3' s,'4' t,'5' u from dual)
    select a.q, b.r, a.s, b.t, a.u from a, b;The trouble is I'm already using WITH and both the 'real queries' get their data from the progressive WITH statements already up top.
    I'd like to add every other field from each query to a result row.
    I have to use only SQL.
    Is there a way I can use UNION and combine the rows using dummy fields for the fields I don't want to use?
    Some something like
    I know this isn't right but...it sort of what I want to do.
    select * from
    ( select 'a' q,' ' r,'c' s,' ' t,'e' u from dual
    union
    select '1' q, '2' r,' ' s,'4' t,' ' u from dual);Anybody?

    Can u try using join.
    select a.q, b.r, a.s, b.t, a.u from
    (select 'a' q,'b' r,'c' s,'d' t,'e' u from dual) as a,
    ( select '1' q, '2' r,'3' s,'4' t,'5' u from dual) as b;
    This will result in a Cartesian join, but if you have a common column between a & b, then you can use it in the where clause.

  • Cursor only updates every second row

    Hello Helpful Peoples
    I have a table with a set of delivery dates, and am wanting to add a date on which a reminder flag should be raised by the system. The delivery dates are already populated and I'm wanting to add functionality where the end user can set how many days prior they are reminded.
    I've opened a cursor to retrieve all the current due dates from my source table. When I loop through this cursor and update the reminder date and reminder text, my code is only updating every second row.
    I can't work out why this code seems to skip a row every time it updates a record. Is anyone able to assist?
    declare
    v_date rep_delivery.reminderdate%type;
    v_rownum number;
    CURSOR reminder_cur
    IS
    SELECT DEL.DUEDATE
    FROM REP_DELIVERY DEL
    WHERE DEL.REP_ID = :P212_REP_ID:
    FOR UPDATE OF DEL.REMINDERDATE;
    begin
    FOR x IN reminder_cur LOOP
    FETCH reminder_cur INTO v_date;
    EXIT WHEN reminder_cur%NOTFOUND;
    v_date := v_date - to_number(:P212_REMDAYS);
    UPDATE REP_DELIVERY DEL2
    SET DEL2.REMINDERDATE = v_date
    WHERE CURRENT OF reminder_cur;
    UPDATE REP_DELIVERY DEL3
    SET DEL3.REMINDERTEXT = :P212_DESCRIPTION
    WHERE CURRENT OF reminder_cur;
    END LOOP;
    commit;
    end;

    Oolite,
    Use this code:
    DECLARE
       v_date   rep_delivery.reminderdate%TYPE;
       CURSOR reminder_cur
       IS
          SELECT        ROWID, duedate
                   FROM rep_delivery
                  WHERE rep_id = :p212_rep_id
          FOR UPDATE OF reminderdate;
    BEGIN
       FOR x IN reminder_cur
       LOOP
          v_date := x.duedate;
          v_date := v_date - TO_NUMBER (:p212_remdays);
          UPDATE rep_delivery del2
             SET del2.reminderdate = v_date,
                 del2.remindertext = :p212_description
           WHERE ROWID = x.ROWID;
       END LOOP;
       COMMIT;
    END;and it will work for you.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Create data merged document with data on every second page?

    Is it possible to create a data merged document with the variable data only on every second page?
    I have set up the pages with the variable data as a master page (on every odd page) with the text box and paragraph style all set up, and I have set 'override master page items' so the data can be placed, but InDesign seems to freeze up when I try to create the merged document?

    There should be no problem doing the merge with a two-page master and a two-page template document with fields only on one page (and off the top of my head there's no reason to move them off the master page if that's where you put them). I think the problem here is that rachrachm already has a file of 500 pages (based on another thread asking how to apply masters to every other page).
    It's potentially possible to simply place the data file (without the header row) as a text file and auto-flow through the master page frames (can't say for sure without seeing the files), or if the pages without the merge fields are the same just, remove all but the first two pages from the template and do the merge.
    As I metioned earlier, though, this is a very inefficient method of producing that sort of document. A true variable data print flow would be better (you'd need to find a commercial printer who can do it with your data file), or the home version would be to make one single page file for the static content, print 250 copies (plus a few extras, just in case), then make a single page merge template, do the merge, and print that on the back of the already printed pages, or as a separate page. It is immeasurably faster to print multiple copies of a document than it is to print a document that has multiple identical pages.

  • How to avoid submitting a page when tabular form rows are empty

    Hi,
    I have a master detail form in my application. There are 2 tables that are used Table A and Table B. Table A contains Ticket number and Table B refers to Table A through a foriegn key and Table B have columns like Date,Name, Age, ticket_id (that refers to the ticket_number of the Table A).
    This is how the application works:
    In a page there is a field for Ticket Number, once the user enters the Ticket Number and click Add Details, a tabular Form with 5 empty field appears... (Done through Page Process->Data Manipilation->Add Rows)
    This form contains fields Date, Name and Age. Once the user fills in all the details and click Submit button, the page is submitted. Whatever values that was entered is saved in Table B. Page Sucess message appears. This works fine.
    But once the Ticket Number is entered and Add Details is clicked, and without entering the values in the Tabular Form, if Submit button is clicked, there is no error showing up neither I see Page success message. But this should not be allowed. There should be some error showing up...
    Tabular Form Validations works only when user enters some values in the Tabular Form and click Submit. For the above scenario, where the form is untouched the validation doesnt work.
    How can I get this done? Any ideas?

    Hello Suzi,
    >> if (document.wwv_flow==null)
    The document.wwv_flow is an object representing the current form that was just rendered on your screen. As such, it can never be null.
    >> How to avoid submitting a page when tabular form rows are empty
    The correct way, especially for versions prior to APEX 4.0 is to use JavaScript, but for that, you need to know and understand how APEX generates your tabular form, HTML wise.
    To be very brief, APEX attached a unique ID to every updatable cell in the tabular form, using a certain pattern – each updatable column is getting a unique name (e.g. ‘f01’,’f02’ etc.) and the ID of a cell is a combination of this name with the serial row number the cell is on. For example, a cell on the third row in an updatable column called ‘f04’ will be given an ID of f04_0003. (More detailed explanation, with an example, can be found in my book).
    What you should do is to check these cells according to your validation policy (e.g. is all five row must be filled, is all the columns in a specific row must be filled, etc.).
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

  • Popup window for tabular form row edition

    To edit existing or new rows in a tabular form (page 1), I would like to open a popup window (page 2) with fields mirroring original tabular form fields. So, some basic data can be viewed/typed in the tabular form and the whole of the record data are viewed/typed on a separate popup form.
    On opening popup, I pass a tabular form's current line number (filled with up to three zeros on the left).
    When the user clicks on OK button on popup page, data will be put to the corresponding tabular form row. That should allow me to get /set tab form data from popup using following syntax:
    opener.document.getElementById('f04_' + line).value
    However, when I call data-initialization javascript function on onload of the popup form, popup fields to be filled are not rendered yet. At which point (and how) could I call this javascript initialization function?
    Another question. With Firebug Inspector, I see that right in front of each tab form data tag, there is a "label" tag with the name of the column as it was defined in report attributes. As long as I have a information, opener.document.getElementById, what HTML/Javascript syntax should I use to get to this label tag?
    Igor

    OK, the first part of question is OK now. Simply, I was putting a javascript code calling my initialization predure in the HTML Body Attribute section of the page, instead of simply writing there: onload="initFunction();"
    The second one stands still: once I have a tabular form's element id like f20_0003, how can I get to the symbolic name, e.g., "FIRST_NAME", that is in the label tag in the same table cell?

  • REGEXP_REPLACE issue/bug - replaces only every second occurence

    Hi All
    I am using
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    I need a regular expression to rename a variable in a mathematical formula, when testing my code I discovered that if the variable was repeated right after itself only one occurence was replaced. I need to only replace whole words as some variables can be a subset of a longer variable name, and variable names can have underscores in them.
    Below is an example of what happens.
    Can someone please tell me why this happens? Example code is:
    SELECT REGEXP_REPLACE('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab', '(\W|^)ab(\W|$)' , '\1xy\2',1,0,'i') from DUAL;
    The regular expression matches all 'ab' with a non alpha character or beginning line before and a non alpha or end of line at the end.
    I then replace the 'ab' with 'xy' and keep the original non alpha on either side. What happens is that only every second occurence is replaced.
    If I place a space after every '+' then it replaces all occurences. (Obviously this is a user field in a table of mathematical formulas so I cannot expect the user to worry about this problem.)
    I believe it may be due to the fact the pointer in finding all occurence is moved incorrectly and it does not find the match immediately after.
    Can someone please explain this? Or am I missing something in my example.
    Thanks
    Dudley

    Is this what you require? I changed your query a bit.
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(\W|^)ab(\W|$)',
      3                         '\1xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+ab+xy+ab+xy+ab+xy+abc+abc+xy
    1 row selected.
    SQL>
    SQL> SELECT REGEXP_REPLACE ('ab+ab+ab+ab+ab+ab+ab+abc+abc+ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+
    xy+xy+xy+xy+xy+xy+xy+abc+abc+xy
    1 row selected.
    SQL> -- checking data with white spaces
    SQL> SELECT REGEXP_REPLACE ('ab + ab + ab + ab + ab + ab + ab + abc + abc + ab',
      2                         '(ab)(\W|$)',
      3                         'xy\2',
      4                         1,
      5                         0,
      6                         'i'
      7                        )
      8    FROM DUAL;
    REGEXP_REPLACE('AB+AB+AB+AB+AB+AB+AB+ABC+ABC+AB',
    xy + xy + xy + xy + xy + xy + xy + abc + abc + xy
    1 row selected.
    SQL> Regards,
    Jo

  • Updating JTable every second, want to ignore these events in my listener

    I have a JTable that I update every second using
    table.getModel().setValueAt(data, row, col);I'm also reacting to when the user clicks on a row in a the table, using a ListSelectionListener:
    public class MyTableListener implements ListSelectionListener {
              public void valueChanged(ListSelectionEvent e) {
                   if (e.getValueIsAdjusting()) return;
                   //do stuff
    }And of course I've done this:
    table.getSelectionModel.addListSelectionListener(new MyTableListener());Problem is, every time I update the table data it generates an event handled by valueChanged() above. I need to prevent this.
    Do I need a customized table model for this?
    Thanks!

    Found the problem: I forgot I was using JXTable, not JTable. Here's my example:
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.awt.*;
    import org.jdesktop.swingx.*;
    public class Test {
         JXTable table = null;//change this to JTable to fix
         public class MyTableListener implements ListSelectionListener {
              public void valueChanged(ListSelectionEvent e) {
                   System.out.println("event="+e.toString());
         public Test()
              JFrame frame  = new JFrame();
              String columns[] = {"one", "two"};
              Object data[][] = {{0, 0}, {0, 0}, {0, 0}};
              table = new JXTable(data, columns);//change this to JTable to fix
              table.getSelectionModel().addListSelectionListener(new MyTableListener());
              frame.add(new JScrollPane(table, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED),
                          BorderLayout.CENTER);
              startThread();
              frame.setVisible(true);
         public static void main (String args[]) {
              Test test = new Test();
         public void startThread()
              class RefreshThread extends Thread {
                   public void run() { try {
                             while(true) { SwingUtilities.invokeLater(new Runnable() {public void run() {
                                       updateTable();
                                  sleep(1*1000);
                        } catch (Exception e) {e.printStackTrace();}
              RefreshThread rt = new RefreshThread();
              rt.start();
         public void updateTable()
              TableModel model = table.getModel();
              try {
                   for(int row = 0; row < model.getRowCount(); row++)
                        model.setValueAt(System.currentTimeMillis(), row, 0);
                        model.setValueAt(System.currentTimeMillis(), row, 1);
              } catch (Exception e) {
                   e.printStackTrace();
    }When I change it to a JTable, valueChanged() is not called every time I programmatically update the table.
    If it's a JXTable, valueChanged() is called with every update. Annoying!
    To compile/run the JXTable version you'll need something like
    java -cp swingx-1.0.jar:. TestAs for the events themselves, I added print statements with e.toString() and the events are not distinguishable from user interaction. I wonder if this is a JXTable bug or feature.
    Thanks!

  • Barcode on every second physical page

    I'm trying to create a form letter report in 6i. The letter runs into several pages, but I need to print only the barcode on every second page. So when we do duplex printing, the barcode goes on the back of each page. All the components including the barcode are in one single repeating frame(master) and there is another repeating frame(detail)within. The data might sometimes overflow to subsequent pages depending on the detail. Also within the barcode I need to give the running number of logical pages.
    Is there a simple way that Oracle handles this type of situations.
    Any suggestions.

    Instead of suppressing every second page I could just suppress every blank page. That would be fine as well.

  • How to execute my procedure automatically every second

    dear all
    i made a procedure that simply insert a record in a table . i need to execute this procedure automatiaclly every one second. how can i achive this. please help

    well , i'm going to tell you what exactly is the business.
    we have two distributed databases , 'local_db' and 'remote_db'.
    'local_db' is ours, i mean we desinged and created it . it contains our own views tables. but it contains no data at all.
    we get our data from the remote_db. this remote_db is located on the stock exchange. it is not ours, we did not create it, but we have the privilage to read form its tables.(only select ). in other words , the stock exchange is the our data vendor.
    tha changes that takes palce in the remote_db occures every second.And i urgently need to copy these changes on time to my database(local_db)

  • Page numbering every second page

    Hi guys,
    ok I have a 200 page booklet I'm doing, very simple - a notes page on the left hand side and then the contacts details on the right. But in the top right corner I need a page number that correlates with the contact. Problem is if I make page numbers it'll have them as 24, 26, 28 etc when that's not what I want.
    Is there a way to skip a page and just page number every second page?
    Thanks for any help,
    Dave

    It isn't entirely clear, but are we dealing with one person's contact info per page, or many? Sounds like 1.
    If it is, as I mentioned in your other thread, you could set this up as a Data Merge project. Create a two-page template spread, Add whatever you need for the notes page to the left page, and put all of your data fields on the right. You can include a number as one of the fields and palce it anywhere you want. This will only work with one record per page, though.
    If you'd rather number pages after the fact, it's probably scriptable to do something with starting a new section every second page and assign the numbers, or you could just add a master frame to the master page and place a number list, which is pretty simple.
    None of these techniques is truly automatic in the sense of updating if things are added or deleted, or if pages are rearranged. Any numbering outside the merge whould be done as the last step.

  • How to read two files (one is updating every second, the other is constant) simoltaneously

    Dear All,
    I will appreciate if somebody help me.
    I want to read two files, one is temperature wich is updating every second, and the other is hysteresis energy which has specific rows and is constant.
    I got a program in discussion forum which read a file as it is updating. I checked this program in my case and it works.
    Then I added reading hysteresis energy file to the existing file. But while i am running the program, the hysteresis energy file is read with all rows.
    But the aim is that everytime which temperature updates, I need to read just one row of the hysteresis energy file.
    so, in this way in every second i have a new temperature data and one row of the other file.
    I tried to used "for loop" inside the program, but it did not work, becuase reading temperature will be stopped untill for loop ends.
    I attached the program.
    Could somebody help me how to read just one row of hysteresis energy file everytime temperature updates?
    Solved!
    Go to Solution.
    Attachments:
    Readfiles.vi ‏23 KB

    I do not understand relationship between your two files.
    You have another VI or app that is writing data to both files and when new temperature data added you wish just to read the new data and then read one new line of the hysteresis file?????
    But is one is constant, why do you need to keep reading it?
    Anyway…
    The “Read From Spreadsheet File.vi” preformed an Open and a Close for each time it is called (if you will open the VI up and drill down and you will see). So that resets the file pointer back to the beginning and there for will read in the whole file from the first to the last each time if you do not set the start of read offset or number of rows.
    Now the Read from Binary File does not reset the file pointer and leaves the file pointer just past the last byte read so it will start with any new bytes automaicly only giving you the new data.
    I do not think you need to do the math with the Previous EOF=0 and the File size to get what I think you are trying to do.
    Plus use shift reg for the Data string instead of local var
    Set the mechinacl action of the stop botton to Latched
    So you do not need to init the two controls
    Also, I do not get the End of file encountered error (4) from the Read from Binary file if I attempt to read past. It just returns and empty string.
    Omar
    Attachments:
    Readfiles.vi ‏22 KB

  • Query-ing to MSSQL every second... would there be no problem?

    Hello,
    i am yet new to java programming.
    i have this project which calls for connecting to MSSQL and
    echoing transactions committed to the database each time
    a transaction at card reader is carried out. It's actually a
    timekeeping data collection's magnetic card readers with
    users swiping their cards at arbitrary time.
    Apparently, the card reader needs a visual presentation of
    each user's transactions because it has been my headache
    attending to their concerns about what exactly happens
    when they swipe their cards. Much as there's a light indicator
    on the cardreader, still it doesn't make sense to them.
    (for the record, the company bought that system from a third-party
    vendor)
    My concern is, would there be no problem that may surface if
    i query to MSSQL at regular interval in seconds? I used TRIGGERS
    to fire newly committed record to a temporary table (which i regularly
    purge so that connection to it would be lightweight), and which
    i access every second just to display
    the last 3 transactions. Well, i completed the program and tested
    it. So far, no problem. However, i dread about coming across
    a so-to-speak "bomb"( which paralyzes the whole network and makes
    my application unusable due to threats) when my program
    has been fully implemented.
    Is there no way other than per second query? pls help. =)
    and by the way, transactions are flashed on
    screen a little longer after the user has already swiped.
    -- which bothers me right now.
    hence, is there a faster way ( or, real-time)
    to get the latest transations from MSSQL at the same
    moment they are committed to the database?
    pls help. =(
    what about query every 250 milliseconds (1/4 of a second), would that be ok?
    Message was edited by:
    sinnex2004
    Message was edited by:
    sinnex2004
    Message was edited by:
    sinnex2004
    Message was edited by:
    sinnex2004
    Message was edited by:
    sinnex2004

    My concern is, would there be no problem that may
    surface if
    i query to MSSQL at regular interval in seconds? I
    used TRIGGERS
    to fire newly committed record to a temporarytable
    (which i regularly
    purge so that connection to it would be
    lightweight), and which
    i access every second just to display
    the last 3 transactions. Well, i completed the
    program and tested
    it. So far, no problem. However, i dread about
    coming across
    a so-to-speak "bomb"( which paralyzes the whole
    network and makes
    my application unusable due to threats) when my
    program
    has been fully implemented.Why a trigger and this temporary table that gets
    purged?
    Why not just grab the last 3 transactions and not
    worry about this temp table?
    Also, is the problem giving feedback to users when
    they swipe a card? Is there no why to tell when they
    swiped?thank you. =)
    <<--- it is a system, actually. it's just that it doesn't cater for
    a friendlier user interface right at card reader station itself.
    it has 1 pair of card readers; ie. one for IN and one for OUT
    traffic.
    The system may have a program that displays each transaction
    but it doesn't filter its display ;i.e., users get mixed up with
    both IN and OUT transactins both surfacing at the program's evnt
    window. apparently, it isn't designed for users consumption.
    hence, i made my own, echoing what has just been committed to the
    database to the screen (of pc which my program is running on).
    my plan is to have 2 screens -- one for OUT and one for IN station.
    the info which i display is descriptive. therefore, users would know
    what exactly happen to their transactions.
    i used trigger to make access to temporary table lightweight.
    or, am i wrong?
    i just want to effect a real-time presentation of
    each transaction the moment they are saved to the database.
    right now, i employ every 250 millisecond query.. so far,
    it does well. But my concern is, am i doing it the right way?
    or, is there another way that really caters for my need?

Maybe you are looking for

  • My Macbook Pro (early 2008) won't boot, then booted, now won't boot again.

    Hey all, Summary: My GF's Macbook Pro (Early 2008, non-unibody I believe) "died" earlier this year without notice or a cause for why, then it worked months later, then it didn't again.  Symptoms: It stopped booting, with the only signs of life are: T

  • Error while checking the S.M.A.R.T. status of the Hard Disk

    I have an older imac: OS X 10.4.11 800MHz PowerPC G4 768MB SDRAM Machine Model: PowerMac4,2 CPU Type: PowerPC G4 (2.1) serial # W8310*P19 <edited by host> I use Onyx to run maintenance from time to time. It always asks to check S.M.A.R.T status when

  • OC4J Form method="post" don't working

    Hello! I have a J2EE Application with Servlets and jsp's, with OC4J v.10.1.3 installed in my computer, with one page called index.jsp with this code: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page impor

  • Java socket streams messing up

    iv wrote a games server and it uses java socket streams to send the messages back and forth between the game clients and the game server it self this all works great but when running and over about 5min its send over 1000 packets BUT it will crash iv

  • How to update time zone setting in Aperture 2

    When you install Aperture 2 you specify a time zone. However, I can't figure out how to change Aperture's time zone setting. I used to live on EST, so most of my photos are in EST. But since then I've moved to HST (Hawaii Standard Time) and purchased