The session getattributes lost one row of data in the html input table

Deal all,
I have input three rows of data in a html table. But I found
the last row will disappear and lost when it return the data to
backend. I think that maybe caused there is an error checking which
prompts an error and after that , I change the value of the last(3rd)
row and try to save it. The last row disappear in the UI and being not
sent to the back end. Here is my code of the JSP
RosterCodeSetupCommand rosterCodeSetupCommand =
(RosterCodeSetupCommand)request.getSession().getAttribute("rosterCodeSetupCommand");
int cmd = rosterCodeSetupCommand.getCmd();
int pageNo = rosterCodeSetupCommand.getPageNo();
EtWorkTime etWorkTime = rosterCodeSetupCommand.getEtWorkTime();
List policyList = rosterCodeSetupCommand.getPolicyList();
As you can see, the EtWorkTime is get from the rosterCodeSetupCommand.
Usually, the rosterCodeSetupCommand will have all the rows in the
table. But now in EtWorkTime, I found last row data is lost.
And in the UI, when I press Save, the last row is disappear. So I
guess the problem is happened in
request.getSession().getAttribute("rosterCodeSetupCommand"); But I
can't figure out what can make the last row lost in this sentence.
Would you mind to give me some hints on what will make this happen and
I will try to trace the code by myself. Thanks.

Hi,
I am not sure are you using spring framework or what. if yes you can populate data in command object in referenceData method of simpleformcontroller and that data will be available to the UI.

