problem in the groovy expression

Hi all
I have three attributes: "WorkDateFrom", which is of type Date and "Working days" which type number and "WorkDateTo", of type Date.

the value of 'WorkDateTo' must be
WorkDateFrom+WorkDays
After the execution of the Application Module to test. I write the value of "WorkDateFrom" and the value of "Working days", the WorkDateTo value will be zero.
This expression is wrong?

Just tested on the opinion of the employees in the HR schema. My groovy expression

HireDate+DetartmentId.intValue()

Displays the correct result. So, if your WorkDateFrom is of type Date and days of work is of type number and then

WorkDateFrom + WorkDays.intValue()

should work. Always check null values.

Timo

Tags: Java

Similar Questions

  • problems with transient attributes using the Groovy Expressions on MySQL db

    Hello

    I m using jdev 11.1.2.4 and DB MySqll.

    Ive created the city and country of two tables.

    In the city of the table, there are foregin touch to amalgamate it at the table of the country.

    JDevelper have created associations and viewlinks of these paintings that I tested with ADF Model Tester and they are looking good.

    I created a transitional CountryName column and set the default (as Expression) Country1.CountryName.

    Now when I run the tester of ADF model once again, I get below error

    oracle.jbo.JboException: Houston-29000: Unexpected exception caught: java.lang.NullPointerException, msg = cannot get the "CountryName" null object property

    at oracle.jbo.ExprEval.internalEvaluateGroovyScript(ExprEval.java:1218)

    at oracle.jbo.ExprEval.doEvaluate(ExprEval.java:1253)

    at oracle.jbo.ExprEval.evaluateForRow(ExprEval.java:1075)

    any ideas?

    Thank you

    RESET query cache with RESET QUERY CACHE statement.

    http://dev.MySQL.com/doc/refman/5.0/en/query-cache-status-and-maintenance.html

    Clear the cache JDeveloper.

    Jdevloper clear cache and weblogic server

  • Transient attributes using the Groovy Expressions

    Hi all

    I have EmpView, contain DeptId, I create the transient DeptName attribute and wrote in the DeptViewexpression. DeptName, to retrieve DeptName of DeptView,

    I've seen link between DeptView and EmpView and I check the Source accessor to the View In object and writes the name of the evaluator: DeptView,

    When run AppModule, give me what error (cannot get the "DeptName" on the null object property) DeptId = Null in EmpView.

    I want to ignore DeptView. DeptName when get back Null in the Expression,

    Jdev 12.1 c

    Thanks in advance,

    In this case, use

    If (DeptId! = null) {DeptView.DeptName}

    Timo

  • problem of the regular expression?

    Hi I have a file that contains the following text

    < cfset objNews.strNewsTickerLink = "index.cfm? pageid = 83" >

    Now what I want to do is to scrape the value of this variable for example "index.cfm? pageid = 83. Now, this variable can be different... so basically regardless of the value of the variable objNews.strNewsTickerLink is on... I want to get it out. Now, I'm not that great with regular expressions... can someone help me?

    THX

    Thank you... but I found a even better who does the work for me

    http://CFLib.org/UDF/GetContainer

  • Error with groovy expression of sequence number of EO attribute assignment?


    Hello world

    My version of Jdeveloper is 11.1.2.3.0.
    Starting from this post: https://tompeez.wordpress.com/category/adf/page/6/
    I found to add a groovy expression for the sequence number to my attribute. I created a single sequence and added that the groovy expression to my attribute but got the error below:

    Utils > < buildFacesMessage > ADF: addition of the following JSF error message: failed to start, bc4j_model_TestEntityObject_Empno_null_gs.groovy: 1: lack of hook closing ' > ' for generic types.
    solution: Please specify the missing support! @ line 1, column 12.
    1 error

    org.codehaus.groovy.control.MultipleCompilationErrorsException: failed to start, bc4j_model_TestEntityObject_Empno_null_gs.groovy: 1: lack of hook closing ' > ' for generic types.
    solution: Please specify the missing support! @ line 1, column 12.
    1 error

    Note: groovy expresion used in my EO attribute is given below:
    (new class < SPAN > 'skimlinks-fidget' = > oracle.jbo.server.SequenceImpl ("SampleSeq", adf.object.getDBTransaction ())) .getSequenceNumber </span >)

    also used:
    (new class < SPAN > 'skimlinks-fidget' = > oracle.jbo.server.SequenceImpl ("SampleSeq", adf.object.getDBTransaction ()) .getSequenceNumber () </span >

    What can be the problem?
    Please give me your valuable contributions...


    Thank you.

    Sorry, somehow the code in the blog is messed up. Use

    (new oracle.jbo.server.SequenceImpl ("SampleSeq", adf.object.getDBTransaction ()) .getSequenceNumber)

    Where SampleSeq is the name of the sequence defined in the comic book.

    Timo

  • mail electronic outlook express pop - up-"outlook express has encountered a problem and the need to close.

    I am running XP.

    When I select an email or try to create an e-mail, I get the Outlook Express "pop up" where it is said

    "outlook express has encountered a problem and need to close... Sorry ".  Asks me if I want to send a message
    for Microsoft, when I click on the option, the screen freezes and I have to type the keys del Alt, control, in order to free
    and end of the task.

    You may have a damaged identity especially if it's the default main identity. File | Identities | Add the new identity. Create a new one and try it. If all goes well, you can import your messages and address book from the old identity and delete it.

    Note: Do not use the main word in the name of the new identity.

  • Groovy expression in the output text

    Hi all

    I want to use groovy expression in the output as text

    < af:outputFormatted value = "#{adf.currentDate}" id = "2" / > "

    < af:outputFormatted value = "#{adf.userSession.userData.user}" id = "2" / > "

    but the values are not seen at the exit and the value to the property inspector area becomes red...

    This is because groovy can be used on the side of the model. For the user interface, you use the expression language.

    For the user, you can use adfsecurity information (control http://docs.oracle.com/cd/E14571_01/web.1111/b31974/adding_security.htm#CHDFFGDJ)

    To date, you must implement a bean method that you call via EL.

    Timo

  • Could someone explain to me what is the problem with this refined expression?

    Hi, could someone explain to me what is the problem with this refined expression

    faultCode:Server.Processing faultString:' unable to invoke CFC - regular expression malformed ' ^ [0-2][0-9][/][0-1][0-2][/][1-2][0-9]{3}+$ '.»»

    Thank you

    I think that the + should not be there. Do you have a match?

  • Express in the problem of the extension of the airport

    Airport utility wants to know why my airport express that I use as an Extender, continues to display lines ranging from solid to dashed. I have a line full on the Internet at the airport extreme, then spotted extreme express Airport express line to go solid and I have to keep back my password to restart dashed.  Any thoughts?

    A strong AirPort Extreme in the AirPort Express line indicates that the current connection using an Ethernet cable. A dashed line indicates that the AirPort Express connects only to the AirPort Extreme wireless use.

    What type of connection do you want to Express to use?

    What camera did you use to configure the AirPort Express Terminal?

  • The regular expression problem

    Dear friends,

    In my script I have some sections that test the contents of an edit field before it is processed further.

    Perfectly things like the following:

    var re_Def = /#[A-Za-z][A-Za-z0-9_]+/;          // valid variable name ?
    items = ["#correct", "notcorrect", "#This_is4", "#thisIs", "@something", "#ALLOK", "", ];
    // search    0            -1          -1!!        -1!!          -1        -1!!     -1      <--- incorrect method
    // test    true         false         true        true        false       true    false    <--- correct method
    for (var j = 0; j < items.length; j++) {
      var item = items[j];
      alert ("'" + item + "' ==> " +  item.search(re_Def) + "\n" + re_Def.test(item));
    }
    var re_Def = /(\[ROW +\d+\]|\[COL +\d+\]|\[CELL +\d+, +\d+\]|Left *\(\d*\)|Right *\(\d*\)|Above *\(\d*\)|Below *\(\d*\))/;
    items = ["[ROW 17]", "[Row n]", "[ROW n]", "[CELL 3, 9]", "[CELL 3 9]", "Abbove()", "Right(3)"];
    // result  true        false      false         true         false        false         true    
    for (var j = 0; j < items.length; j++) {
      alert ("'" + items[j] + "' ==> " +  re_Def.test(items[j]));
    }
    

    But what follows always returns false, independly of the content of the string element:

    var re_Def = /{[EFJ]\d*}|{I}/;    // valid format def?
    var item = "{E27}";
    var result = re_Def.test(item);
    alert (result);                   // false !!
    

    RegEx buddy told me, that
    -l' REGULAR expression is correct
    -the result must be true, not false

    -The verbose definition of the RegEx is:
    Match is the following regular expression (attempting the next alternative only if this one fails) "{\d* [EYF]}."
    Match the character "{" literally "{}".
    Match a single character present in the list "J" "[EYF]."
    Match a single digit 0. 9 paper"\d*»
    Between zero and unlimited times, as many times as possible, giving as needed (greedy) «*»
    Match the character "}" literally "}".
    Or match number 2 below (the entire match attempt fails if it cannot match) regular expression "{i}".
    Match the characters "{i}" literally "{i}".

    Typo unrecognized? Test the faulty method?

    Results are fake, as soon as I use the list of characters []] - but look at the first block of code: there are also lists of character they are treated properly.

    The braces in the regular expression must be escaped to be taken literally:

    var re_Def = /\{[EFJ]\d*\}/;
    

    Kind regards

    JoH

  • Groovy expression if statement in the af source: image

    Hello guys, I have a servlet that streams a picture in af source: image, I wanted to put a picture by default if the flow of the servlet is null, I tried to use the EL expression (/showimage? imageId = #{sessionScope.username == null? sessionScope.username: resource ['images: default.jpg']}), I think I have the syntax here error... anyhelp? Thanks in advance.  Saidi.

    You can do this using EL, you must check in the servlet itself as the servlet does not return a value for you to check. Instead of trying to check it at the page level, check in the servlet itself and render the image by default if you do not get the actual flow.

    Timo

  • problem with the validation type: regular expression

    Hi all
    I have a text field element call p40_opt
    in the past, this element could accept only the values 1-9
    I made a posting type: regular expression
    1 validation expression:
    p40_opt

    2 validation expression:
    [1-9]

    works very well.

    Today, I wanted to add an option that p40_opt can also contains the value: 10
    so I changed the range [1-10].

    and now, it's not good because if I choose another option plus 1 and 10 to Ant

    he do the validation.

    what I'm missing here?
    Thanks in advance

    Under the direction of: naama on August 6, 2009 01:31

    The forum software has mutilated regular expressions in your message. You should edit, wrapping up the regular expressions in.

     tags so they are properly displayed.
    

    ^ [1-9] {1} $. ^ $ 10

    would be one regular expression that performs the required validation, however a regular expression doesn't appear to be the most straightforward way to validate such a range of values. A SQL or PL/SQL validation would be clearer, using the expression:
    

    : p40_opt between 1 and 10

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
    
  • How to call a method defined in AppmoduleImpl using a groovy expression?

    Hi experts,

    With the help of jdev 11.1.1.5.0 - adfbc battery.

    I followed this post as the blogger says.
    How to call a method defined in AppmoduleImpl using a groovy expression?
    https://blogs.Oracle.com/ADF/entry/how_to_call_a_method

    While a button insert hit

    Suite error survey.
    java.sql.SQLException: ORA-20483: ADM-
    ORA-06512: at "RMSTD.FUNC_FIND_PLNT_DESC", line 22
    ORA-06512: at line 1
    
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
    It is my code for the function.
    CREATE OR REPLACE FUNCTION func_find_plnt_desc (
       p_bu        VARCHAR2,
       p_plnt_id   VARCHAR2,
       p_lang      NUMBER
    )
       RETURN VARCHAR2
    IS
       CURSOR cur_find_plant
       IS
          SELECT bup_name1, bup_name2
            FROM bus_unit_plants
           WHERE bup_bu = p_bu AND bup_plant_id = p_plnt_id;
    
       rec_find_plant   cur_find_plant%ROWTYPE;
    BEGIN
       OPEN cur_find_plant;
       FETCH cur_find_plant INTO rec_find_plant;
    --RAISE_APPLICATION_ERROR(-20999,P_BU||P_PLNT_ID);
       IF cur_find_plant%NOTFOUND
       THEN
    
          raise_application_error (-20483, 'ADM' || P_PLNT_ID ||'-'||P_BU);
          --NULL;
       END IF;
    
       CLOSE cur_find_plant;
    
       IF p_lang = 1 THEN
          RETURN (rec_find_plant.bup_name1);
       ELSIF p_lang = 2 THEN
          RETURN (rec_find_plant.bup_name2);
       END IF;
    END;
    /
    Reason behind:
    while hitting the insert means null from the value of the survey so error function.

    If am not hitting doesn't mean no problem. the function works correctly return description.

    can someone help me how to override?

    Published by: ADF7 on April 10, 2012 23:51

    ADF7,
    the subject of the post has nothing to do with the question (for as far as I see it).
    As you can see the error message clearly comes from the procedure pl/sql you call the application module, works of groovy appeal method.

    We cannot decide what makes your service if you pass null as a parameter. You can check the settings before you proceed to the procedure or write the procedure in how it treats null parameters.

    Timo

  • The AirPort Express Terminal is good enough for me?

    I need a new wireless router to replace my Netgear WNDR4300 'antiques '.  The network is only 2-3 laptops and iPhones 1-2 at a time, over a printer and Chromecast device.  We occasionally video stream, but not often.  Critics say the AirPort Express is best purchased as an add-on to an existing network, but I can't justify more expensive options from the airport.  I don't need the 11ac 802 that offer other options, and it seems that margin would be a problem, because it is limited to 5 GHz.  We have a two-storey house. Is the simple terminal AirPort Express good enough for my home network?

    The AirPort Express, pourraient deliver similar performance to your old Netgear router in terms of signal strength and the beach... but the only way to know with certainty if the Express will be good enough for your needs is to try in your home.

    Try to locate the Express up high on a shelf or Cabinet, if you can, to help in the dissemination of the signal.

    Fortunately, if you buy through Apple, you have one day 14, no questions asked return privilege, so if the Express does not provide the performance you need, you can return the unit for Exchange or a refund.

  • MacBook Air Mid 2011 Wifi only next to the Airport Express

    Hey everybody!

    These days I have trouble with one of my MacBook Air. I plug a new as my girlfriend needs a job.

    Anyway. I have updated to OS X El Capitan and struggle with the wifi. I made an appointment at the Genius Bar closest to you to solve the problems in the system.

    As I had to download the OS X on my Mac Pro, I had a problem with the wifi these permissions switch and system information. If you scroll to the installation, there should be a list of installed software. In my case nothing.

    After that the genius of Apple erased the disk and started the installation via ethernet with an Apple Server, I got a new version of OS X El Capitan on it. Everything appears fine (system information).

    The Wifi worked perfectly in the store.

    So, I got not any chance to try at home immediately. Today, I wanted to put the macbook for other facilities. I noticed that the wifi is extremely slow.

    I deleted the cache (which does not yet exist). I have reset the starting power setting. I have reset my Airport express from Apple. I changed the DNS to google DNS (8.8.8.8./8.8.4.4.). I too turned off bluetooth.

    All without any modification.

    BUT if I'm right in front of the apple express (literally sitting on the router), the wifi works without any problem.

    Please, I beg you! I have no idea what to do next. My other Mac Air and pro work perfectly. Any distance. (They have been disabled for testing). iPhone, iPad and Apple TV work fine.

    I seem to have this problem with my MacBook, a model of early 2015. What I was told is that the Wi - Fi antenna is nested in the compartment of the screen, located on the edge, practising thus pressure deforms it. Because the body is made of aluminum, the body involuntarily also acts as an antenna, interfere with the Wi - Fi signal. Here are the two plausible reasons why sometimes the signal is lost or slows down, and it made perfect sense to me.

    Maybe it's the issue here. If that's the case then I would attribute that to the misconception. I'm sure you can get it fixed, although I don't know how you would seeing that Apple seems to weld their new machines stop.

Maybe you are looking for