Null Value Item
Hi all,
As per below coding in my application need to export each column data to excel. total column of my table is 10.
Normally , the 5th column usually is null value and other
column is not null.
the question is below coding can't loop 6-10th column due to 5th column is null value then break.
everybody can tell me how to cause pl/sql can loop 6-10th column even 5th column is null ?
FOR k IN 1..10
LOOP
IF NOT NAME_IN(:system.cursor_item) IS NULL THEN
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_IMP_TYPE' THEN
IF NAME_IN(:system.cursor_item) = 'EI' THEN list_index := 1;
ELSIF NAME_IN(:system.cursor_item) = 'LI' THEN
list_index := 2;
ELSE
list_index := 3;
END IF;
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', GET_LIST_ELEMENT_LABEL('TSCNTRMOV.TS_IMP_TYPE',list_index));
ELSIF GET_ITEM_PROPERTY(:system.cursor_item,DATATYPE) = 'DATE' THEN
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_TRANS_DATE' THEN
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR HH24:MI:SS'));
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR'));
END IF;
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', name_in(:system.cursor_item));
END IF ;
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
next_item;
END IF;
END LOOP;
best regards
boris
Hi Gerd,
tks for yr remind.
i have another one question. can u help me ?
my trigger is use for export data to excel from data block. i feel it process slow too. because it is a one by one column/row insert.
how to enchance the performance from coding ?
i know that use table type in trigger for store a heap of data then insert to excel once. but i don't know how to implement. can u tell me how to do that .
tks a lot.
pls see below trigger is one by one insert.
PROCEDURE EXPORT_EXCEL IS
app CLIENT_OLE2.OBJ_TYPE;
workbooks CLIENT_OLE2.OBJ_TYPE;
workbook CLIENT_OLE2.OBJ_TYPE;
worksheets CLIENT_OLE2.OBJ_TYPE;
worksheet CLIENT_OLE2.OBJ_TYPE;
args CLIENT_OLE2.LIST_TYPE;
cell CLIENT_OLE2.OBJ_TYPE;
font CLIENT_OLE2.OBJ_TYPE;
patterns CLIENT_OLE2.OBJ_TYPE;
j INTEGER;
k INTEGER;
file_name_cl VARCHAR2(32767);
item_prompt VARCHAR2(32767);
fir_item VARCHAR2(80);
cur_item VARCHAR2(80);
list_index NUMBER (1);
user_cancel EXCEPTION;
BEGIN
-- create a new document
app := CLIENT_OLE2.CREATE_OBJ('Excel.Application');
CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
workbooks := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Workbooks');
workbook := CLIENT_OLE2.INVOKE_OBJ(workbooks, 'add');
worksheets := CLIENT_OLE2.GET_OBJ_PROPERTY(workbook, 'Worksheets');
worksheet := CLIENT_OLE2.Invoke_OBJ(worksheets, 'Add');
go_block('TSCNTRMOV_HB');
j:=2; /* Represents row number */
k:=1; /* Represemts column number */
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell:=CLIENT_OLE2.GET_OBJ_PROPERTY(worksheet, 'Cells', args);
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', 'Container Movement Report');
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '18');
CLIENT_OLE2.SET_PROPERTY (font, 'Bold', True);
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
/* Add the column headings using item prompts */
j:=4 ;
fir_item := Get_Block_Property ( :SYSTEM.CURRENT_BLOCK, FIRST_ITEM );
WHILE ( fir_item IS NOT NULL ) LOOP
cur_item := :SYSTEM.CURRENT_BLOCK || '.' || fir_item ;
item_prompt := GET_ITEM_PROPERTY(cur_item, label);
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
patterns := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'INTERIOR') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', item_prompt);
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY(patterns, 'ColorIndex', '6');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.SET_PROPERTY (font, 'Bold', True);
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
fir_item := GET_ITEM_PROPERTY( cur_item, NEXTITEM ) ;
k := k + 1 ;
END LOOP;
go_block('TSCNTRMOV');
first_record ;
j:=5; /* Represents row number */
k:=1; /* Represemts column number */
LOOP
--FOR k IN 1..38
--LOOP
WHILE (GET_ITEM_PROPERTY(:system.cursor_item,VISIBLE) <> 'TRUE') LOOP
IF NAME_IN(:system.cursor_item) IS NOT NULL THEN
-- WHILE (NAME_IN(:system.cursor_item) IS NOT NULL) LOOP
args:=CLIENT_OLE2.CREATE_ARGLIST;
CLIENT_OLE2.ADD_ARG(args, j);
CLIENT_OLE2.ADD_ARG(args, k);
cell := CLIENT_OLE2.GET_OBJ_PROPERTY (worksheet, 'Cells', args);
font := CLIENT_OLE2.GET_OBJ_PROPERTY (cell, 'Font') ;
CLIENT_OLE2.DESTROY_ARGLIST(args);
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_IMP_TYPE' THEN
IF NAME_IN(:system.cursor_item) = 'EI' THEN
list_index := 1;
ELSIF NAME_IN(:system.cursor_item) = 'LI' THEN
list_index := 2;
ELSE
list_index := 3;
END IF;
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', GET_LIST_ELEMENT_LABEL('TSCNTRMOV.TS_IMP_TYPE',list_index));
ELSIF GET_ITEM_PROPERTY(:system.cursor_item,DATATYPE) = 'DATE' THEN
IF GET_ITEM_PROPERTY(:system.cursor_item,COLUMN_NAME) = 'TS_TRANS_DATE' THEN
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR HH24:MI:SS'));
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', TO_CHAR(TO_DATE(NAME_IN(:system.cursor_item)),'DD-MM-RRRR'));
END IF;
ELSE
CLIENT_OLE2.SET_PROPERTY(cell, 'Value', name_in(:system.cursor_item));
END IF ;
CLIENT_OLE2.SET_PROPERTY(cell, 'ColumnWidth', '20');
CLIENT_OLE2.SET_PROPERTY (font, 'Name', 'Times New Roman');
CLIENT_OLE2.SET_PROPERTY (font, 'Size', '14');
CLIENT_OLE2.RELEASE_OBJ(font);
CLIENT_OLE2.RELEASE_OBJ(cell);
END IF;
NEXT_ITEM;
k := k + 1 ;
END LOOP;
j:=j+1;
k:=1;
IF :system.last_record = 'TRUE' THEN
exit;
ELSE
next_record;
END IF;
END LOOP;
--CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
CLIENT_OLE2.RELEASE_OBJ(worksheet);
CLIENT_OLE2.RELEASE_OBJ(worksheets);
/* release workbook */
CLIENT_OLE2.RELEASE_OBJ(workbook);
CLIENT_OLE2.RELEASE_OBJ(workbooks);
/* Release application */
CLIENT_OLE2.RELEASE_OBJ(app);
EXCEPTION
WHEN user_cancel THEN
RAISE;
END;
Similar Messages
-
Hi All,
I use this part-of-code in pl/sql statement in a 'where' clause in order to filter records to those that took place between some hours range:
..... and to_char(STARTDATE,'HH24:MI:SS') between NVL(:P3_HOURS_FROM,'00:00:00') and NVL(:P3_HOURS_TO,'23:59:59')
P3_HOURS_FROM & P3_HOURS_TO are combo box items with LOV (0:00,0:30,1:00 ....etc that returns 00:00:00,00:30:00,1:00:00 respectively). I use a null value which is displayed as '--:--'.
when i choose some hour range the rsults are correct. the problem is when i choose null values. there is no results to the report, probably (i guess) because it somehow translate the (null) time value to the same value (and it's obvious that between same time values there isn't any result).
so i guess i use 'null' value in an inappropriate way.
Can u tell me what do i do wrong???Are you sure you are returning NULL and just displaying '--:--' in your LOV?
If the state of your LOV is becoming '--:--' then this does not equal null in PL/SQL land.
I presume you are also submitting after changing your LOVs?
You can check the state of your items by clicking the session state in the developers toolbar at the bottom. See what your items are being set and report back!
Ben -
How can I delete null values from List Item?
Hi Friends,
I used List item for field job_Type, I entered values in List item at design time through property pallet. When I run form I will see null values in this List Item.
How can I remove these null values from the List?
Best regards,
ShahzadDear Shahzad,
It can be removed by adding the following code in the When-new-Form-Instance.
Set_item_property('List name', required, property_true);
:block_name.list_name := <put your default value here>; (If you didn't oput the default value, then you will get some problem and the cursor may not navigate away from the list).
Senthil Alagu .P. -
Eliminating the null values from popup list item
Dear All,
i create a popup list,at runtime it shows a null blank value among the values i specified while the combo box is not,
i want to eleminate the blank null value from the popup list.
Need Help.
Thanks & Regards.Okay,
i create a popup list, populate it in runtime with create_group_from_query builtin.
now when i run the form and click the list item, it display a null value among the other values which are
return from the create_group_from_query .
the procedure is below
procedure Department_proc is
rg recordgroup;
n number;
begin
remove_record_group('RG');------ this is another procedure which checks for Record group existance and remove it.
rg=:=create_group_from_query('RG4','SELECT NAME,TO_CHAR(DEPT_ID) FROM TAB_DEPT_SECTION
UNION
SELECT '||'''All Departments'''||'as name,'||'''0'''||' as name from dual');
n:=populate_group(rg4);
populate_list('control_block.department',rg4);
end;
it display a null value among the other values for the first time is run the form,but when i click it and select a value from it
and the onward click dont show the null value.i want to eleminate the null value even for the first time when the user run the
from.
Best Regards -
How to assign NULL value to an ITEM in Forms Personalization?
Hi,
how to assign NULL value to an ITEM in Forms Personalization?
please suggest me.
ThanksI don't know what your form personalization does and maybe I misunderstand you ...
Try
:item_name := null; -
Null values passed into the servlet
Hi all,
I keep getting null values for all the params that I pass into the servlet i.e. sqltype, producttype, process, instance etc....I have attempted to print some of them out on the screen but I keep getting the 'NullPointerException' error message...can anyone tell me what it is that I have down wrong in the below code?
If I run the servlet with method calls that have hardcoded arguments in them it works but not when I pass in the params from the URL...I am absolutley puzzled!
Help!
package blotter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.db.util.WriteToLogFile;
import blotter.cache.*;
Servlet to extract an object that has already been placed
in the cache by GetBondPrices servlet from the cache.
public class ExtractSecurityObject extends HttpServlet
String sqlType = "";
String productType = "";
String instance = "";
String process = "";
String asOfDate = "";
String currencyCode = "";
String curveId = "";
String results = "";
private String debug;
private PrintWriter out;
private WriteToLogFile logFile;
// called when servlet first initialised
public void init(ServletConfig config) throws ServletException
super.init(config);
// method called for each get request
public void doGet( HttpServletRequest request, HttpServletResponse response )
throws ServletException, IOException
String toWrite = " ";
// Get the object identifier from the parameters passed in
sqlType = request.getParameter("sqltype");
productType = request.getParameter("producttype").toUpperCase();
instance = request.getParameter("instance");
process = request.getParameter("process");
asOfDate = request.getParameter("asofdate");
curveId = request.getParameter("curveid");
currencyCode = request.getParameter("ccy").toUpperCase();
out.println(currencyCode);
if ( request.getParameter("debug") !=null)
debug = request.getParameter("debug");
else
debug ="";
// set the mime type to html
response.setContentType( "text/html" );
out = response.getWriter();
out.println("<HTML>");
try
// write some parameters to a log file
toWrite = toWrite + "<li>" + getServletInfo() + " at " + new Date() + " " + sqlType + " " +
productType + " " + instance + " " + process + " " + asOfDate + " " + curveId + " " +
currencyCode;
CachedObject o1 = (CachedObject)CacheManager.getCache("EB_" + currencyCode + productType + asOfDate);
if(o1 == null){
CacheSecurityObject cso = new CacheSecurityObject();
if((request.getParameter("sqltype") == null) && (request.getParameter("instance") != null)){
results = (String)cso.putSecurityinCache(null, request.getParameter("producttype"), request.getParameter("instance"), request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
//results = (String)cso.putSecurityinCache(null, "yc", "frafu", "official", "20011105", "baceod", "sek");
out.println(results);
} else {
//results = (String)cso.putSecurityinCache("bondtypes", "bond", null, "official", "20011105", "baceod", "eur");
results = (String)cso.putSecurityinCache(request.getParameter("sqltype"), request.getParameter("producttype"), null, request.getParameter("process"), request.getParameter("asOfDate"), request.getParameter("curveId"), request.getParameter("currencyCode"));
out.println(results);
else{
out.println(((String)o1.object).toString());
// general catch for all exceptions
catch(Exception exception)
out.println( "Exception: The item that you requested was not found in the cache" + "<BR>" );
toWrite = toWrite + "Exception : " + exception.getMessage() + "\n" ;
finally
// write to logfile
logFile = new WriteToLogFile();
logFile.setSourceDirName("blotter");
logFile.setQuery(request.getQueryString());
logFile.setServletPath(request.getServletPath());
if (toWrite!=null)
logFile.writeLog(getServletInfo(),toWrite);
out.println("</HTML>");
out.close();
// need the class name for log file
public String getServletInfo()
return this.getClass().getName();
}That section of the code references a cache to extract an item that has been requested by the user. If the item is not in the cache i.e. if(o1 == null) then it will call a class that generates that object and places that object into the cache. The second time the user makes the same call then they will be handed a cached copy of that object which is aimed to make the whole servlet call faster.
That section of the code works fine coz I have tested that separately. It is the reading in of the arguments that is causing the problem. -
Reading Numeric UDF null value in DI
We have a UDF of Numeric(4) that can be NULL, 0, 1, 2, etc. We try to read it from DI, and if it is NULL, then set the result to be -1 (the default value we difined), so we can differentiate NULL and 0.
The C# code we have look like this:
int LineNumber = -1;
SAPbobsCOM.Company oCompany;
// Code to get Company
SAPbobsCOM.Documents oDoc = oCompany.GetBusinessObject(BoObjectTypes.oQuotations);
oDoc.GetByKey(100); // Get the document by DocEntry
LineNumber = (int)oDoc.UserFields.Fields.Item("U_XX_LN").Value;
The problem is LineNumber gets 0 even if in the database U_XX_LN is NULL. We tried the code below and got the same result because oDoc.UserFields.Fields.Item("U_XX_LN").Value.ToString() always return '0' if it is NULL.
if (string.IsNullOrEmpty(oDoc.UserFields.Fields.Item("U_XX_LN").Value.ToString()))
LineNumber = -1;
else
LineNumber = (int)oDoc.UserFields.Fields.Item("U_XX_LN").Value;
The question is: how can we set it to default -1 if in the database the value is NULL?
Thank you,
GraceHi Grace,
Unfortunately the DI API automatically converts database null values to a default value for the datatype (eg null for numeric becomes 0 and null for strings is an empty string). If you want to differentiate between null and zero you will need to query the table using the isnull command rather than reading the table through the UserTables object:
oRecordSet.DoQuery("select isnull(U_XX_LN, -1) as U_XX_LN from [@MYTABLE] where Code = 'MYCODE')
This will convert the null value to a -1 in the recordset so you can tell the difference between nulls and zeros.
Kind Regards,
Owen -
Null Values from a Data Source
This is more of an implementation question than a
troubleshooting question. Also, since I've been unable to find any
documentation on this I was wondering if anyone has come across
this behavior or found a bug with it.
Yesterday I was working on an application to explore some
proof of concept aspects of Flex for an application I'm developing.
I started running into a problem with Flex Data Services throwing
back an 'Unknown Property: "clientaddress1"' error whenever I tried
to update data. It seemed that whenever I tried to update a record
in the database it would thrown the Unknown Property error. I spent
a good chunk of the day trying to figure out what was causing this
and finally gave up and called it a day.
This morning I was reassessing what the problem was and
trying to find the differences between my database and my code and
I stumbled upon the fact that I could add no records and modify
them without a problem, however if I tried to access an existing
record and update it I'd get the Unknown Property error.
I start analyzing the database and found that I'd configured
the database to use null values for empty values and the records
that I created with the database had null values, however, any of
the values inserted from Flex were inserted as blank values. As
matching my action script class as clientaddress1 = ""; So, upon
further testing I fould that Flex was not processing the null
values correctly, so that when it came back and rightly generated a
Conflict Error...and then called AcceptServer() it was unable to
find the clientaddress1 property of the class.
Also, if any of the properties in the database are null it
throws the same error. Basically it seems to have invalidated the
object just because one value was null. So if all of my values from
the DB are set to something and only one field is set to null it's
still throwing the error on the first alphabetical item of the
properties.
I can resolve the problem by not using null values in the
database, but...what sort of effect would this have on someone
working with a large legacy database that extensively uses nulls
for undefined values?
Also, if a Flex guru could explain the reasoning for this
happening I would greatly appreciate it!
Best regards,
Chris MaloneyI realize that I didn't clarify that I am using ColdFusion
for getting the data. This class was generated by the Create CFC
wizard in Flex Builder.
package com.generated
[Managed]
[RemoteClass(alias="components.generated.clients.Clients")]
public class Clients
public var clientid:Number = 0;
public var clientfirstname:String = "";
public var clientlastname:String = "";
public var clientaddress1:String = "";
public var clientaddress2:String = "";
public var clientcity:String = "";
public var clientstate:String = "";
public var clientzip:String = "";
public var clientphone:String = "";
public var clientemail:String = "";
public function Clients()
} -
About xml and null values in 10g
Hi, I have an UCM GetFile webservice component wich receives 4 arguments, two of them are null values (rendition and extraPops), and the xml request generated by obpm is:
<GetFileByName xmlns="http://www.stellent.com/GetFile/">
<dDocName>V_123410</dDocName>
<revisionSelectionMethod>latestReleased</revisionSelectionMethod>
<rendition/>
<extraProps/>
</GetFileByName>The problem is: On UCM web service, an empty tag like <rendition/> is treated like a "empty string" value, instead of a null value, and then the response i get isn't the expected.
What I want do to is change this behavior, and when I put null values in requests, the obpm should not write those tags. Is that possible?
Should be like that:
<GetFileByName xmlns="http://www.stellent.com/GetFile/">
<dDocName>V_123410</dDocName>
<revisionSelectionMethod>latestReleased</revisionSelectionMethod>
</GetFileByName>Thanks!Hi,
I have question regarding aggregates. It's possible to read data from BW aggregates? We have webi reports on a SAP BW multi cube and we would like to optimize retriving query.
>> Because you are using the BW Query as the source all the items that you have done so far in terms of aggregation, indexing, ... is all valid and there are no specific steps required to leverage it with Web Intelligence. Make sure the aggregates are "correct" meansing that they do reflect what you are asking for in the Web Intelligence query panel
How can we filter in webi query null (#) values. If we create condition that some variabe is diffrent from # we still get null (#) values in report.
>> You should be able to create a variable. in case you tried that already could you be more specific ?
thanks
Ingo -
Hi,
I'm using forms6i, I'm having a poplist in my form, which i populate in when-new-form-instance.
So when i open the form, and try to select one value, i'm seeing one null value, and if i select one value from list and again try to change the value then the previous null value is gone.
So to avoid that in when-new-form-instance itself , i assigned one value to the poplist using Get_List_Element_Value.
But the problem is since i'm assigning value, the form goes in insert status, and so even if i dont enter any valuees and try to exit, it is asking Close Form? (because i have few non-null items also).
How can i get one safe solution (like as it work when we assign some static values to the poplist).
ie i dont want nulls to be seen iin the list also i dont want the close form? message
I tried one solun by setting the form status as new again in w-n-f-i. But since i have multirecord block, this problem comes with every record.
Please suggest one better solutionHi Divya
why don't u try putting the same code of the w-n-f-i in when-validate-record or when-new-record-instance may be it work...
if not working pls share us the code what about an example:
declare
rg_name varchar2(40):='r_area_record1';
rg_id Recordgroup;
LIST_ID ITEM;
errcode NUMBER;
begin
rg_id:=Find_Group(rg_name);
if Id_null(rg_id)
then
rg_id :=Create_group_from_query(rg_name,
'select VC_ID , research_area from research_info
where proff_id= 9');
LIST_ID:=FIND_ITEM('TRY_BLOCK.TRY');
end if;
errcode:=populate_group(rg_id);
POPULATE_LIST(LIST_ID,RG_ID);
end; Regards,
Abdetu...
Edited by: Abdetu on Jan 27, 2011 2:30 AM -
Null Value in af:SelectOneChoice
HI,
I want to fetch value from a selectone choice,in backing bean.
following is my binding.
<af:selectOneChoice value="#{bindings.ExcelVOCode.inputValue}"
label="#{bindings.ExcelVOCode.label}"
validator="#{FileProcessor.selectOneChoice_validator}"
id="excelTypeList" autoSubmit="true" valuePassThru="true"
immediate="true"
binding="#{FileProcessor.excelTypeList}">
<f:selectItems value="#{bindings.ExcelVOCode.items}" id="selectItems1"
binding="#{FileProcessor.selectItems1}"/>
</af:selectOneChoice>
And i have tried following method to get the values.
1
CoreSelectOneChoice exe=getexcelTypeList();
System.out.println("Id"+exe.getValue().toString());
2 FacesContext fc = FacesContext.getCurrentInstance();
ValueBinding vb = fc.getApplication().createValueBinding("#{bindings.ExcelVOCode.inputValue}");
System.out.println("Value"+vb.getValue(fc));
But each of these method returns me null,
Following is my page defination.
<?xml version="1.0" encoding="UTF-8" ?>
<pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
version="10.1.3.39.81" id="FileUploadPageDef"
Package="xml.pageDefs">
<parameters/>
<executables>
<iterator id="ExcelVOIterator" RangeSize="10" Binds="ExcelVO"
DataControl="AppModuleDataControl"/>
<iterator id="ExcelVO2Iterator" RangeSize="-1" Binds="ExcelVO2"
DataControl="AppModuleDataControl"/>
</executables>
<bindings>
<list id="ExcelVOCode" IterBinding="ExcelVOIterator" StaticList="false"
ListOperMode="0" ListIter="ExcelVO2Iterator">
<AttrNames>
<Item Value="Code"/>
</AttrNames>
<ListAttrNames>
<Item Value="Code"/>
</ListAttrNames>
<ListDisplayAttrNames>
<Item Value="Name"/>
</ListDisplayAttrNames>
</list>
</bindings>
</pageDefinition>
Please help me with it,
ThanksHi,
Any how i was finally able to get the value by implementing somthing like this in the jsp
<af:selectOneChoice value="#{bindings.ExcelVOCode.inputValue}"
label="#{bindings.ExcelVOCode.label}"
id="excelTypeList" autoSubmit="true" valuePassThru="true"
immediate="false"
binding="#{FileProcessor.excelTypeList}"
simple="true" required="false"
partialTriggers="excelTypeList">
<af:forEach items="#{bindings.ExcelVO.rangeSet}" var="item">
<af:selectItem value="#{item.Code}" label="#{item.Name}"
binding="#{FileProcessor.selectItem}"/>
</af:forEach>
</af:selectOneChoice>
and this in the backing bean.
CoreSelectItem seq=getSelectItem();
System.out.println("Item"+seq.getLabel());
But the problem is when i attach a binding to Selectitem,it doesn't show me all the values in the drop down it only shows the last value in the table ,i.e the drop down have a single entry.
Please provide some indicator.
Thanks -
Hi,
I have done a search on the threads with null value in LOVs but it has not helped me understand the situation any better.
currently i have two select lists on a form, customer and project.
customers have many projects - and the only mandatory field on this form is customer - a project does NOT have to be selected - however, when the project is selected - i wish to validate the two items so that the selected project belongs to the selected customer.
i have been able to do this to some degree using the validation by doing a select exists, however, when the project select list has no item set (is NULL) then the validation function fails.
the validation function works fine when the project is not null. i basically want to force to to turn the %null% into actual null so i can use the is null function or something along those lines.
i have tried writing a calculation that does the actual translaction after submit, however, i think i'm writing the code wrong
can anyone lend a hand? or suggest some other alternatives?
Many thanks!Hi Scott,
Thanks for your reply
I have tried to enter the item level validation as an exists query as follows :-
select project_name from project where (:p2_project_id = '%null'||'%') OR (project_id = :p2_project_id AND customer_id = :p2_customer_id)
:p2_project_id and :p2_customer_id are both select lists.
it checks to see whether the :p2_project_id is null if it is, then no checking is necessary - otherwise, the project selected must have the correct customer selected.
i can check that the project has a matching customer selected when project is not null, but when it is null i get the problem
select project_name from project where (:p2_project_id = '%null'||'%') OR (project_id = :p2_project_id AND customer_id = :p2_customer_id): ORA-01722: invalid number
any ideas?
cheers
leonard -
Null value in List Binding (enumeration mode)
Hi,
how can I declare a NULL value in a List binding with enumeration mode?
A user should be able to select an empty entry in a combobox to update an attribute with a null value.
I'm using JDev9052 and JClient.
Any hints?
Thanks,
MarkusAdding '-1' in JComboBox (addItem(new Integer(-1))) or in the control binding does not change the picture. Sorry.
While play with different List bindings I have discovered that a Button LOV Binding works when using a "select * UNION select null from dual" view object. It does not work with a Combobox LOV binding. Why?
Still, my problem List binding in enumeration mode (with Combobox) is unsolved. any hints or samples?
My current combobox binding:
<DCControl
id="Job"
DefClass="oracle.jbo.uicli.jui.JUComboBoxDef"
SubType="DCComboBox"
BindingClass="oracle.jbo.uicli.jui.JUComboBoxBinding"
IterBinding="EmpView1Iterator"
ApplyValidation="false"
isDynamic="false"
ListOperMode="0"
StaticList="true"
Editable="false" >
<AttrNames>
<Item Value="Job" />
</AttrNames>
<ValueList>
<Item Value="ANALYST" />
<Item Value="CLERK" />
<Item Value="MANAGER" />
<Item Value="PRESIDENT" />
<Item Value="SALESMAN" />
<Item Value="-1" />
</ValueList>
</DCControl>
My current Button LOV binding:
<DCControl
id="Job2"
DefClass="oracle.jbo.uicli.jui.JULovButtonDef"
SubType="DCLovButton"
BindingClass="oracle.jbo.uicli.jui.JULovButtonBinding"
IterBinding="EmpView1Iterator"
DTClass="oracle.adf.dt.objects.JUDTCtrlListLOV"
ApplyValidation="false"
isDynamic="false"
ListOperMode="0"
ListIter="JobListView1Iterator" >
<AttrNames>
<Item Value="Job" />
</AttrNames>
<ListAttrNames>
<Item Value="Job" />
</ListAttrNames>
<ListDisplayAttrNames>
<Item Value="Job" />
</ListDisplayAttrNames>
</DCControl> -
NULL value not validated for a Required field
Hi,
I have added a MessageLovInput item to the expense header page (/oracle/apps/ap/oie/entry/header/webui/GeneralInformationPG), and have made the Required Value to True. But I do not get any error when I navigate to the next page without populating the field. If I enter in incorrect information, it validates it against the LOV, but not for null values.
Any pointers to make the field validate NULL values?
Thanks,
AshishYeah.. I can see the Required field indicator (*) next to the field. I have tried with all the values (uiOnly, ValidatorOnly, Yes etc.), but it does not validate NULL values.
I'll try to handle this in the controller, but would prefer if this can be done by personalization.
Ashish -
Check for NULL value (Recordset field)
Hi y'all...
A little question, so just for the weekend...
I've a query that returns 4 fields, the fisrt three always containing data, and the last one an integer, or NULL. If I get the value with <i>rs.Fields.Item(3).Value.ToString();</i> it always contains an integer. The NULL values are always converted to '0'.
How can I check if it is a NULL value?Okey, found a workaround, using the SQL function ISNULL()...
SELECT ISNULL(U_MyVar, 'null_value') FROM [@MyTable]
Now I can check if the value has the value <i>"null_value"</i>. If so, that field was <i>null</i>
Maybe you are looking for
-
Hi, Can you please tell me if BPM in the Netweaver stack is the same as Integration Process in IR? And what is Business Process Engine? Thanks in advance Siji
-
Cannot play cd after burning from iTunes
When I burn a playlist from my iTunes library onto a CD, it will not play on my Sony CD player? Is there anything I am doing wrong?
-
Reassign assets without altering menus and buttons
I created a DVD that contained too much data to fit on a 4.7 disc however I didn't notice this until after my menues were perfect and each button did exactly what I wanted it to do. Now I'm in the process of compressing my original movie so that it w
-
How to setup Proxy in new environment?
Hi All, We have implemented a new ECC and PI environment. When we try to regenerate the Inbound proxy in ECC for a proxy message already defined in new PI Integration repository, we get the following error message: Diagnosis The object curr
-
WM/Menu/Panel - Need Help/Suggestions
At the moment, I'm running KDE 3.5... with OpenBox3 as the window manager. I like the KDE apps, and the OpenBox look and feel. I really, really like Xfce4's panel and right click on desktop menu, and was wondering if it is possible to give up the DE