Message box in function that returns a list deletes the created list... (Dialog box)

Hello

I work with a complex dialogue, its purpose is to manage a section in the PDF file.

I use a "mclv" object in the dialog box to represent data entries in the PDF file in order to manage the result in another section.

I created a function that creates the list based on a previous section in the PDF object, the function works perfectly well.

But I have a small question, the function used to create the list of the dialog box object performs a check with the former front list created, as appropriate,

and if in any case it is different from the old list, I need to warn the user that the list has changed and if there were any changes applied to the result it will be returned to zero and must be recreated.

But when the poping that message box, all lists are deleted and nothing is displayed in the objects 'mclv.

If I remove the message box, the lists are all very well...

Is there anyone who have come across something like this before? If so, any solution to this problem?

I asked my question a bit too quickly, I already found a work around

But I still don't understand why he behaves like that tho...

I just thought how to work around this problem.

If anyone has encountered this problem can use this solution:

Instead of having the message inside the function to return box, I declared a global Boolean variable to the Script object

If the message box must be displayed, the Boolean value is set to True

Once in the initialize event of the dialog box, if the value Boolean true I call the message box and reset the value Boolean false

Tags: Adobe LiveCycle

Similar Questions

  • Create the object type with a member function that returns an array of the object type

    Hello

    Is possible to compile code like this in Oracle SQL?

    CREATE OR REPLACE TYPE type_obj IS OBJECT (
      MEMBER FUNCTION f RETURN table_obj
    );
    
    CREATE OR REPLACE TYPE table_obj AS TABLE OF type_obj;
    
    

    In Java, it would be possible.

    Thanks in advance

    Circular dependencies must be resolved by means of REF pointers and incomplete type definition.

    See: Oracle objects management

    CREATE or REPLACE TYPE type_obj;

    /

    CREATE or REPLACE TYPE table_obj AS TABLE OF ref type_obj;

    /

    CREATE or REPLACE TYPE type_obj () IS OBJECT

    fake number

    Table_obj RETURN of the FUNCTION MEMBER f

    );

    /

    Now, it must implement the body of type.

    Note that a table of the REFs is not very useful in the plain of PL/SQL, the underlying data must be stored in a nested table if you want to use.

  • Function that returns null instead of the expected value

    I use SQL Developer version 3.2.20.09. When I run a certain custom stand-alone function, I get a result null instead of the numeric result. Other people in my workgroup to get the correct result. When I run the function by using SQL Plus, I get the expected result. Is it possible there are a few settings in SQL Developer that is causing this behavior?

    Any ideas appreciated.

    -Debi

    Yes, but without seeing your code, it is difficult to know for sure. The first thing I would check is your NLS settings in tools > Preferences.

  • Go to a function that returns a Boolean

    Short version of the question: Boolean values can be returned by a pl/sql function?

    I've implemented a short function which returns a Boolean value; When I compile it I get an error:

    Error report:

    ORA-06550: line 5, column 32:

    PLS-00382: expression is of the wrong type

    ORA-06550: line 6, column 4:

    PLS-00306: wrong number or types of arguments in the call to "PUT_LINE '.

    ORA-06550: line 6, column 4:

    PL/SQL: Statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    * Action:

    The closest, I appealed


    RETURN sys.diutil.bool_to_int (< foo >);


    and then a caller script can call


    sys.diutil .int_to_bool (< bar >);

    at least this way there is no verification of the Boolean value of 'manual '.  Is it really the only way to return / call a Boolean?


    Thank you

    Chris


    EDIT


    I was aware of the fact I had not provided examples of code - and was just one question fairly open. I hope that this example will show what does not work!


    I have a function that returns a Boolean value:


    create or replace

    FUNCTION myFunc (s_in IN VARCHAR2) RETURN a Boolean value

    IS

    s_out BOOLEAN: = TRUE;

    BEGIN

    RETURN s_out;

    END FUNCTION3;

    I try and call the function in the following script:

    DECLARE

    s_in varchar2 (20): = "Hello";

    s_out boolean;

    BEGIN

    SELECT myfunction (s_in) INTO s_out FROM DUAL;

    END;

    That's when I get the error. But sorry, I was looking for too many error messages! I have worked that the one I posted above is because put_line can accept only strings and numbers not Boolean, the mistake that this function returns is:

    ORA-06550: line 5, column 32:

    PLS-00382: expression is of the wrong type

    ORA-06550: line 5, column 11:

    PLS-00382: expression is of the wrong type

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    * Action:

    However, I suppose that the comment of Frank Kulash is perhaps the reason why I see this?


    Post edited by: 2922851

    Hi, Chris,.

    2922851 wrote:

    Short version of the question: Boolean values can be returned by a pl/sql function?

    Sure.  If you are having problems, post your code (both the function and some PL/SQL that calls it).

    The BOOLEAN data type exists only in PL/SQL, not in SQL, so if the function returns a BOOLEAN value, then you can't call it in a SQL statement, even if this SQL statement is used within PL/SQL.  For this reason, a lot of guys write functions that return a NUMBER (1 or 0) or a string (' t ' or 'F') rather than return a BOOLEAN value.

    I've implemented a short function which returns a Boolean value; When I compile it I get an error:

    Error report:

    ORA-06550: line 5, column 32:

    PLS-00382: expression is of the wrong type

    ORA-06550: line 6, column 4:

    PLS-00306: wrong number or types of arguments in the call to "PUT_LINE '.

    ORA-06550: line 6, column 4:

    PL/SQL: Statement ignored

    06550 00000 - "line %s, column % s:\n%s".

    * Cause: Usually a PL/SQL compilation error.

    * Action:

    This error indicates a problem calling put_line; It has nothing to do with what returns the function.

  • Looking for an example of "function that returns the error text.

    Environment: APEX 3.1.1.00.09 on AIX 5.3

    I'm looking for an example implementation of the posting of the "function that returns the error text.

    I would like to write a database function that does the validation logic and return the text of the error.

    Is it possible to create multiple lines of text of error based on error conditions?

    I'm trying to use it at the end of the input data to go on the set of the 'document' to the entry and highlight all error conditions encountered before the 'document' is subject to additional processing.

    I wrote the function and reference it in a posting as ' validate_stuff (: P3_DOC_SEQ); »

    I have an error message "validate_stuff is not a procedure or is not defined.

    The object is a function, not a procedure. It is defined to return a parameter VARCHAR2 hoped posting if it is not NULL.

    When I run the SQL function * more and spend in a number of documents are returned the correct error messages.

    Any direction is greatly appreciated.

    -gary

    Hi Gary,.

    You must RETURN the result of the function:

    BEGIN
     RETURN validate_stuff(:P3_DOC_SEQ);
    END;
    

    Andy

  • ADF Faces: RicheTableau - how to create a richeTableau method of bean datacontrol object that returns a list of objects

    Build JDEVADF_12.1.2.0.0_GENERIC_130608.2330.6668

    I have a data bean control method that returns a list of SearchResultRow objects. Each SearchResultRow has a list of SearchResultColumn objects. SearchResultColumn is the attribute name, value, type of data.

    The method returned data looks like:

    SearchResultRow {col1, a1, string}, {col2, a2, date}, {col4, 13, number}, {col4, a4, string}

    SearchResultRow {col1, b1, string}, {col2, b2, date}, {col4, 23, number}, {col4, b4, string}

    SearchResultRow {col1, c1, string}, {col2, c2, date}, {col4, 33, number}, {col4, c4, string}

    I try to display searchResult table depending on whether it

    col1 col2 col3 col4

    A1 a2 a4 13

    B1 b2 b4 23

    C1 c2 c4 33

    I drag my return value of method to the jsf page to create a link to the tree.

    < Tree IterBinding = "retrieveSearchResultsIterator" id = "SearchResultRow" >

    < nodeDefinition DefName = 'model. SearchResultRow"name ="SearchResultRow0">

    < AttrNames >

    < item Value = "resultType" / >

    < / AttrNames >

    < accessors >

    < item Value = "searchResultColumns" / >

    < / accessors >

    < / nodeDefinition >

    < nodeDefinition DefName = 'model. ResultColumn"name ="SearchResultRow1">

    < AttrNames >

    < item Value = "name" / >

    < item Value = 'length' / >

    < item Value = "query" / >

    < item Value = 'type' / >

    < item Value = 'value' / >

    < / AttrNames >

    < / nodeDefinition >

    < / tree >

    On my jsf page, I added a table then reused the liaison of the tree.

    < af:table value = "#{bindings." SearchResultRow.collectionModel width}"= '100% '.

    var = "row" rowBandingInterval = "0" id = "t3" binding = "#{backingBeanScope.backing_Test4.t3}" partialTriggers ="": b1 ' columnStretching 'last' = > "

    My thought is in backing bean, loop through the table variable "line" which is my SearchResultRow and then loop SearchResultColumns of the line to build the RichColumn and add it to the table.

    My question is: is this feasible? How can I get hold of the var 'line' backing bean?

    Any other suggestions how to proceed?

    Thank you.

    I thought about it the adf table creation dynamically.

    This link is useful. ORACLE ADF (Application Development Framework): creating dynamic table

  • How to expose a function that returns a XML as a Web Service?

    ---------------------------------------------------------------------------------
    Oracle Database 11 g Release 11.2.0.3.0 - 64 bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production."
    AMT for 64-bit Windows: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    ---------------------------------------------------------------------------------

    After reviewing the documentation of oracle on the generation of xml data in the database, I managed to select normal tables and return a result xml exactly as I want:
    -- My types
    create or replace 
    TYPE CHILD_T AS OBJECT ("@ID" VARCHAR2(20), "@NAME" VARCHAR2(20));
    
    create or replace 
    TYPE CHILDREN_T AS TABLE OF CHILD_T;
    
    create or replace 
    TYPE PARENT_T AS OBJECT ("@ID" VARCHAR2(20), CHILDREN CHILDREN_T );
    
    -- The actual select
    SELECT XMLFOREST (
                PARENT_T(d.id,
                CAST ( MULTISET (SELECT c.id, c.name
                                 FROM child c
                                 WHERE c.parent_id = p.id) AS CHILDREN_T )
                ) AS "Parent"
            ) 
    FROM parent p;
    That gets me this:
    <Parent ID="1">
        <CHILDREN>
            <CHILD_T ID="1" NAME="xxxxx" />
            <CHILD_T ID="2" NAME="yyyyy" />
            <CHILD_T ID="3" NAME="zzzzz" />
        </CHILDREN>
    </Parent>
    It's perfect, but how to expose this result as a Web Service like this link?
     http://localhost:8080/orawsv/MY_USER/GET_CHILDREN?wsdl
    I tried this function:
    FUNCTION GET_CHILDREN (
        PARENT_ID IN VARCHAR2
    ) RETURN CLOB
    AS
        L_RESULT CLOB;
    BEGIN
        SELECT to_clob(XMLFOREST (
                PARENT_T (p.id,
                CAST ( MULTISET (SELECT c.id, c.name
                                 FROM child c
                                 WHERE c.parentId = p.id) AS CHILDREN_T )
                ) AS "ParentObj"
          )) AS MY_XML INTO L_RESULT
        FROM parent p
        WHERE p.i = PARENT_ID;
    
        RETURN (L_RESULT);
    END GET_CHILDREN;
    But when I access although .NET Compact Framework, I get this: "'Element' is an invalid XmlNodeType.

    As you can see, I just need a simple way to transport information between a Windows CE handheld computer and our database. Use functions that return simple values.
    Do I have to return the data as xml?
    What return value I should use? Varchar2 throws a buffer error output.

    ---------
    It is my first post here, also my first contact with OracleDB, and Web Services.

    Hello

    Welcome to Oracle and XML DB!

    After reviewing the documentation of oracle on the generation of xml data in the database, I managed to select normal tables and return a result xml exactly as I want:

    Have you also read about the SQL/XML functions?
    You don't have to create objects of type SQL to generate XML data.

    Using only XMLElement, XMLAgg, XMLAttributes, etc., you should be able to generate any kind of structure complex relational data and with total control over the names (which you don't have with the types of objects).
    Your example can be rewritten to:

    SELECT XMLElement("Parent",
             XMLAttributes(p.id as "Id")
           , XMLElement("Children",
               (
                 SELECT XMLAgg(
                          XMLElement("Child",
                            XMLAttributes(
                              c.id as "Id"
                            , c.name as "Name"
                            )
                          )
                        )
                 FROM child c
                 WHERE c.parent_id = p.id
               )
             )
           )
    FROM parent p
    WHERE p.id = :parent_id ;
    

    It's perfect, but how to expose this result as a Web Service like this link?
    [...]
    Do I have to return the data as xml?

    Yes.
    Define the return as XMLType data type:

    FUNCTION GET_CHILDREN (
        PARENT_ID IN VARCHAR2
    )
    RETURN XMLTYPE
    AS
        L_RESULT XMLTYPE;
    BEGIN
    
      SELECT XMLElement("Parent",
               XMLAttributes(p.id as "Id")
             , XMLElement("Children",
                 (
                   SELECT XMLAgg(
                            XMLElement("Child",
                              XMLAttributes(
                                c.id as "Id"
                              , c.name as "Name"
                              )
                            )
                          )
                   FROM child c
                   WHERE c.parent_id = p.id
                 )
               )
             )
      INTO L_RESULT
      FROM parent p
      WHERE p.id = PARENT_ID ;
    
      RETURN (L_RESULT);
    
    END GET_CHILDREN;
    
  • a function that returns the type with a table joint!

    Good day to all,
    I have a function that returns a type.

    so I select it as:
    Select * from table (function (param1, param2))

    now I want to combine this with a table so that the settings for the service we get from the join table. Is this possible? And how?
    I tried different options without success.

    something like:
    Select *.
    table table (function (b.column1, b.columnb) x), tablea b
    where x.a = b.col

    Is this possible?

    Thanks in advance?

    user564819 wrote:

    something like:
    Select *.
    table table (function (b.column1, b.columnb) x), tablea b
    where x.a = b.col

    Is this possible?

    Somehow...

    SQL> create or replace type TIntegers is table of integer;
      2  /
    
    Type created.
    
    SQL>
    SQL> --// our sample pipeline simply spews 2 numbers for eevry number input - simple
    SQL> --// to use for the testcase below
    SQL> create or replace function FooPipe( n number ) return TIntegers pipelined is
      2  begin
      3          pipe row( trunc(n) );
      4          pipe row( trunc(n)*-1 );
      5          return;
      6  end;
      7  /
    
    Function created.
    
    SQL>
    SQL> with dataset( n ) as(
      2          --// ignore this part as it only builts a base table
      3          --// for us to use to select values for input to
      4          --// to the pipeline - in "real world" use this table
      5          --// will already exist
      6          select
      7                  level
      8          from    dual
      9          connect by level <= 10
     10  ),
     11  pipe_line( n, array ) as(
     12          --// we run the pipeline as a nested table column
     13          --// in the SQL projection - the CAST is important
     14          --// in order to establish the nested table type
     15          select
     16                  d.n,
     17                  cast(
     18                          FooPipe(d.n) as TIntegers
     19                  )
     20          from    dataset d
     21  )
     22  --// we now use a standard query to unnest the nested table column
     23  select
     24          p.n,
     25          pipe_val.*
     26  from       pipe_line p, TABLE(p.array)  pipe_val
     27  /
    
             N COLUMN_VALUE
    ---------- ------------
             1            1
             1           -1
             2            2
             2           -2
             3            3
             3           -3
             4            4
             4           -4
             5            5
             5           -5
             6            6
             6           -6
             7            7
             7           -7
             8            8
             8           -8
             9            9
             9           -9
            10           10
            10          -10
    
    20 rows selected.
    
    SQL>
    

    Not sure I like it. What is the real problem that this method (driving a pipeline with input of a base table rows) is supposed to address? There may be a simpler and more elegant approach...

  • Function that returns only numbers

    Is it possible to have a SQL function that returns only numbers in a varchar?

    Example:

    My PHONE_NUMBER table contains a field with a phone number in VARCHAR2, it can contain:

    1-888-444-5555 or (514) 444-6666 or 514-222-4444 ext: 100


    I want to have a fuction which back me:

    18884445555 and 5144446666...


    Thanks for the help

    Hello

    For a copy of the string s with everything except the numbers (0-9), was deleted:

    REGEXP_REPLACE ( s
                   , '[^0-9]
                   )
    

    The expression above will work in Oracle 10 and higher.
    In any version, you can use TRANSLATE to remove the numbers, then reuse TRANSLATE to remove these characters from the s.

    TRANSLATE ( s,
           , '0' || TRANSLATE ( s
                                  , 'A0123456789'
                        , 'A'
                        )
           , '0'
           )
    
  • How to call a function that returns a SYS_REFCURSOR?

    Here's the situation.
    If I use ODP. NET to get a REF_CURSOR of a procedure in a package that it works without a hitch.

    If I use ODP .NET to run an Oracle function that returns a REF CURSOR, all sorts of things fool you.
    I use .NET 3.5 and ODP .NET version 2.112.1.2 (11 G). My Oracle database is 9.2.0.7.0

    There is this function returns a REF CURSOR.
    The code looks something like this.
    CREATE OR REPLACE FUNCTION SENDMEAREFCURSOR RETURN SYS_REFCURSOR IS
      X_REF genPkg.genericcursor;
    BEGIN
      OPEN X_REF for
        SELECT customer_id, name FROM CUSTOMERS;
      Return X_REF;
    END;
    .NET code looks like this. It's after a few adjustments.
            private static OracleDataReader FireMyFunc(OracleConnection oc)
            {
                try
                {
                    OracleCommand cmd = new OracleCommand();
                    cmd.Connection = oc;
                    //cmd.CommandText = "SELECT sendmearefcursor FROM DUAL";
                    //cmd.CommandType = System.Data.CommandType.Text;
                    cmd.CommandText = "sendmearefcursor";
                    cmd.CommandType = CommandType.StoredProcedure;
                    OracleParameter prm = cmd.CreateParameter();
                    prm.OracleDbType = OracleDbType.RefCursor;
                    prm.ParameterName = "returncurse";
                    prm.Direction = ParameterDirection.ReturnValue;
                    cmd.Parameters.Add(prm);
                    cmd.ExecuteNonQuery();
                    return (OracleDataReader) prm.Value; //Throws an UnableToCast exception.
                }
                catch (System.Exception ex)
                {
                   Console.WriteLine(String.Format("FireMyFunc: {0}",ex.ToString()));
                    throw;
                }
            }
    What should I do to get the refCursor?

    Hello

    You can use the GetDataReader of the OracleRefCursor object to return the datareader object.

    OracleRefCursor rc is prm (OracleRefCursor). Value;
    return of rc. GetDataReader();

    HTH
    Jenny

  • Function that return the name of the current report

    Hello

    Anyone know if there is a function that returns the name of the current report?, similar to GET_APPLICATION_PROPERTY (CURRENT_FORM) in the forms.


    Tnks,


    LEFM

    Hello

    You can use the builtin: SRW. GET_REPORT_NAME
    This function returns the file name of the running report

    http://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_get_report_name.htm

    NOTE: it is not the name of the RDF file. Is the name defined in the reporting name property.

    Concerning

  • Request report - use the function that returns the cursor

    My requirement is to create a report, which the source will be a function that returns a cursor (the type of cursor is ref cursor).
    How this can be done?

    for example. function my_func (pol_no in number) return cur_type < ref cursor >

    Edited by: viveks on October 27, 2009 10:09

    Better to look at a function that returns a query, or use a hose to treat your cursor returned, because the APEX at the moment can NOT handle the sliders in reports...

    Thank you

    Tony Miller
    Webster, TX

  • Create the view and by using the function that returns a type oracle

    Following is possible?

    A function returns an ORACLE object Type, and I want to use this feature, in my opinion, it is possible to access each field of the type once the function is executed and make a column in the view?
    create or replace TYPE SOME_INFO AS OBJECT
    ( 
      CHARGE FLOAT,
      SOME_DATE DATE,
      SOME_VAL VARCHAR(50)
    );
    
    CREATE OR REPLACE
      FUNCTION CALCULATE_INFO
        (
          p_chargeId NUMBER)
        RETURN SOME_INFO 
      AS 
      v_some_info SOME_INFO := new SOME_INFO(0, null, null);
    BEGIN
     
    -- function body populates the v_some_info
    return v_some_info;
     
    END calculate_info;
    Now, I want to use the function according to me - if the underlying query of the view follows-
     select c.*, calculate_info(c.charge_id) as someInfo from some_charge;
    How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val? I can put them as columns in the view?

    If you use only functions that return a single value in a view?

    Thank you
    Mustapha

    Published by: Tina Giri on April 16, 2009 05:47

    How to recover someInfo.CHARGE, someInfo.some_date, someInfo.some_val?

    SQL>  create or replace type some_info
    as
       object (charge float, some_date date, some_val varchar (50));
    /
    Type created.
    
    SQL>  create or replace function calculate_info (p_chargeid number)
       return some_info
    as
       v_some_info   some_info := new some_info (0, null, null);
    begin
       -- function body populates the v_some_info
       return v_some_info;
    end calculate_info;
    /
    Function created.
    
    SQL>  select your_view.someinfo.charge,
           your_view.someinfo.some_date,
           your_view.someinfo.some_val
      from (select c.*, calculate_info (c.empno) as someinfo
              from emp c) your_view where rownum <= 3
    
    SOMEINFO.CHARGE SOMEINFO SOMEINFO.SOME_VAL
    --------------- -------- --------------------------------------------------
                  0
                  0
                  0                                                            
    
    3 rows selected.
    
  • Whenever I try to delete files from my USB, the message saying that you can not delete the file, the disk is write protected

    original title: write protection

    Whenever I try to delete files from my USB, the message saying that you can not delete the file, the disc is write protected is displayed. What I can do to undo the write protection?

    Try this
    Go to disk management in administrative tools of the control by just one panel right click on the icon my computer on the desktop and select manage and then try to format your USB

    OR

    Try this
    http://www.ehow.com/how_5187399_format-write-protected-disk.html

  • Function that is supposed to change the label of a button

    I have a function that is supposed to change the label of a button component.

    "< mx:Button ="190"x ="266"id ="payoffType"labelPlacement = 'left' icon="@Embed (source ='... Toggle.png') "label ="-call ' width = '78' >
    < mx:click >
    <! [CDATA]
    updateLabels();

    []] >
    < / mx:click >
    < / mx:Button >

    public function updateLabels (): void
    {
    If (payoffType.label.slice (4, 5) is 'P')
    {

    payoffType.label = currencyPair.selectedLabel.slice (0, 3) + "Call";
    }
    on the other
    {
    payoffType.label = currencyPair.selectedLabel.slice (0, 3) + "Put";
    }
    }

    However once this is called it will update the datatip buttons (for example ' GBP Put ' that you see when you hover over the button) and the label of the button is set to "GBP" -

    Please please advise

    I think there can be question of width of button, do slightly increased it in & see what it shows as the label.

Maybe you are looking for