Similar Messages

  • Using a ommand to generate more than one row of data in utl file

    Hi Guys
    This might be a pretty long one. But I require help with regards to using outer and inner loops within my code.
    Here is the task:
    Each account involved with the DCA Allocation has an entry in the DCAACCOUNTALLOCATION table to track its progress. The STATUS value of the entry shows the position of the account in the DCA Allocation process.
    The status entry being tested is 3.
    Below is the code:
    create or replace
    PROCEDURE DCA_BMW_OUT
    IS
    -- Declare all variables as reference
    v_out_file UTL_FILE.FILE_TYPE;
    v_row_Count NUMBER;
    r_bmw NUMBER;
    v_out_directory all_directories.directory_path%type;
    v_out_filehandle UTL_FILE.FILE_TYPE := NULL;
    v_out_buffer varchar2 (32767);
    v_records NUMBER;
    body_output varchar2(32759 BYTE);
    dictionary_guarantorsexist varchar2 (1 Char);
    -- Text required within this part of the procedure
    v_body varchar2(32767 BYTE);
    v_header VARCHAR2(32759 BYTE);
    BEGIN
    FOR r_bmw IN
    ( SELECT *
    FROM dcaadditionaldata
    WHERE directory_name IS NOT NULL
    ) LOOP
    BEGIN
    -- Output file to be added into the directory specified
    v_out_file := utl_file.fopen (r_bmw.directory_name, 'DCAExport_1_' || TRIM(TO_CHAR(SYSDATE,'DDMMYYYY_HH24MISS')) || '.txt', 'W');
    -- The Header data which will be outputted to the file
    v_header := 'KennzeichenBrgschaftsforderungGesamtforderung|Währung|Übergabedatum|DifferenzierungAnwalts-oderInkassofall|MainMarktpartnernummer|
    MainAnrede|MainTitel|MainName|MainVorname|MainStraße|MainHausnummer|MainPLZ|MainOrt|MainLand|MainGeburtsdatum|MainTelefonnr.Schuldner|G1Marktpartnernummer
    G1Anrede      G1Titel      G1Name      G1Vorname      G1Straße      G1Hausnummer      G1PLZ      G1Ort      G1Land      G1Geburtsdatum      G1Telefonnr.Schuldner      G2Marktpartnernummer      G2Anrede      G2Titel
    G2Name|G2Vorname|G2Straße|G2Hausnummer|G2PLZ|G2Ort|G2Land|G2Geburtsdatum|G2Telefonnr.Schuldner|G3Marktpartnernummer|G3Anrede|G3Titel|G3Name|G3Vorname|
    G3Straße|G3Hausnummer|G3PLZ|G3Ort|G3Land|G3Geburtsdatum|G3Telefonnr.Schuldner|G4Marktpartnernummer|G4Anrede|G4Titel|G4Name|G4Vorname|G4Straße|G4Hausnummer|
    G4PLZ|G4Ort|G4Land|G4Geburtsdatum|G4Telefonnr Schuldner|G5Marktpartnernummer|G5Anrede|G5Titel|G5Name|G5Vorname|G5Straße|G5Hausnummer|G5PLZ|G5Ort|G5Land|
    G5Geburtsdatum|G5Telefonnr.Schuldner|Kundennr.|Bestandsnr.|Finanzierungsnr.|KennzeichenFinanzierung/Leasing|Kennzeichenprivat/gewerblich|
    reguläresVertragsende|Laufzeit|Vertragsdatum|Vertragsstatus|Ratenbetrag|Filiale/Gebiet|Finanzierungstyp|BankverbindungKonto|BankverbindungBLZ|
    RSVKennzeichen|Kündigungsdatum|Modell|Fahrgestellnummer|KFZKennzeichen|KFZZulassungsdatum|CoD1Marktpartnernummer|CoD1Anrede|CoD1Titel|CoD1Name|
    CoD1Vorname|CoD1Straße|CoD1Hausnummer|CoD1PLZ|CoD1Ort|CoD1Land|CoD1Geburtsdatum|CoD1Telefonnr.Schuldner|CoD2Marktpartnernummer|CoD2Anrede|CoD2Titel|
    CoD2Name|CoD2Vorname|CoD2Straße|CoD2Hausnummer|CoD2PLZ|CoD2Ort|CoD2Land|CoD2Geburtsdatum|CoD2Telefonnr.Schuldner|CoD3Marktpartnernummer|CoD3Anrede|
    CoD3Titel|CoD3Name|CoD3Vorname|CoD3Straße|CoD3Hausnummer|CoD3PLZ|CoD3Ort|CoD3Land|CoD3Geburtsdatum|CoD3Telefonnr.Schuldner|CoD4Marktpartnernummer|
    CoD4Anrede|CoD4Titel|CoD4Name|CoD4Vorname|CoD4Straße|CoD4Hausnummer|CoD4PLZ|CoD4Ort|CoD4Land|CoD4Geburtsdatum|CoD4Telefonnr.Schuldner|
    CoD5Marktpartnernummer|CoD5Anrede|CoD5Titel|CoD5Name|CoD5Vorname|CoD5Straße|CoD5Hausnummer|CoD5PLZ|CoD5Ort|CoD5Land|CoD5Geburtsdatum|
    CoD5Telefonnr.Schuldner Y|Y|5830,99|EUR|20/08/2009|DCA|4|123456|Herr||Mueller|Rainer|Messigasse|33|84432|Filz|Deutschland|01/07/1957|08912345|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||||||||||||||76543|5000234567||Lease|Privat|12/12/2013|60|12/12/2008||250,50|US|Rate|1234567890|32343450|N||BMW 320 i|W34567890PA34567|M-H-3456|09/12/2008||||||||||||||||||||||||
    N|450,80|EUR|20/08/2009|DCA|4|987654|Frau||Meier|Heide|Beinstr.|44|86353|Laus|Deutschland|03/06/1949|08987654|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||87654||8765675585|Loan|Gewerblich|14/03/2012|72|14/03/2006||500,01|DF|Select|976579657|32343450|N||BMW 500 sl|W94567890PA34568|M-H-3457|10/03/2006|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345
    Y|33970,50|EUR|20/08/2009|Lawyer|4|64646464|Frau||Schmidt|Susanne|Hueftgasse|55|89363|Maus|Deutschland|23/08/1933|08934567|34343434|Herr|Dipl|Meier|Rudolf|Heislestr.|69|85433|Maus|Deutschland|28/05/1945|08934567|234567|Frau|Dr|Mueller|Rita|Messigasse|33|84432|Filz|Deutschland|13/12/1955|08912345|||||||||||||||||||||||||||||||||||||98757|5000785675||Lease|Privat|11/11/2009|48|11/11/2005||380,70|GH|Zielrate|234567899|32343450|Y||BMW 380 s|W54567890PA34569|M-H-3458|07/11/2005||||||||||||||||||||||||
    N|10040,20|EUR|20/08/2009|Lawyer|4|4865465|Herr||Schulz|Karl|Nasenweg|77|83354|Schuh|Deutschland|18/01/1965|08972545|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||46789|50004765787||Lease|Privat|16/09/2012|60|16/09/2007||1234,56|OS|ZUS|98765432|32343450|Y||BMW 280 i|W74567890PA34570|M-H-3459|12/09/2007||||||||||||||||||||||||';
    utl_file.PUT_LINE(v_out_file,v_header,TRUE);
    -- Below will output a row of data which satisfy the requirements.
    FOR body_output IN
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 3
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    LOOP
    UTL_FILE.PUT_LINE (v_out_file,
    body_output.CUSTOMERNUMBER|| '|' || body_output.ACCOUNTNUMBER|| '|' ||body_output.CDTITLE|| '||' ||body_output.CDFIRSTNAME || '|||||' ||
    body_output.CDLASTNAME|| '||||' || body_output.ACCOUNTTYPE|| '|' ||body_output.ORIGINALCONTRACTENDDATE|| '||||' ||body_output.CONTRACTTERM || '|||||' ||
    body_output.CONTRACTENDDATE|| '|' || body_output.BRANCHAREA|| '||' ||body_output.PRODUCTTYPE|| '||' ||
    body_output.HOUSEBANKACCOUNT|| '|||' || body_output.CARMODEL|| '||||' ||body_output.CARLICENCE|| '|' ||
    body_output.ARREARSBALANCE|| '||||' || body_output.CODEBTOR|| '|' ||body_output.GUARANTORnumber);
    END LOOP;
    UTL_FILE.fclose (v_out_file);
    EXCEPTION
    WHEN OTHERS THEN
    UTL_FILE.put_line (v_out_file, 'failed');
    -- If any errors occur when closing the file, then we close the opened file.
    IF utl_file.is_open(v_out_file) THEN
    UTL_FILE.fclose (v_out_file);
    END IF;
    END;
    UPDATE DebtEpisodes
    SET handoverdate = null
    WHERE DCAORLAWYER = 'DCA'
    AND accountid IN
    ( SELECT accountid
    FROM Dcaaccountallocation
    WHERE Dcaaccountallocation.status = 3
    AND Dcaaccountallocation.dcaid = 41
    END LOOP;
    END DCA_BMW_OUT;
    Currently, the above codes issue is that although many rows of data have been inputted in all the tables, with regards to the select criteria above (in italics), it only produces one row of data when i expect more than one to appear.
    If the query only outputs one row but you're expecting it to produce more than one row, then you need to dissect the statement to find out where the output is being unduly restricted
    I was told maybe an outerloop or an inner loop would do the trick, but really stuck on how and where to put it.
    Hope this makes sense guys and I would really appreciate your time.
    Thanks

    if i run this particular code
    ( SELECT
    AccountDetails.CUSTOMERNUMBER, AccountDetails.ACCOUNTNUMBER, CUSTOMERDETAILS.CDTITLE, CUSTOMERDETAILS.CDFIRSTNAME, CUSTOMERDETAILS.CDLASTNAME, AccountDetails.ACCOUNTTYPE,
    AccountDetails.ORIGINALCONTRACTENDDATE, AccountDetails.CONTRACTTERM, AccountDetails.CONTRACTENDDATE, AccountDetails.BRANCHAREA, AccountDetails.PRODUCTTYPE,
    AccountDetails.HOUSEBANKACCOUNT, AccountDetails.CARMODEL, AccountDetails.CARLICENCE, AccountDetails.ARREARSBALANCE, AccountDetails.CODEBTOR, AccountDetails.GUARANTORNUMBER
    FROM AccountDetails
    JOIN CUSTOMERDETAILS ON AccountDetails.CUSTOMERNUMBER = CUSTOMERDETAILS.CUSTOMERS1
    WHERE EXISTS
    ( SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 2
    AND DebtEpisodes.DCASentDate IS NULL
    AND Dcaaccountallocation.ACCOUNTID = AccountDetails.ACCOUNTNUMBER
    AND DebtEpisodes.DCAORLAWYER = 'DCA'
    This returns 1 row of data
    However if i run a small part of the above code...
    SELECT *
    FROM Dcaaccountallocation
    JOIN DebtEpisodes ON DebtEpisodes.ACCOUNTID = Dcaaccountallocation.ACCOUNTID
    WHERE Dcaaccountallocation.dcaid = 41
    AND Dcaaccountallocation.status = 2
    It returns a lot of rows with a status of 2
    Now i presume what I am going to do is to ensure that all the fields provide satisfactory requirements, with regards to the above code. Although I have many records in all the stated tables already.
    :(

  • How to compare result from sql query with data writen in html input tag?

    how to compare result
    from sql query with data
    writen in html input tag?
    I need to compare
    user and password in html form
    with all user and password in database
    how to do this?
    or put the resulr from sql query
    in array
    please help me?

    Hi dejani
    first get the user name and password enter by the user
    using
    String sUsername=request.getParameter("name of the textfield");
    String sPassword=request.getParameter("name of the textfield");
    after executeQuery() statement
    int exist=0;
    while(rs.next())
    String sUserId= rs.getString("username");
    String sPass_wd= rs.getString("password");
    if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
    exist=1;
    if(exist==1)
    out.println("user exist");
    else
    out.println("not exist");

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • How to write one row of data at a time to "Write to File"

    I am trying to write 10 parameters to the LV "Write to File". This is for just one row at a time. This happens evertime I get a failure in my test routine. I am not quite sure how to accomplish this task. If I get another failure I write one row again. I testing 4 DUTS at a time so I write this row of data to each file. I am sure it is very simple.
    Thanks
    Philip

    Assuming your 10 parameters are an numeric array with 10 elements,  use "write to spreadsheet" file with append set to true. (... and if they are scalars, built the array first ).
    LabVIEW Champion . Do more with less code and in less time .

  • How to process double click on rows of data displayed on html page?

    I need to display rows of data so that user could double click on a particular row to get more details.
    What I could think of doing is to embed an applet with a JTable that could easily process double click event. But the issues I have are:-
    1. I am not able to pass the data (the jsp got from processing some javabeans) to be displayed on the applet's table. It seems the applet needs to get loaded on the user's browser first and then the applet could ask the server (servlet / jsp) to send the data.
    Is there any way to provide data to applet other than html's parameter/value pairs?
    2. As per design, this applet should be used only to display the content. Double click on a row would only open a browser window to display the entire details of the data; there should not be any interaction with the server.
    Is there a better, more elegant way of doing this?
    Thanks.

    I posted a thread on Applet servlet communication here:
    http://forum.java.sun.com/thread.jsp?forum=33&thread=205887
    It uses the ObjectOutput/InputStream so you can send serializable objects rather than just text.
    Cheers,
    Anthony

  • Make just one row of data be a percentage

    Any idea on how i can have just one account in my EVDRE report show up as percentages? Thanks.

    Hi,
    You can use the advanced formatting options.
    You can have the criteria as ACCOUNT.ID=mention the ID for which you want the format as percentage.
    Under the format, you can right click the cell and maintain the desired formatting.
    In the formatoption, please refer to this range.
    Please take a look at the below link from help.sap for more information on this:
    http://help.sap.com/saphelp_bpc75/helpdata/en/87/2e5940a305405f957eb987daf30d5b/content.htm
    Hope this helps.

  • Updating one row of data using CMP

    Hi,
    How should I update a single row mapped with a CMP persitence, should I write a differetnt method for update , pl clarify in detail.

    Hi,
    How should I update a single row mapped with a CMP
    P persitence, should I write a differetnt method for
    update , pl clarify in detail.Hi,
    You can just find that particular Row using the findByPrimaryKey method the entity.
    This method actually returns the Remote Interface for the Entity which contains taht particular row of record.
    Use The setters of the Remote interface to update your existing Row.

  • Passing multiple rows of data as an XML input to a transaction

    Hi,
    I have a grid with several rows and columns of data on the front-end UI. I would like to select few rows and pass the data as an XML structure to a transaction. Is this possible? If so, how could I do this?
    Regards,
    Chanti.

    Hello Chanti,
    Yes, Its definitely possible, I have done it on couple of occasions and it has worked
    Option 1:
    1) Pass each row value in a string where each row is separated by a comma as shown,
    Value1,Value2,Value3.....
    2) Then within BLS use it as string input variable and parse it using String_List_To_XML XML action block.
    Option 2:
    1) If you are aware of the required XML structure then prepare one as string by appending reach rows something like as shown below,
         var SpeedXML = "";
         SpeedXML =      '<?xml version="1.0" encoding="utf-8"?>'
         SpeedXML =     SpeedXML + '<Rowsets Version="12.1">'
           SpeedXML =     SpeedXML + '<Rowset>'
         SpeedXML = SpeedXML + '<Columns>'
         SpeedXML =     SpeedXML + '<Column Description="" MaxRange="1" MinRange="0" Name="Average_Run_Speed" SQLDataType="1" SourceColumn="Average_Run_Speed" />'
         SpeedXML =     SpeedXML + '<Column Description="" MaxRange="1" MinRange="0" Name="Line_Stops" SQLDataType="1" SourceColumn="Line_Stops" />'
         SpeedXML =     SpeedXML + '</Columns>'
    Here in this section you can loop through your rows and append them to structure,
    Start Loop
         SpeedXML = SpeedXML + '<Row>'
         SpeedXML = SpeedXML + '<Average_Run_Speed>'+ Value1 +'</Average_Run_Speed>'
         SpeedXML = SpeedXML + '<Line_Stops>'+ Value2 +'</Line_Stops>'
         SpeedXML = SpeedXML + '</Row>'
    End Loop
         SpeedXML = SpeedXML + '</Rowset>'
         SpeedXML =     SpeedXML + '</Rowsets>'
    2) Now in the Transaction, use it as String input variable and parse it using String_To_XML XML action block
    Hope this helps!!
    Regards,
    Adarsh

  • How to load  a tables one partition of data in to OWB target table

    Hey ,
    I want to load only one partition data from source (size in Tera bytes) in OWB tables. I used filter condition as per the partition done on a key value. But Its take so much time to load the data into the target table.
    I feel to configure the source table as well as target table and give some HINT command in operator settings . Is it right to improve the performance of loading .
    Can I use PEL option in source as well as target .
    suggest me please
    thanks
    murari

    Hi Andreas,
    This error has not been documented yet, but I got the information from the other forums.
    Error Name                            Error Code (hex)    Description
    LinBusErrorTxSyncTimeout         1040                  The LIN interface master task attempted to send a
                                                                               sync byte and did not self not receive the sync byte
                                                                               within the timeout period.
    This is the description. The problem is solved, the baud rate i was giving was higher than the slave units baud rate. Now it seems to be functioning correctly.
    Thank you.

  • How to activate a different sub-report for each row in the data set as main report page breaks on each row of data in the main dataset

    I am going to try asking this same question a different way as I have yet to find a working solution to my problem.  I have a main report and then 8 sub reports.  My main report has one data set and returns one row of data per account number.  One
    of the fields in the main data set is called AccountProf.  My main report displays one page per Account number and then calls a different sub report based on that account's AccountProf value.  The sub reports take in the account number as a parameter
    and get multiple rows of data to display that accounts usage formatted differntly for each AccountProf (hence the 8 different sub report.  
    So far I can figure out how to do everything but setting the visibility property of each sub-reports when I have multiple accounts.  If I use the following expression for the visibility property on each sub report, it makes all the applicable sub report
    for all the accounts requested visible at once:
    =IIF(Fields!AccountProf.Value= "USE_PLUS_DMD",False,True)
    *The value in bold USE_PLUS_DMD  is different for each sub report.
    Here is a look at what the main report look like:
    Here is the main reports data set:

    Hi JasonDWilson77,
    According to your description, there is a main report and 8 sub reports in the report, you want to set visibility of sub reports, if no value is passed to the parameter of sub report, the sub report will not be displayed. If that is the case, please refer
    to the following steps:
      1. Create a new parameter named NewAccountNumber, set its data type the same as @AccountNumber, select Allow multiple values, set Visibility to be hidden, then set all available values to default values.
      2. Right-click the first sub report and open Subreport Properties dialog box, click Parameters in left pane, set name to AccountNumber, then click (fx) button, type the expression like below:
    =Parameters! NewAccountNumber(0)
      3. Click Visibility in left pane, select Show or hide based on an expression, then click (fx) button and type the expression like below:
    =IIF(InStr(Join(Parameters! AccountNumber.Value), Parameters!NewAccountNumber.Value(0))>0 , false,true)
      4. Modify parameter of other sub reports like step2.
      5. Set visibility of other sub reports like step3.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • Problem to calculate the coherence (using NetworkFunction-VI) with only 1 row of data for each, the stimulus and response input

    Hello,
    I am trying to calculate the coherence of a stimulus and response
    signal using the Network Functions (avg) VI's. The problem is that I
    always get a coherence of "1" at all frequencies. This problem is
    already known (see KnowledgeBase document: Why is the Network Functions (avg) VI's Coherence Function Output "1"?).
    My trouble is that the described solution (-> the stimulus and response input matrices need to have at least two rows to get non-unity coherence values) doesn't help me much, because I only have one array of stimulus data and one array of response values.
    Thus, how can I fullfil the 'coherence-criteria' to input at least two rows of data each when I just have one row of data each?
    Any hint or idea is very much appreciated. Thanks!
    Horst

    With this weird board layout, I'm not sure whether you were asking me, but, on the assumption that you were, here goes:
    I found no need to use the cross-power spectrum and power spectrum blocks
    1... I was looking for speed.
    2... I already had the component spectral data there, for other purposes. From that, it's nothing but addition and multiplication.
    3... The "easy" VIs, assume a time wave input, as I recall. Which means they would take the same spectrum of the same timewave several times, where I only do it once.
    I have attached PNGs of my code.
    The PROCESS CHANNEL vi accepts the time wave and:
    1... Removes DC value.
    2... Integrates (optional, used for certain sensors).
    3... Windows (Hanning, etc. - optional)
    4... Finds spectrum.
    5... Removes spectral mirrors.
    6... Scales into Eng. units.
    7... From there, you COULD use COMPLEX-TO-POLAR, but I don't care about the phase data, and I need the MAG^2 data anyway, so I rolled my own COMPLEX-TO-MAG code.
    The above is done on each channel. The PROCESS DATA vi calls the above with data for each channel. The 1st channel in the list is required to be the reference (stimulus) channel.
    After looping over each channel, we have the Sxx, Syy, and Sxy terms. This code contains some averaging and peak-picking stuff that's not relevant.
    From there, it's straightforward to ger XFER = Sxy/Sxx and COHERENCE = |Sxy|^2 / (Sxx * Syy)
    Note that it uses the MAGNITUDE SQUARED of Sxy. Again, if you use the "easy" stuff, it will do a square-root operation that you just have to reverse - it is obtained faster by the sum of the squares of the real and imag parts.
    Hope this helps.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks
    Attachments:
    ProcessChannel.png ‏25 KB

  • SQL query - select one row from each date group

    Hi,
    I have data as follows.
    Visit_Date Visit_type Consultant
    05/09/2009 G name1
    05/09/2009 G name2
    05/09/2009 G name3
    06/09/2009 I name4
    07/09/2009 G name5
    07/09/2009 G name6
    How to select data as follows
    05/09/2009 G name1
    06/09/2009 G name4
    07/09/2009 G name5
    i.e one row from every visit_date
    Thanks,
    MK Nathan
    Edited by: k_murali on Oct 7, 2009 10:44 PM

    Are you after this (one row per date per visit_type)
    with dd as (select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name1' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name2' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name3' Consultant from dual
                union all
                select to_date('06/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name4' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name5' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name6' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'F' Visit_type, 'name7' Consultant from dual)
    select trunc(visit_date) visit_date, visit_type, min(consultant)
    from   dd
    group by trunc(visit_date), visit_type
    order by trunc(visit_date);
    VISIT_DAT V MIN(C
    09/MAY/09 G name1
    09/JUN/09 G name4
    09/JUL/09 G name5
    09/JUL/09 F name7or are you after only one row per date?:
    with dd as (select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name1' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name2' Consultant from dual
                union all
                select to_date('05/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name3' Consultant from dual
                union all
                select to_date('06/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name4' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name5' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'G' Visit_type, 'name6' Consultant from dual
                union all
                select to_date('07/09/2009','MM/DD/YYYY') Visit_Date, 'F' Visit_type, 'name7' Consultant from dual)
    select trunc(visit_date) visit_date, min(visit_type) visit_type, min(consultant)
    from   dd
    group by trunc(visit_date)
    order by trunc(visit_date);
    VISIT_DAT V MIN(C
    09/MAY/09 G name1
    09/JUN/09 G name4
    09/JUL/09 F name5

  • Why HTTPService is throwing error when there is two or less rows of data ?!

    Hi guys,
    I have an issue with HTTPService which is this.
    I'm using HTTPService to retrieve data from SQL database, and to display those data in datagrid.
    Basically MXML and script is like this :
    example code  ---------------------------------------------------------------------
    <mx:HTTPService id="readRequestC"
                                       method="POST"
                                       useProxy="false"
                                       url="http://www.mydomain.com/read_record.php"
                                       result="showActiveAlerts(event)">
    </mx:HTTPService>
    private function showActiveAlerts(e:ResultEvent):void
                                       C_activealerts_AC = e.result.patientalert.alert                         
    end of code ------------------------------------------------------------------------
    C_activealerts_AC - array collection is bound to data grid
    I'm using this read_record.php file to retrieve data from database :
    example code  ---------------------------------------------------------------------
    <?php
    define( "DATABASE_SERVER", "xxx" );
    define( "DATABASE_USERNAME", "xxx" );
    define( "DATABASE_PASSWORD", "xxx" );
    define( "DATABASE_NAME", "xxx" );
    //connect to the database.
    $mysql = mysql_connect(DATABASE_SERVER, DATABASE_USERNAME, DATABASE_PASSWORD);
    mysql_select_db( DATABASE_NAME );
    $Query = "SELECT * FROM patientalert";
    $Result = mysql_query( $Query );
    // ----------------------------------- xml is constructed here -------------------
    $Return = "<patientalert>";
                while ( $User = mysql_fetch_object( $Result ) )  
                $Return .= "<alert>
                                                   <idstaff>".$User->idstaff."</idstaff>
                                                   <idpatient>".$User->idpatient."</idpatient>
                                                   <idalerttype>".$User->idalerttype."</idalerttype>
                                                   <idalertstatus>".$User->idalertstatus."</idalertstatus>
                                                    <timestampappear>".$User->timestampappear."</timestampappear>
                                                   <timestampproceed>".$User->timestampproceed."</timestampproceed>
                                                   <position>".$User->position."</position>
                                                   <mobileid>".$User->mobileid."</mobileid>
                                                   </alert>";
    $Return .= "</patientalert>";
    mysql_free_result( $Result );
    print ($Return)
    ?>
    end of code ------------------------------------------------------------------------
    This php file above is creating nice XML file which I'm reading with HTTPService. Everything is working fine when there is a lot of data (at least several rows)
    The point is, that data is changing constantly in SQL base, there can be 10 rows, but there can be 3 of them... and here is the problem.
    When there is less than 2 row of data... an error appears :
    TypeError: Error #1034: Can not convert type mx.utils::ObjectProxy@4011089 to type mx.collections.ArrayCollection....
    I'm sure this problem is due to fact that when there is only one row in database we don't have several <alert> nodes in XML so it cannot be converted into ArrayCollection.
    Do you have any idea how to prevent this ? How to convert one row of data from database to valid Array Collection... and what if there will be no data in the table... in that case I simply want to display no data in data grid !
    Thanks for any help !!!

    >>>> Im imagine you're feeding the HTTPService lastResult into an array collection, and then binding that to the Datagrid.
    yes indeed... I'm doing precisely that :
    I've got an array collection
                [Bindable]
                private var C_activealerts_AC:ArrayCollection=new ArrayCollection()
    which is bound to datagrid :
    <mx:DataGrid dataProvider="{C_activealerts_AC}">
                 <mx:columns>
                        <mx:DataGridColumn headerText="Staff" dataField="idstaff"/>
                        <mx:DataGridColumn headerText="Patient" dataField="idpatient"/>
                        <mx:DataGridColumn headerText="Type" dataField="idalerttype"/>
                        <mx:DataGridColumn headerText="Status" dataField="idalertstatus"/> ...etc..
                 </mx:columns>
    </mx:DataGrid>
    and I'm pushing event.result to C_activealerts_AC, like this :
    <mx:HTTPService id="readRequestC"
                        method="POST"
                        useProxy="false"                   
                        url="http://www.mydomain.com/read_record.php"
                        result="showActiveAlerts(event)">       
    </mx:HTTPService>
    private function showActiveAlerts(e:ResultEvent):void {
         C_activealerts_AC = e.result.patientalert.alert
    Now... I'm looking at your solution but I'm not quite catching it ... you have
    two results in HTTPService ? Compiler doesn't like this it's shouting 'result has been defined once' !
    result="handleRequestC(event)"
    result="showActiveAlerts(event)"
    and what is this 'Datagrid' below... is it an id of my datagrid ?? hmm..
    Datagrid.dataprovider = evt.result.patientalert.alert;
    Could you please explain it a little more ?
    I thought if there is one row of data, array collection will be feeded only with one object... apparently, like you say, it's not
    Thanx

  • Repeater for XML datasource only showing one row

    Hello.
    I'm having a problem displaying multiple rows of data from an XML document in
    a
    jsp net-ui:repeater section. The database call seems to be working fine, the
    XML seems to be
    put together fine, and the XML document's getting to the jsp via the request.
    But, only one
    row of data (the first row) shows up.
    My .xsd defines TblCompany. TblCompanyDocument was created by Workshop in the
    XMLBeans generation.
    Advice/guidance/assistance would be much appreciated.
    Thanks.
    -eric-
    Following is in my dataControlImpl.jcs file. It returns seven rows.
    * @common:operation
    public TblCompanyDocument listCompany() throws SQLException
    RowSet company = db.listCompany();
    TblCompanyDocument xmlDoc = TblCompanyDocument.Factory.newInstance();
    TblCompany xml;
    while (company.next())
    xml = xmlDoc.addNewTblCompany();
    xml.setCompanyId(company.getInt("company_id"));
    xml.setCompanyName(company.getString("company_name"));
    xml.setWebAddress(company.getString("web_address"));
    xml.setUpdateBy(company.getString("update_by"));
    xml.setUpdateDt(new XmlCalendar(company.getDate("update_dt")));
    company.close();
    return xmlDoc;
    Following is in my companyController.jpf. It is used to get the results from
    my
    dataControlImpl in the form of an XML document, place them into a request attribute,
    and
    pass them on to the index.jsp page as a list of companies to choose from. I've
    verified that,
    at this point, var has seven rows of data in it.
    * Action encapsulating the control method :listCompany
    * @jpf:action
    * @jpf:forward name="success" path="index.jsp"
    * @jpf:catch method="exceptionHandler" type="Exception"
    public Forward listCompany()
    throws Exception
    TblCompanyDocument var = myControl.listCompany();
    getRequest().setAttribute( "results", var );
    return new Forward( "success" );
    Following is in my index.jsp. I've verified that, at this point, the request
    has an attribute called
    results, and it has the XML document with seven 'rows' of tblCompany in it.
    <netui-data:repeater dataSource="{request.results.tblCompany}">
    <netui-data:repeaterHeader>
    <table cellpadding="2" border="1" class="tablebody" >
    <tr>
    <td>ID</td>
    <td>Name</td>
    <td>Web Address</td>
    <td>Update By</td>
    <td>Update Date</td>
    </tr>
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr>
    <td><netui:label value="{container.item.companyId}"></netui:label></td>
    <td><netui:label value="{container.item.companyName}"></netui:label></td>
    <td><netui:label value="{container.item.webAddress}"></netui:label></td>
    <td><netui:label value="{container.item.updateBy}"></netui:label></td>
    <td><netui:label value="{container.item.updateDt}"></netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></table></netui-data:repeaterFooter>
    </netui-data:repeater>

    Well, I get to answer my own question (thanks to a friend). Perhaps this will
    help someone
    else.
    The problem seemed to be in the repeater datasource. When Workshop created the
    {pageFlow.allRows} property for me, instead of referring to the subordinate XML
    structure as
    the name I gave it, it tacked on an ...Array suffix, like:
    * allRows
    * tblCompanyRowSet
    f() tblCompanyArray
    I did modify my XML structure during my debugging, and am now afraid to undo it.
    Nonetheless, here's how it looks now:
    <xs:element name="tblCompany">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="company_id" type="xs:int"/>
    <xs:element name="company_name" type="xs:string"/>
    <xs:element name="web_address" type="xs:string"/>
    <xs:element name="update_by" type="xs:string"/>
    <xs:element name="update_dt" type="xs:date"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="tblCompanyRowSet">
    <xs:complexType>
    <xs:choice maxOccurs="unbounded">
    <xs:element ref="tblCompany"/>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    And, here's how my repeater code now looks. It works fine. The other scenario
    that probably
    would've worked with my first newsgroup post would to not have created a tblCompanyRowSet
    XML structure, and just made the dataSource={pageFlow.allRows.tblCompanyArray}.
    <netui-data:repeater
    dataSource="{pageFlow.allRows.tblCompanyRowSet.tblCompanyArray}">
    <netui-data:repeaterHeader>
    <table cellpadding="2" border="1" class="tablebody" >
    <tr>
    <td>companyId</td>
    <td>companyName</td>
    <td>webAddress</td>
    <td>updateBy</td>
    <td>updateDt</td>
    </tr>
    </netui-data:repeaterHeader>
    <netui-data:repeaterItem>
    <tr>
    <td><netui:label value="{container.item.companyId}"></netui:label></td>
    <td><netui:label value="{container.item.companyName}"></netui:label></td>
    <td><netui:label value="{container.item.webAddress}"></netui:label></td>
    <td><netui:label value="{container.item.updateBy}"></netui:label></td>
    <td><netui:label value="{container.item.updateDt}">
    <netui:formatDate pattern="MM/dd/yy: HH:mm z"></netui:formatDate>
    </netui:label></td>
    </tr>
    </netui-data:repeaterItem>
    <netui-data:repeaterFooter></table></netui-data:repeaterFooter>
    </netui-data:repeater>

Maybe you are looking for

  • Need help with actions and droplets

    I've created an action, but it won't OPEN a file, I have to open the file manually, then start the action.  I need this action to work in a droplet for over 300 images, so it would REALLY be nice if I could automate the entire process.  My action is:

  • Is there a way to NOT delete apps from iPhone?

    I know, odd question. However, sometimes my son gets a hold of my phone, holds his finger on the screen too long, and then he has the ability to delete apps. I can restore them during the sync, but I'm wondering if there is a way to shut this off wit

  • Greater than 4000 characters in OBIEE 11g

    Dear all, I have a table, just one column. In Analysis, I designed a table with this column content the data as text greater than 4000 characters. Can I show all of them in OBIEE ? Can I change the column datatype? Anyone help me to resolve this issu

  • PSE Organizer 9 Unstable adding captions

    I have Adobe Photoshop Elements & Premiere Elements 9 and since installing it approximately 12 months ago  I have had instability problems with the Elements 9 Organizer, particularly whilst I am attempting to add captions. A "Change Caption" drop dow

  • Abap mapping problem

    Hi friends, I am trying Abap mapping in my scenario. I am using DOM parsers By default the first line of the output xml document generated is <b><?xml version="1.0" ?></b> But I want to add encoding to it. i.e it should be <b><?xml version="1.0" enco