Returns the time value zero calendar

Hi, I write code with calendar that return the value zero for HOUR_OF_DAY and MINUTE when I run this code in Strom2(9550-5.0.0.334) below.

Calendar calendar = Calendar.GetInstance ();
Date date = new Date (this.arrivalTimeField.getDate ());
calendar.setTime (date);
Day int = calendar.get (Calendar.HOUR_OF_DAY);
int minute = calendar.get (Calendar.MINUTE);

So please help me for this problem and thanks in advanced

I had a lot of problems like myself.  Invariably, I find that the bug is my code.  Usually, it is not difficult to find using the appropriate debug or SimpleDateFormat (because times are difficult to interpret, it is good to let the system do it for you!).  I suggest you do the same thing here.

If you find that the system does not have it that you wait, then give us the details, for example, give us the long value that you provide to the calendar and the time you go out. You should be able to do it in two or three lines, just using the standard Java RIM (i.e. None of your classes).  You can also indicate the time zone that you are testing in.

Tags: BlackBerry Developers

Similar Questions

  • Restrict the time value in the calendar

    Hello..

    How to display the calendar without time value

    When I select the date in the calendar he displayed without time, but when I hit the go button the time value is added to the prompt values.

    How to get there?

    What version of OBIEE do you use?

    The procedure is all is set correctly to get the date (without timestamp) in the dashboard caledar prompt. I explained procedure several times, then maybe you can read:

    http://108obiee.blogspot.com/search/label/date

    There are a few posts on this problem and you will find your solution there, it is very useful and you will notice that I have not timestamp in the prompt calendar inside my examples. Step by step.

    Concerning
    Goran
    http://108obiee.blogspot.com

  • : Nom_element and V ('ITEM_NAME') do not return the same value

    Hi all

    I'm developing a shared application process that is called by an AJAX request.

    For the pl/sql code, stored procedure validation e development support I moved the logic inside a database.
    So I have this situation:

    Application process

    ...
    : MYITEM: = wwv_flow.g_x01; -received setting of ajax call I want to put
    ...
    MY_FUNCTION();

    MyFunc

    ...
    v('MYITEM') - here I use value MyItem
    ...

    The problem is that when I call v ('MYITEM') the value I get is the previous and not one that I put with: MYITEM: = wwv_flow.g_x01;
    I have the same problem if I set the V ('MYITEM') inside the apex application process.

    I saw that it worked right if I use the following to set the value of the element in the application process:

    APEX_UTIL. SET_SESSION_STATE('P0_LST_DATA',:P0_LST_DATA);

    Is this a bug?
    I was expecting to get the value of the item: MONELEMENT and v ('MYITEM') are equivalent...

    Thank you
    Davide

    Davide,

    If you encode the block like that, you should get the results you expect:

    : P100_VAR1: = '1'. : P100_VAR1;
    : P100_TEST: =: P100_VAR1;

    The reason why this block does not give you what you expect:

    : P100_VAR1: = '1'. : P100_VAR1;
    : P100_TEST: = v ('P100_VAR1');

    ... is that v ('P100_VAR1') returns the current value of the item in the table of PL/SQL State session as it existed before the execution of the block. The assignment to the variable binding: P100_VAR1 has registered only a value in storage variable to bind the dynamic execution at this time and has not yet spread to session state, which is located at the end of the execution of the block. It's a little weird, we know.

    Andy,

    I figured that the: xxxx points have been settled during the loading of the page with what the source is...

    They contain the session state value and can be read or written in notation variable bind.

    However, they are updated only in the session when you send page...

    They are updated in session state when the particular block is completed and a commit is issued at this time there.

    In order to update a piece of code PL/SQL session state, you must use... apex_util.set_session_state.

    You must be careful to call it when scoring also bind variable to set the session state may cause one to deny the other. Using one method or the other should work very well.

    Scott

  • Returns the lowest value of two fields

    Hello

    I have two domains that users manually enter in a form.  Value1 and Value2.

    Someone at - it suggestions on the best way to use JavaScript to return the lowest value of the two fields?

    Thank you

    Natalie

    I think I misunderstood what you mean by any, I thought you wanted the calculated value to be None. The two fields value digital formats and modify the script for:

    Custom calculate script

    (function () {}

    Initialize the array

    aNums var = [];

    Get the field values as strings

    var s1 = getField("Value1").valueAsString;

    var S2 = getField("Value2").valueAsString;

    Convert values to numbers if not empty and add to the table

    If aNums.push(+s1) (s1);

    If aNums.push(+s2) (s2);

    Set the value of this lesser field of entries

    If both are blank, this field blank

    Event.Value = aNums.length? Math.min.Apply (null, aNums);:

    })();

  • How to reset the timer to zero?

    Good day people,

    How to reset the timer to zero?

    I have a button in the timeline relative to the code below, and when I click on it I want to the behavior of the time back to 1 or 0.

    Click the timer to 1 or 0.

    -----------------------------------

    contents_mc - timer_txt

    -----------------------------------

    _root.elapseTime = 0;

    intervalId = setInterval (this, "countDown", 1000);

    function countDown() {}

    {if (_root.timerOn)}

    ++ _root.elapseTime;

    " _root.elapseTime = _time +" "seconds";

    if(_root.elapseTime == 10) {}

    _parent.gotoAndStop ("GameOutOfTime");

    clearInterval (intervalId);

    }

    }

    }

    Stop();

    Any response will be appreciated,

    Thank you

    use:

    function resetF (): Void {}

    clearInterval (intervalID);

    intervalId = setInterval (countDown, 1000);

    }

  • Question of value Popup Lov key (description of the poster, returns the key value) by default

    Hello

    I have a Popup Lov key (description of the poster, returns the key value) and I want a default value. It is based on a list (user name, id).
    I tried to put the id of the user logged on as default, but what I see on the screen in the field is the value of the id, not the username.
    How can I pass the user id and see the user name?

    Thank you.

    Oh! My bad, I thought you are talking about regualt lOVs not popups.

    OK, so that's what you need to do, I tried it and it worked for me:

    your popup LOV > default > type: body of the PLSQL function > and enter a query like:

    declare
    UID number.
    Start
    Select user_id from the uid of the user
    where UPPER (username) = UPPER(:APP_USER);

    This should show username and retune userid.

    Hope this helps,

    Sam
    Please give good answers by marking correct or useful.

  • HypGetMemberInformation in VBA. Does not return the property values.

    I tried to use HypGetMemberInformation in VBA to find the level of a member of the grid.

    I continued to get zeros even for members who are not level 0 ones.

    I went to test HypGetMemberInformation a test connected grid that has members in the first column (column A).

    I packed a test routine I ran after you connect the grid manually:

    Void TestMemberLevelFind()

    Dim line As Integer

    Dim MemberProperties Collection As

    Dim vtMemberName As String

    ' Dim vtPropertyName As String

    Dim vtPropertyValue As Long

    Dim vtPropertyValueString As String

    Dim ErrorCode as long

    Dim ErrorMessage As String

    Define MemberProperties = new Collection

    MemberProperties.Add HYP_MI_NAME

    MemberProperties.Add HYP_MI_DIM

    MemberProperties.Add HYP_MI_LEVEL

    MemberProperties.Add HYP_MI_GENERATION

    MemberProperties.Add HYP_MI_PARENT_MEMBER_NAME

    MemberProperties.Add HYP_MI_CHILD_MEMBER_NAME

    MemberProperties.Add HYP_MI_PREVIOUS_MEMBER_NAME

    MemberProperties.Add HYP_MI_NEXT_MEMBER_NAME

    MemberProperties.Add HYP_MI_CONSOLIDATION

    MemberProperties.Add HYP_MI_IS_TWO_PASS_CAL_MEMBER

    MemberProperties.Add HYP_MI_IS_EXPENSE_MEMBER

    MemberProperties.Add HYP_MI_CURRENCY_CONVERSION_TYPE

    MemberProperties.Add HYP_MI_CURRENCY_CATEGORY

    MemberProperties.Add HYP_MI_TIME_BALANCE_OPTION

    MemberProperties.Add HYP_MI_TIME_BALANCE_SKIP_OPTION

    MemberProperties.Add HYP_MI_SHARE_OPTION

    MemberProperties.Add HYP_MI_STORAGE_CATEGORY

    MemberProperties.Add HYP_MI_CHILD_COUNT

    MemberProperties.Add HYP_MI_ATTRIBUTED

    MemberProperties.Add HYP_MI_RELATIONAL_DESCENDANT_PRESENT

    MemberProperties.Add HYP_MI_RELATIONAL_PARTITION_ENABLED

    MemberProperties.Add HYP_MI_DEFAULT_ALIAS

    MemberProperties.Add HYP_MI_HIERARCHY_TYPE

    MemberProperties.Add HYP_MI_DIM_SOLVE_ORDER

    MemberProperties.Add HYP_MI_IS_DUPLICATE_NAME

    MemberProperties.Add HYP_MI_UNIQUE_NAME

    MemberProperties.Add HYP_MI_ORIGINAL_MEMBER

    MemberProperties.Add HYP_MI_IS_FLOW_TYPE

    MemberProperties.Add HYP_MI_AGGREGATE_LEVEL

    MemberProperties.Add HYP_MI_FORMAT_STRING

    MemberProperties.Add HYP_MI_ATTRIBUTE_DIMENSIONS

    MemberProperties.Add HYP_MI_ATTRIBUTE_MEMBERS

    MemberProperties.Add HYP_MI_ATTRIBUTE_TYPES

    MemberProperties.Add HYP_MI_ALIAS_NAMES

    MemberProperties.Add HYP_MI_ALIAS_TABLES

    MemberProperties.Add HYP_MI_FORMULA

    MemberProperties.Add HYP_MI_COMMENT

    MemberProperties.Add HYP_MI_LAST_FORMULA

    MemberProperties.Add HYP_MI_UDAS

    ' For line 8 to 83 =

    For row = 8-10

    vtMemberName = ThisWorkbook.ActiveSheet.Cells (rank 1). Value

    For each vtPropertyName in MemberProperties

    Code of error = HypGetMemberInformation(ThisWorkbook.ActiveSheet.Name, vtMemberName, vtPropertyName, vtPropertyValue, vtPropertyValueString)

    If ErrorCode = 0 Then

    MsgBox _

    "The worksheet name:" & ThisWorkbook.ActiveSheet.Name & Chr (13) & _ "."

    "Member name:" & vtMemberName & Chr (13) & _ "."

    "Property type:" & vtPropertyName & Chr (13) & _ "."

    "Property value:" & vtPropertyValue & Chr (13) & _ "."

    "The property string:" & vtPropertyValueString ".

    On the other

    ErrorMessage = GetReturnCodeMessage (ErrorCode)

    MsgBox "SmartView API function HypGetMemberInformation returned an error message:" & Chr (13) & ErrorMessage, vbOKOnly, PrivateConnectionDescription

    End If

    Next

    On the next row

    End Sub

    The routine produces no result expected.

    Only of zeros.

    For all properties and all members.

    There must be something fundamentally wrong with my code.

    The function arguments are correct with regard to the name of journal, the member name and property name.

    Value of the property is always 0 and the property value string is always empty.

    Two property value arguments are expected to be passed by reference, so I should get some useful information.

    No error is generated so that the return error code is always 0.

    I guess that some prerequisite so that this function is not satisfied, but what is?

    Concerning

    Problem solved.

    The cause of all evil, as ususal, type mismatch...

    Arguments by reference:

    vtPropertyValue, vtPropertyValueString

    must be declared as variants but returned it to the values are ARRAYS...

    After the function call, to loop through these berries extract the real info returned!

    In the case of unique value of parameters such as the level of Member just use index 0, for example:

    vtPropertyValue (0)

    The corrected code is less with parts modified trhe parked in Green:

    Void TestMemberLevelFind()

    Dim line As Integer

    Dim index As Integer

    Dim MemberProperties Collection As

    Dim vtMemberName As String

    Dim vtPropertyName As Variant

    Dim vtPropertyValue As Variant

    Dim vtPropertyValueString As Variant

    Dim ErrorCode as long

    Dim ErrorMessage As String

    Define MemberProperties = new Collection

    MemberProperties.Add HYP_MI_NAME

    MemberProperties.Add HYP_MI_DIM

    MemberProperties.Add HYP_MI_LEVEL

    MemberProperties.Add HYP_MI_GENERATION

    MemberProperties.Add HYP_MI_PARENT_MEMBER_NAME

    MemberProperties.Add HYP_MI_CHILD_MEMBER_NAME

    MemberProperties.Add HYP_MI_PREVIOUS_MEMBER_NAME

    MemberProperties.Add HYP_MI_NEXT_MEMBER_NAME

    MemberProperties.Add HYP_MI_CONSOLIDATION

    MemberProperties.Add HYP_MI_IS_TWO_PASS_CAL_MEMBER

    MemberProperties.Add HYP_MI_IS_EXPENSE_MEMBER

    MemberProperties.Add HYP_MI_CURRENCY_CONVERSION_TYPE

    MemberProperties.Add HYP_MI_CURRENCY_CATEGORY

    MemberProperties.Add HYP_MI_TIME_BALANCE_OPTION

    MemberProperties.Add HYP_MI_TIME_BALANCE_SKIP_OPTION

    MemberProperties.Add HYP_MI_SHARE_OPTION

    MemberProperties.Add HYP_MI_STORAGE_CATEGORY

    MemberProperties.Add HYP_MI_CHILD_COUNT

    MemberProperties.Add HYP_MI_ATTRIBUTED

    MemberProperties.Add HYP_MI_RELATIONAL_DESCENDANT_PRESENT

    MemberProperties.Add HYP_MI_RELATIONAL_PARTITION_ENABLED

    MemberProperties.Add HYP_MI_DEFAULT_ALIAS

    MemberProperties.Add HYP_MI_HIERARCHY_TYPE

    MemberProperties.Add HYP_MI_DIM_SOLVE_ORDER

    MemberProperties.Add HYP_MI_IS_DUPLICATE_NAME

    MemberProperties.Add HYP_MI_UNIQUE_NAME

    MemberProperties.Add HYP_MI_ORIGINAL_MEMBER

    MemberProperties.Add HYP_MI_IS_FLOW_TYPE

    MemberProperties.Add HYP_MI_AGGREGATE_LEVEL

    MemberProperties.Add HYP_MI_FORMAT_STRING

    MemberProperties.Add HYP_MI_ATTRIBUTE_DIMENSIONS

    MemberProperties.Add HYP_MI_ATTRIBUTE_MEMBERS

    MemberProperties.Add HYP_MI_ATTRIBUTE_TYPES

    MemberProperties.Add HYP_MI_ALIAS_NAMES

    MemberProperties.Add HYP_MI_ALIAS_TABLES

    MemberProperties.Add HYP_MI_FORMULA

    MemberProperties.Add HYP_MI_COMMENT

    MemberProperties.Add HYP_MI_LAST_FORMULA

    MemberProperties.Add HYP_MI_UDAS

    ' For line 8 to 83 =

    For row = 8-10

    vtMemberName = ThisWorkbook.ActiveSheet.Cells (rank 1). Value

    For each vtPropertyName in MemberProperties

    Code of error = HypGetMemberInformation (ThisWorkbook.ActiveSheet.Name, vtMemberName, vtPropertyName, vtPropertyValue, vtPropertyValueString)

    If ErrorCode = 0 Then

    If IsArray (vtPropertyValue) then

    For index = LBound (vtPropertyValue) to UBound (vtPropertyValue)

    MsgBox _

    "The sheet name:" & ThisWorkbook.ActiveSheet.Name & Chr (13) & _ "."

    "Member name:" & vtMemberName & Chr (13) & _ "."

    "Property type:" & vtPropertyName & Chr (13) & _ "."

    "Property" & index & "value table:" & vtPropertyValue (index) & Chr (13) & _

    "Property" & index & "string array:" & vtPropertyValueString (index)

    Next

    On the other

    MsgBox _

    "The sheet name:" & ThisWorkbook.ActiveSheet.Name & Chr (13) & _ "."

    "Member name:" & vtMemberName & Chr (13) & _ "."

    "Property type:" & vtPropertyName & Chr (13) & _ "."

    "Property value:" & vtPropertyValue & Chr (13) & _ "

    "The property string:"& vtPropertyValueString"

    End If

    On the other

    ErrorMessage = GetReturnCodeMessage (ErrorCode)

    MsgBox "SmartView API function HypGetMemberInformation returned an error message:" & Chr (13) & ErrorMessage, vbOKOnly, PrivateConnectionDescription

    End If

    Next

    On the next row

    End Sub

    Fortunately we can someone find this useful.

    I wish documentation Oracle was a little clearer with more extensive code examples.

    Gustaw

  • Recovery of the time values

    Hello

    I am recovering a time value using the engine of determinations in .net.

    I get an exception trying to convert the object returns to 'TemporalValue '.

    Can someone give me a clue as to how to return the data?

    Thank you.

    Hello

    There are a few things to look for when the conversion of the values of an attribute of the OPA.

    * If the value is not temporal, then it must match its type, String, Double Date etc.
    * If the value is temporal, then the type will be TemporalValue (* Oracle.Determinations.Engine.Local.Temporal.TemporalValue * in DotNET)
    * If the value is unknown, then it will be null (which should still go up to TemporalValue)
    * If the value it is uncertain , so this will be an Instance of the Oracle.Determinations.Engine.Uncertain object.

    If you get a casting of error most likely candidate would be an uncertain attribute value, but that's just a guess. If this does not help, you must paste the error message and stack trace and maybe we can diagnose the problem

  • Returns the key value in the product Page

    Hello

    I'm trying to return a key value in a page element after inserting a database record. I've seen several examples of how to do it on the forum. When I try, I get an error, PLS-00049: bad bind variable 'P116_PERSON_ID '. I call a procedure in a package. The page element is defined as source used: only when the current value in session state is zero. The source type is defined as: static Assignment(value equals source attribute). My procedure looks like:

    Start
    insert into persons (list of fields) values (value list) POLLING person_id IN: P116_PERSON_ID;
    end;

    The procedure works fine if I use something said instead of the page element: P116_PERSON_ID.

    I also tried v ('P116_PERSON_ID') and & P116_PERSON_ID, which did not work.

    What I am doing wrong? I need to convert my procedure to a function and the return key?

    Thanks, Elizabeth

    Elizabeth:

    You can try this

    declare
    l_person_id number;
    begin
    insert into people(list of fields) values(list of values) RETURNING person_id INTO L_PERSON_ID;
    apex_util.set_session_state ('P116_PERSON_ID', L_PERSON_ID);
    end;
    

    CITY

  • How to return the highest value in a column of numbers less than a given number

    I am a beginner using formulas in number.  I have an inventory in a Numbers spreadsheet (v3.6.2).  Inventory numbers are in a column.  I need to view the last number used or the highest number less than a given value.  In my case, it is 9000.

    I can put a cell to return MAX and it's cool, but I need to know the number < 9000, MAX.

    Hi JS.

    SEARCH is your friend here. One of the properties of the LOOKUP function is that it accepts a 'close-match', which is defined as the largest value less than or equal to the search value.

    Formulas:

    A2: LOOKUP (8999.9999999, D)

    B2: LOOKUP(9000,D)

    C2: MAX (D)

    Kind regards

    Barry

  • Schedule my EI Code returning same time value

    So I'm running a VI that communicates with a VISA system that we have built to take action. We strive to obtain the temporal measures for how long it takes the device to run his program and communicate in return. I created an Action CheckTime.vi engine for it but for some reason some get the same results with the measures. Once the unit can enjoy 1 time, sometimes the unit will enjoy 5 times based on what we say to do. I would like to return a measure for each measure 1 sample or 5.

    This is where the model is checked to determine if, to take another measure, it is when the timer is initialized.

    Once reading the data back from the device VISA, we will look at the time as many times as the number of samples taken. For each sample, a new set of data is read and a new time must be pulled out, but data resulting shows several times the same measure.

    Here are the results with 5 samples. I think I should get a different measure for each iteration of the loop for.

    Maybe my AE is not correct? Or a weird conversion is in fact somewhere?

    I suppose you loop For are an iteration if fast time windows has no time for up. Try to use the timer high resolution instead of duration in seconds.

    Ben

  • PersistentStore.getPersistentObject returns the null value?

    I use a random key to retrieve a shape of the object PersistentStore

    persist is PersistentStore.getPersistentObject (KEY);.

    Works fine on the Simulator (OS 5), when I take the code signed to the device (BB OS 5.0 Bold 8900)

    For some reason, it returns null, without exception. Thereafter any API I inoke on PersistentStore / persist returns null without exception persist even when the null value.

    I don't know if it's one thing to eclipse debugger, but even if the debugger shows that objects are null. Controls null applied in the code seems to fail, what does code see these objects as non-null. Pheww! How is it possible.

    In this code still shows up as null, then safetyTable and orderedkeys. However, the value null check in the failure code.

    At a later stage in the code, when I try to access orderedkeys are null again! Are struggling with this problem for two days, all the pointers would be very comfortable.

                        persist = PersistentStore.getPersistentObject( KEY );
                        persistOrderedKeys = PersistentStore.getPersistentObject(KEY_ORDERED_KEYS);
                        safetyTable = (Hashtable)persist.getContents();
                        orderedKeys = (Vector)persistOrderedKeys.getContents();
                        if (safetyTable == null)
                        {
                            safetyTable = new Hashtable();
    
                            persist.setContents(safetyTable);
                            persist.commit();
                        }
    
                        if (orderedKeys==null)
                        {
                            orderedKeys=new Vector();
    
                            if (safetyTable.size()>0)
                            {
                                Enumeration addressKeys = safetyTable.keys();
                                while(addressKeys.hasMoreElements())
                                {
                                    orderedKeys.addElement((String)addressKeys.nextElement());
                                }
                            }
                            persistOrderedKeys.setContents(orderedKeys);
                            persistOrderedKeys.commit();
    
                        }
    

    "I don't know if it's one thing to eclipse debugger.

    I had problems of this kind when I don't have a level of operating system for the device I am debugging on.

  • GetCurrentRow returns the null value while trying to values defined in table advanced VO

    Hi all

    I'm trying to set default values to a bean advanced table according to the selection of LOV in another region. Here is the code and getCurrentRow returns the value null and null pointer exception is throwed. Please let me know where Iam going bad.

       if (pageContext. ) isLovEvent ())

    LovInputSourceId = string pageContext. getLovInputSourceId ();

       if ("poNumber". ) is equal to ()lovInputSourceId))

    pageContext . putDialogMessage (new OAException()"inside Onclick"));

    OAViewObject VO = (OAViewObject) am . findViewObject ()"L3APNonprojbasedpoVO1");

    VO1 OAViewObject = (OAViewObject) am . findViewObject ()"L3APCodingInfoEOVO1");

      VO . setWhereClause (null);

      VO . setWhereClauseParams (null);

      VO . executeQuery ();

      VO1 . setWhereClause (null);

      VO1 . setWhereClauseParams (null);

      VO1 . setWhereClause ("1=2");

      VO1 . executeQuery ();

       if (null! = VO )

       Row ReqRow = (Row) VO.first();  

       if (null ! = ReqRow )

       int idx = VO . getRowCount ();

       for (int xx = 0; xx < idx ; xx ++)

    String Description = (String)VO. getCurrentRow (). getAttribute ()"ItemDescription");

       Number Amount = (Number)VO. getCurrentRow (). getAttribute ("Amount");

       String Company = (String)VO. getCurrentRow (). getAttribute ("Company");

    String ProfitCenter = (String)VO. getCurrentRow (). getAttribute ()'ProfitCenter');

       String Dept = (String)VO. getCurrentRow (). getAttribute ("Dept");

       String Lob = (String)VO. getCurrentRow (). getAttribute ("Lob");

       String Account = (String)VO. getCurrentRow (). getAttribute ("Account");

    pageContext . putDialogMessage (new OAException()"inside loops'));

       if (null! = VO1 )

      { am. invokeMethod ("createRow");

    VO1 . getCurrentRow (). setAttribute ()'Description',Description);

      VO1 . getCurrentRow (). setAttribute ("Amount",Amount);

      VO1 . getCurrentRow (). setAttribute ("Company",Company);

      } ReqRow = (Row)VO.next(); }

       else {}

    }

    }

    Here is the method in AM.

    Public Sub createRow()
    {

    OAViewObject vo = (OAViewObject) getL3APCodingProjectEOVO1 ();

    vo.clearCache ();

    If (!) VO.isPreparedForExecution ())
    {
    System.out.println ("project VO executed");
    vo.setWhereClause (null);
    vo.setWhereClauseParams (null);
    vo.setWhereClause ("1 = 2");
    vo.executeQuery ();
    }
    Line = vo.createRow ();
    vo.insertRow (row);
    row.setNewRowState (Row.STATUS_INITIALIZED);

    }

    I modified your code a bit. This code does not require a method of AM.

    If the problem still not solved.

    If you want you can try this and let us know what happens.

    if (pageContext.isLovEvent())
    {
       String lovInputSourceId = pageContext.getLovInputSourceId();
       if("poNumber".equals(lovInputSourceId))
      {
      pageContext.putDialogMessage(new OAException("Inside Onclick"));
      OAViewObject VO=(OAViewObject)am.findViewObject("L3APNonprojbasedpoVO1");
      OAViewObject VO1=(OAViewObject)am.findViewObject("L3APCodingInfoEOVO1");
      VO.setWhereClause(null);
      VO.setWhereClauseParams(null);
      VO.executeQuery();
    
      VO1.setWhereClause(null);
      VO1.setWhereClauseParams(null);
      VO1.setWhereClause("1=2");
      VO1.executeQuery();
    
      if (VO != null)
      {
      for( Row ReqRow = (Row) VO.first();  ReqRow != null; ReqRow = (Row) VO.next())
      {
      String Description = (String)ReqRow.getAttribute("ItemDescription");
      Number Amount = (Number)ReqRow.getAttribute("Amount");
      String Company = (String)ReqRow.getAttribute("Company");
      String ProfitCenter = (String)ReqRow.getAttribute("ProfitCenter");
      String Dept = (String)ReqRow.getAttribute("Dept");
      String Lob = (String)ReqRow.getAttribute("Lob");
      String Account = (String)ReqRow.getAttribute("Account");
      pageContext.putDialogMessage(new OAException("Inside for Loop"));
    
      if (VO1 != null)
      {
      Row newRow  = VO1.createRow();
      newRow.setAttribute("Description",Description);
      newRow.setAttribute("Amount",Amount);
      newRow.setAttribute("Company",Company);
      VO1.insertRow(newRow);
      }
      }
      }
      }
    }
    

    See you soon

    AJ

  • Simple Script to Calc custom, returning the odd value

    Hi all

    I'm not really familiar with Javascript and I'm checking here something simple.

    ----------

    Event.Value = (this.getField("Applicant_1").value + this.getField("Bonuses").value + this.getField("Commissions").value + this.getField("Dividends_Interest").value + this.getField("Net_Rental_Income").value + this.getField("OtherBefore_1").value + this.getField("OtherBefore_10").value + this.getField("OtherBefore_4").value + this.getField("OtherBefore_7").value + this.getField("Overtime").value)

    ------


    As long as I put a value in all the fields, it works very well. If I leave a field in the empty middle, my return value is really wide. By example, if I provide the value of '1' for overtime, bonuses and commissions, and leave the rest blank, my returned value will be 111.

    Any help on this would be greatly appreciated. Thank you!

    The reason for that is what happens when you get the value of an empty field, it returns an empty string. The operator '+' is used in JavaScript for digital addition and string concatenation, please make sure to ecxplicitly to convert the field value to numbers before adding them together. IF the script could be modified to:

    (function () {}

    Get the field values as numbers

    var v1 = + getField("Applicant_1").value;

    var v2 = + getField("Bonuses").value;

    var v3 = + getField("Commissions").value;

    var v4 = + getField("Dividends_Interest").value;

    V5 var = + getField("Net_Rental_Income").value;

    var V6 = + getField("OtherBefore_1").value;

    v7 var = + getField("OtherBefore_10").value;

    var V8 = + getField("OtherBefore_4").value;

    var = v9 + getField("OtherBefore_7").value;

    V10 var = + getField("Overtime").value;

    Calculate the sum

    Event.Value = v1 + v2 + v3 + v4 + v5 + v6 + v7 + v8 + v9 + v10;

    })();

  • Refresh of Page partial update of form before the data control returns the new value

    Hello

    I have a set of paintings of master detail based on a single data source (Session Bean encapsulating a web service call). The high-level table (t1) shows data of opportunity, as the low level (t2) poster contacts for a special occasion. When the opportunity is selected in t1, the contacts associated with this opportunity appear in t2. These tables of work as you wish.

    I have a read only form (form of the Panel layout) based on a different data control (supported by a Session Bean that calls a LinkedIn API and a table of database using EJB3 entities). LinkedIn Session Bean method takes a parameter which I get from the current row in t2. (#{bindings.relatedContact.currentRow.dataProvider.id}) I put the PartialTriggers as 't2' on the form.

    When the page is loaded for the first time, the first line (line A) from table t2 is selected and the display shows the data associated with this line. If I select another line (line B), the Session Bean is called with the value of the id of the newly selected row, but the display will show the associated data from line A. Thereafter, whenever I select a row in t2, bean is called with the new value, but the form displays the data from the selected line previously.

    I guess what happens is that the form is refreshed (using stale data in the data control), and then the call to the session bean is made. I checked using thread and print statements. Sleep() in the bean.

    Is this a correct behavior and how can I make sure that the call to the bean occurs before the form is updated?

    I use JDeveloper version 11.1.2.2.0

    Thank you
    Michael

    Hello

    as answered on StackOverflow, the trick is to set the refresh option on the iterator (s) to the second access WS (table 2) of PageDef on ifNeeded. The default setting is delayed, which in your case is not optimal because refresh occurs during rendering response, which is too late for the access of WS. Try "ifNeeded.

    Frank

Maybe you are looking for