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
Tags: Oracle Applications
Similar Questions
-
VO.getCurrentRow () returns a null value
Hi, OTN
In short, the scenario is:
View object is based on an entity. There is a form to the JSF page.
I select a record by clicking next and previous. Then I click on create to display empty fields for the new record.
When I click on the button, I need to register a field value and a default value for the new fields to records.
How to:
I have created a support bean and added customCreateMethod. To start, I want to get the value of current row field, but I can't get the current line.
public String customCreateMethod() {}
String amDef = "pattern. AppModule. "
Config = "AppModuleLocal";
Am = ApplicationModule
Configuration.createRootApplicationModule (amDef, config); non-null
ViewObject vo = am.findViewObject("ContentVersionView1"); non-null
= problem here:
vo.getCurrentRow (); Returns a null value
System.out.println ("index:" + vo.getCurrentRowIndex ()); always returns 0
}
I tested variable vo by this code:
While (vo.hasNext ()) {}
Line = vo.next ();
System.out.println (Row.GetAttribute ("IdContent"));
}
It works fine.
How should I me current line?
Thank youHello
createRootApplicationModule creates the new instance of the application module, thanks to which you did not receive the current line. Use the code posted by Timo in [this post | http://forums.oracle.com/forums/thread.jspa?threadID=933022] (which has been marked as correct) to get the instance of module of the application.
Jean Lou
-
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.
-
Returns the null value in HasMap.get ().
Hi all.
Just read the docs of java on hashmap and was interested in this topic the get() method:
A NULL return value does not necessarily mean that the map contains no mapping for the key; It is also possible that the map explicitly maps the key null. The containsKey operation may be used to distinguish these two cases.
I took in a case, which has been talked about: If the map allow nulls, returned by get() null will be just one key of the pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.sphinks wrote:
I took in a case, which has been talked about: If the map permits null values, returned by get() null will be just a key pair-> null value. But the second case is not clear to me. Please, show me an example for the latter case, when get() can returned null.There is no second case. There is a single case, if you put a null value in a map, get() will return null. And because of that, if you need to know if a certain key is in the containsKey() worksheet should be used instead of the get() method.
-
return the minimum value from a table
Hi all, how can I output the lower value within an array of numbers?
I have this but it does not work, it is always the first number in the table.
function minF(a:Array):Number {var min:Number = [0]; for (var i: Number = 1; i >.) Length; i ++) {if (a [i] > min) {min = a [i];} } else {trace ("buahMin!"); return min}}; }
Thanks to you all.
This is because you have the sign on your conditional loop wrong.
You must make the comparison for all I less than your length of array.
function minF(a:Array):Number {}
var min:Number = [0];
for (var i: Number = 1; i
}
return min;
}
-
Count (1) returns the null value in the Group of
Hi the gems... Good afternoon...
I read that the COUNT() function always returns 0 (zero) if there is no corresponding row in the table.
The following code returns 0 as expected:
But when I used the GROUP BY clause in the query, then he returned to nothing:SELECT COUNT(1) FROM book_table WHERE client_id = 10009 AND book_id = 5465465 AND book_sub_id = 'gfdf' AND amount = 78686
Why this is happening... Please suggest...SELECT COUNT(1) FROM book_table WHERE client_id = 10009 AND book_id = 5465465 AND book_sub_id = 'gfdf' AND amount = 78686 group by client_id,book_id,book_sub_id,amount
When you use just rely on its own (and you must use count (*) not count (1) as the optimizer based on CSSTidy will re - write internally to count (*) anyway)... then you say you want a count of all rows.
When you introduce the group by clause you say thay want returned a number of records within specific groups... but if there are no groups, he cannot give you a line for any group with its county equivalent, because there are no lines for the groups. With the grouping, you have must have at least 1 row per group to get an account for her.
-
return the same value defined in a group.
All,
I have the below requirement,
I had a table (deptid, deptname, address, city, zip, State, other columns) I want to write a query to determine any errors (records with different values) because I expect all records grouped by(deptid, deptname, address,city,zip, state) to have the same deptid (Please note that deptid is not unique).
or a specific deptid should have only one record based on the groupping (deptid, deptname, address, city, State, zip).
any suggestion? Thank you.One way to check is to check for a Unique Deptid deptname combination, address, city, zip, State;
In this way, you will get all the combination deptname, address, city, zip, Associate State with more than 1 dept_id. However, if one of these have different value, then you are bound to get several lines and thus false positives.
select deptname, address,city,zip, state, count(distinct dept_id) from dept_table group by deptname, address,city,zip, state having count(distinct dept_id) > 1
How about you, you give us the structure of the Table and a few examples of data as well as the expected release of him. It will help us giving you the good request that fits your needs.
-
calculated formula database field trying to insert the null value
Hello
I have 3 elements of database text amount, rate and result.
I enter both values (quantity and frequency), and the property using formula 'result' Gets the computed value.
On the screen all the values are displayed correctly but when trying to save my information text field 'result' tent to insert the null value.
Any suggestions?
Forms 11g
Thanks in advance794018 wrote:
HelloI have 3 elements of database text amount, rate and result.
I enter both values (quantity and frequency), and the property using formula 'result' Gets the computed value.
On the screen all the values are displayed correctly but when trying to save my information text field 'result' tent to insert the null value.Point formula should not be issue of database. And insert the value in the result column in the database is not good idea.
Then, if you want to save it. create the database result item and write trigger (When-validate-point) on amount and filed rates and the trigger code, write:result:=:amount*:rate;
To display the result on the form, create the database no item and change the formula property and write the formula.
Hope this will help you
If someone useful or appropriate, please mark accordingly.
-
Hello
I'm trying to read and modify a document XMP data, but I always get a null value when playing it.
In addition,
IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);
does not either;
App: application var = InDesign.app;
var doc: Document = app.activeDocument;
var idh:IDHostAdapter = IDHostAdapter.getInstance ();
var xmpString:String = idh.getXMPString (doc);
var warpxmpContext:WARPXMPXMPContext = new WARPXMPXMPContext (xmpString);
warpxmpContext.wARPXMP.publicacion = "periodico";
var updatedXMPString:String = warpxmpContext.serializeToXML ();
IDHostAdapter.getInstance () .setXMPString (doc, updatedXMPString);
var xmpString2:String is IDHostAdapter.getInstance () .getXMPString (doc);.
Any ideas?
Thank you
Hello
We have an updated version of the adapter host available for download InDesign library:
http://cssdk.host.Adobe.com/SDK/1.5/patch/id_hostadapter_mac.zip
Regarding the examples, please see the AssetFragger CS extension example which shows the adding/changing metadata XMP using XMP Namespace Designer and library InDesign Host Adapter. This extension is available in Builder Extension CS under file > import > CS Extension Builder > samples. For more information, please visit http://www.adobe.com/devnet/creativesuite/samples.html
Kind regards
LEA
From: Adobe Forums [email protected]<>[email protected]>
Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "
Date: Saturday November 5, 2011 19:45:40 + 0000
To: laboratory user [email protected]<>[email protected]>
Topic: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value
Re: IDHostAdapter.getInstance () .getXMPString (doc); Returns a null value
created by substances. http://forums.adobe.com/people/Harbs. > in Creative Suite Extension Builder - see the discussion complete onhttp://forums.adobe.com/message/4009511#4009511
-
resolveNode returns a null value when a variable is used.
LiveCycle Designer ES2, latest version
Hello
The following Javascript code, in the click event of a button, returns a null value for the variable opaque. When I manually enter the expected value the script works perfectly.
I tried various modifications of the resolveNode line such as var opaque = xfa.resolveNode (qPage); , but without success.
Also studied all the documents reference Adobe that I could find on the scripts and resolveNode. Any suggestions?
var qPage = (Cell12.rawValue + "AnchorField");
App.Alert (qPage);
Opaque var = xfa.resolveNode ("' $... qPage '");
App.Alert (opaque);
var nPage = xfa.layout.absPage (opaque);
App.Alert (nPage);
xfa.host.currentPage = nPage;Thank you
Ron
I tried your sample and it seems to work very well... but I'm not sure 100% that you are trying to do... .going to your initial question on the passage of a variable in the resolveNode resolveNode expects a string, so you must use the following syntax to create the string:
xfa.resolveNode ("$.." + qPage)
Note that the variable is outside the quotes as such the string $... is added to the content of qPage. This wil work if qPage is a string as well.
In your example you have defined qPage as an XFA object so that the syntax above will not work. If you intend to use the same way, you would use qPage.name so that the name of the field will be returned (this is a string) and it will be added to your expression of $ to make the $... ProductAnchorField
Thus, the expression would be:
xfa.resolveNode ("$.." + qPage.name)
Make sense?
Paul
-
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);:
})();
-
FIRST analytical functions returns the null line
The following query returns a null line when there is no such thing as a line for the predicate. Is it a bug or expected behaviour. If so what is the meaning of the null row, is it not logical?
SELECT NVL (max (ah.fyr_end_dt) KEEP (DENSE_RANK FIRST ORDER BY ah.as_of_dt DESC), ' RETURNED NULL')
Of account_history ah
WHERE
Ah.acct_id = 999
AND trunc (ah.as_of_dt) < = 31 December 08 '
;Hello
user4900730 wrote:
Moreover, in my example how I distinguish the case where a line really exists, but the column is null when there is no such thing as a line and the FIRST function returns the same value null? Hopefullly I should be able to do it in a single SQL and know the difference?COUNT (*) > 0, but COUNT (col_x) = 0, then there is a line, but col_x happened to be null.
For example, the following query shows that there is 1 row in the group with the lowest name ("ADAMS"), but the column comm in all ranks of this group is null:
SELECT COUNT (*) KEEP (DENSE_RANK FIRST ORDER BY ename) AS total_cnt , COUNT (comm) KEEP (DENSE_RANK FIRST ORDER BY ename) AS comm_cnt FROM scott.emp ;
Output:
TOTAL_CNT COMM_CNT ---------- ---------- 1 0
The employee whose highest name ("WARD") has a number in the comm column.
-
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. -
where clause to see if they contain the null value
So I've finalized my function but now am having some problems:
the bl field (or the v_bl parameter) has null values in it. When I run the function using the "Select FH ('ACCESS', NULL, 8675309') From dual; I get a NULL return value because it uses the variable to compare with q.bl and you can not have q.bl = null in a Where clause.
The main problem is when the parameters are passed, a line can have the same prob and site, but the bl might be different as null, which would give a different lname.
In where clause I need to have something that will compare the parameter with the bl field. Sometimes it's null sometimes is not, but we need to find the line concerned. I made the "BOLD" in the question police
Here are two possible lines in the data
prob bl site lname
ACCESS Smith 8675309 (null)
54321 8675309 Johnson ACCESS
so in theory, if the function is called with the parameters FH ('ACCESS', NULL, 8675306')
He would return the lname: Smith
and conversely FH ("ACCESS", "54321 ', 8675309") would return Johnson
Here's the function
create or replace
Function FH
(v_prob IN varchar2, v_bl IN varchar2, v_site IN varchar2)
RETURN varchar2
AS
v_lname varchar2 (16);
BEGIN
S.Lname SELECT INTO v_lname
Of
request q
JOIN THE
s response
On
(q.order = s.order)
WHERE
q.BL = v_bl AND - where it is
q.site = v_site AND
q.prob = v_prob AND
s.Lname IS NOT NULL;
RETURN v_lname;
END;
-When I run the FH ('ACCESS', NULL,' 86753) function, it returns an empty value and not the family name
Published by: user11210446 on May 28, 2009 17:03
Published by: user11210446 on May 28, 2009 17:03user11210446 wrote:
If v_bl is Null in the where clause it would even say q.bl = Null which will not work.Matches the NULL value
(1) either you have to say-> q.bl IS NULL
OR
(2) WHERE the NVL (q.bl-99) = NVL (v_bl-99) - this will be true if q.bl and v_bl both are NULL
NULL = NULL evaluates to TRUE, so you use NVLSS@XE > select * from dual where null = null ; no rows selected SS@XE > select * from dual where null is null ; D - X SS@XE > select * from dual where NVL(null,-1) = NVL(null,-1) ; D - X
SS
-
Original title: cannot backup Windows 7 system.
When I try to back up the system or create the image of the system I get the following message, the error was detected in the Volumn Service VSS (Shadow Copy) the problem occurred while trying to connect with the VSS writers. Verify that the event system Service and the VSS service are running and look for errors related to event logs. (0 x 80042318).
Hi bernardolahoustino,
Please keep us informed. Please let us know the State of the question, so that we can help you further.
Maybe you are looking for
-
How to stop mail to import the old emails after installation of El Capitan
I have the e-mail program on my iMac that is linked to an account hotmail before El Capitan I could open a mail and click 'x' at the bottom of the e-mail window main to prevent downloading of emails on the linked account. The 'x' is gone and everytim
-
BlackBerry Z30 warranty on BB Z30
I have problems with my audio port. I know that's not older thah of a year. [edited personal information] Thank you very much
-
Facing problems with Windows Update and other performance issues.
Hi, I have a Windows 7 (64 bit) for HP Pavilion dv6 laptop. Since January 5, 2014, my computer had problems. Windows Update stopped working. Whenever I try to run it, it says that the service is not running. When I try to set the agenda by running Mi
-
Cisco C, series SX TC6.2 Programmable buttons programmable appeal reserved by system
After the TC6.2, I noticed that all 4 first slots for the mode of APPEAL programmable programmable buttons are now reserved by the system. The user guide on the other hand always details that all five of them should be available. No explanation by Ci
-
Y at - it a Windows 7 technical support email address
Hello Tried to contact Microsoft Technical Support by e-mail but went around in circles on their Australian Web site. Seems you can only call the hotline and they transfer you. It's not always appropriate if you have a difficult question and dumps of