Unique Validation
Hi all,
I did a validation for a page item in my page using SQL->EXISTS
Validation 1:
select 1 from RMA_CATEGORY_TBL where "name"=:P8_NAME
When the value entered into the name field is already exists in table means it should throw name already exist error, but it is not giving error when i follow the above code. How can i solve the issue.
Thanks.
Hi Apex,
A Slight change in your validation, change it to
SQL(Not Exists) and specify your condition
SELECT
1
FROM
RMA_CATEGORY_TB
WHERE
name = :P8_NAME
Also enter the error message to be specified, if the validation fired.
Brgds,
Mini
Mark Answers Promptly
Similar Messages
-
Adding the unique validation on child vo attribute
Hi, I'm using Jdev 11.1.2.0 I have two tables, master child relationship. In master EO1, I have column Master_Id and in child EO2, I have columns Master_Id, child_id, child_name. i have created the assosiations in beteween EO1 and EO2 with the column Master_Id. and creatd vo's and viewlinks also. and when i drag and drop the master vo and child vo on to the page, if i select master vo first row, the correspodning child records are displayed perfectly. Now I want to apply the unique validation on the child vo columns child_id and child_name. like Child vo data;
Master_Id
Child_Id
Child_name
1
1
A
1
2
B
1
3
C
2
1
A
2
2
B
2
3
C
if I select 1 in master table, then in child table if i create a row and inserting the data, it should check for the duplicate data is there or not under that master_id. I did adding the Custom attribute validation on EO level, like checking the value is existed in the given rowset or not. Instead of adding this custom attibute validation, is there any other way to do it on the EO attribtue level, like selecting the generate unique key constraint. Any suggestion would be appreciated. Thanks.In this car you only can validate using have methods or groovy. Read http://docs.oracle.com/middleware/1212/adf/ADFFD/bcrules.htm#CIHBBDDB for more info about this.
However, if you have the relationship you should have the pk fk too.
Timo -
Related Drop-down boxes - unique validation
Someone sent me a acroform, which has different sections that contain drop-down controls. Each drop-down has the options 1,2,3,4,5. These are supposed to be used to rank preferences. Is there a way where once you select "1" you are not allowed to choose it again in the remaining 4 drop-down boxes? I cannot find this anywhere in teh Acrobat PDF bible, albeit an older version.
regards,
NatWe can do this with power of JavaScript. I would use the substring function in loading the values to dropdown.
for example I will have code similar to the following on DropDown1 'exit' event
var FilterChar = this.rawValue;
var DD2AllValues = "A1,A2,A3,a1,a2,a3,B1,B2,B3,b1,b2,b3,C1,C2,C3,c1,c2,c3";
DD2AllValues = DD2AllValues.split(",");
DropDown2.clearItems()
var curItem
var curChar
for (i=0,i<DD2AllValues.length,i++) {
curItem = DD2AllValues[0];
curChar = DD2AllValues.substring(0,1)
if (curChar == FilterChar) {
DropDown2.addItem(curItem);
hope this helps though you have to change a lot to make it work for your situation.
Good luck, -
Validation not working when application is in portal
hi i have a stuation where my unique validation are working when i run application as standalone but when i put application in portal is working ,am adding my application in portal by creating ADF JAR and aadd the jar in my portal,am in jdeveloper 11.1.1.6.0
am doing validation in entity level
<validation:UniqueKeyValidationBean
Name="UamOrganisations_Rule_0"
ResId=".model.entities.UamOrganisations_Rule_0"
KeyName="AltKey">
<validation:OnAttributes>
<validation:Item
Value="Organisationname"/>
</validation:OnAttributes>
</validation:UniqueKeyValidationBean>
is still not working even if i set immediate=true
<af:inputText value="#{bindings.Organisationname.inputValue}"
simple="true"
columns="20"
maximumLength="#{bindings.Organisationname.hints.precision}"
shortDesc="#{bindings.Organisationname.hints.tooltip}"
id="it1" autoSubmit="true" required="true"
immediate="true">
<f:validator binding="#{bindings.Organisationname.validator}"/>
</af:inputText> -
How to stop attribute level validation when entity validator fails?
Hi,
Can you suggest any way to achieve the desired behaviour on the following scenario.
Table contains the following columns
1. Grade
2. Grade Rate
3. Status
Constraints:
1. Grade and Grade Rate together must be unique.
2. Grade and Grade Rate are mandatory fields.
Implementation:
1. Have Mandatory validator at attribute level for Grade and Grade Rate by default.
2. Alternate key is defined based on Grade and Grade Rate and added the same as Entity validator.
User operation scenario:
User adds a row in a table, entered 'GradeOne' as Grade, tabbed out and then entered '5 %' as Grade Rate (Existing row of the VO has a row with similar data already). When user try to navigate to other row, both validation at attribute level and entity level fires and gives the following error messages.
Error Msg 1. Grade and GradeRate should be unique.
Error Msg 2. Attribute GradeRate is required.
Expected behaviour:
I can understand the reason why ADF throws both the errors (coz it didn't consider the invalid value of GradeRate posted into attribute), but the error messages confuses the user. It would be great if he get only one error message in this scenario (i.e. Unique validation alone)
Question:
How can I restrict in such a way that only one error validation happens in a request (i.e. either attribute level or entity level or in a particular order}
Thanks in Advance.Hi,
the reason ADF does this is for performance. What if you create a custom error handler in the DataBindings.cpx file and use this to suppress all other errors?
See
Decompiling ADF Binaries: Customizing Business Components Error Messages
:http://www.adftutorials.com/adf-custom-error-handler-to-display-custom-message-to-user.html
Frank -
ADF View object validation. Cannot have same column value multiple time.
Hi Expert,
I have a ADF viewobject validation question. I have the Department and employee view objects. Each department have multiple employees. (may be u can also assume. the employee name is an VO attribute not the database field)
I need to implement the following validation rule
One department shouldn't have same employee name. How can i implement this validation rule in the ADF-BC.
Looking forward ur expert suggestions. Thanks
-tAssuming that the employee name (which you have said is a transient attribute) is created by concatenating some other fields, you could, I suppose create a unique index in the DB or a unique validator in the EO to ensure that the department ID (assume you have such an attribute) and the fields that make up the name are unique. It seems kind of unusual to be validating a transient field like this.
John -
Serious performance Problems with SQL
I am running this query to a oracle 10
update ETY_MEDIASHEET set PUB_TYPE = 'REVOKED' where id in (9090,9094,9100,9106,9112,9118,9124,9130,9136,9142,9148,9154,9160,9166,9172)
I am using ejb3 with hibernate as entitymanager. However, due to performace I need to set status quickly (so that gui gets correct data), thus i have to set it "hard" in the database.
This query takes a very long time. From seconds if the list has 1-2-3 items, and to minutes if it has 50+ items
Any1 got an idea as to solve this issue? or even why it occurs?
BTW - I am no sql star.yes, the ID has a index (as well as title).
the table holds data representing albums and albumtracks
"Column Name" "Data Type" "Nullable" "Data Default" "COLUMN ID" "Primary Key" "COMMENTS"
"ID" "NUMBER(19,0)" "No" "" "2" "1" ""
"SHEET_TYPE" "VARCHAR2(31 Char)" "No" "" "1" "" ""
"CRE_DATE" "TIMESTAMP(6)" "Yes" "" "3" "" ""
"CRE_USER" "VARCHAR2(255 Char)" "Yes" "" "4" "" ""
"MOD_DATE" "TIMESTAMP(6)" "Yes" "" "5" "" ""
"MOD_USER" "VARCHAR2(255 Char)" "Yes" "" "6" "" ""
"PUB_DATE" "TIMESTAMP(6)" "Yes" "" "7" "" ""
"PUB_USER" "VARCHAR2(255 Char)" "Yes" "" "8" "" ""
"PUB_MSG" "VARCHAR2(255 Char)" "Yes" "" "9" "" ""
"PUB_TYPE" "VARCHAR2(255 Char)" "Yes" "" "10" "" ""
"TITLE" "VARCHAR2(512 Char)" "Yes" "" "11" "" ""
"PUBLISHER_LINE" "VARCHAR2(512 Char)" "Yes" "" "12" "" ""
"COPYRIGHT_LINE" "VARCHAR2(512 Char)" "Yes" "" "13" "" ""
"RELEASE_DATE" "TIMESTAMP(6)" "Yes" "" "14" "" ""
"ORGRELEASE_DATE" "TIMESTAMP(6)" "Yes" "" "15" "" ""
"PARENTAL_ADVISORY" "NUMBER(1,0)" "Yes" "" "16" "" ""
"PUBLISHABLE" "NUMBER(1,0)" "Yes" "" "17" "" ""
"IS_FOR_SALE" "NUMBER(1,0)" "Yes" "" "18" "" ""
"PACKAGE_TYPE" "VARCHAR2(255 Char)" "Yes" "" "19" "" ""
"EDITION" "VARCHAR2(255 Char)" "Yes" "" "20" "" ""
"DURATION" "NUMBER(10,0)" "Yes" "" "21" "" ""
"LANGUAGE_CODE" "VARCHAR2(255 Char)" "Yes" "" "22" "" ""
"PRODUCTION_COMPANY" "VARCHAR2(255 Char)" "Yes" "" "23" "" ""
"OFFICIAL_SITE" "VARCHAR2(255 Char)" "Yes" "" "24" "" ""
"RECOMMENDED_FROM" "VARCHAR2(255 Char)" "Yes" "" "25" "" ""
"LABEL" "VARCHAR2(255 Char)" "Yes" "" "26" "" ""
"RECORDINGCOUNTRY" "VARCHAR2(255 Char)" "Yes" "" "27" "" ""
"VERSION" "VARCHAR2(255 Char)" "Yes" "" "28" "" ""
"CATALOG_ID" "NUMBER(19,0)" "Yes" "" "29" "" ""
"SUPPLIER_PRICECODE_ID" "NUMBER(19,0)" "Yes" "" "30" "" ""
"SUPPLIER_ID" "NUMBER(19,0)" "Yes" "" "31" "" ""
Index
"Index Name" "Columns" "Uniqueness" "Status" "Index Type" "Temporary" "Partitioned" "Function Index Status" "Join Index"
"SYS_C0025348" "ID" "UNIQUE" "VALID" "NORMAL" "N" "NO" "" "NO"
"IDX_ETY_SHEET_TITLE" "TITLE" "NONUNIQUE" "VALID" "NORMAL" "N" "NO" "" "NO" -
How to Create primary key index with duplicate rows.
Hi All,
While rebuilding an index on a table , I am getting error that there are duplicate rows in a table.
Searching out the reason led me to an interesting observation.
Please follow.
SELECT * FROM user_ind_columns WHERE table_name='SERVICE_STATUS';
INDEX_NAME TABLE_NAME COLUMN_NAME COLUMN_POSITION COLUMN_LENGTH CHAR_LENGTH DESCEND
SERVICE_STATUS_PK SERVICE_STATUS SUBSCR_NO_RESETS 2 22 0 ASC
SERVICE_STATUS_PK SERVICE_STATUS STATUS_TYPE_ID 3 22 0 ASC
SERVICE_STATUS_PK SERVICE_STATUS ACTIVE_DT 4 7 0 ASC
SERVICE_STATUS_PK SERVICE_STATUS SUBSCR_NO 1 22 0 ASC
SELECT index_name,index_type,table_name,table_type,uniqueness, status,partitioned FROM user_indexes WHERE index_name='SERVICE_STATUS_PK';
INDEX_NAME INDEX_TYPE TABLE_NAME TABLE_TYPE UNIQUENESS STATUS PARTITIONED
SERVICE_STATUS_PK NORMAL SERVICE_STATUS TABLE UNIQUE VALID NO
SELECT constraint_name ,constraint_type,table_name,status,DEFERRABLE,DEFERRED,validated,index_name
FROM user_constraints WHERE constraint_name='SERVICE_STATUS_PK';
CONSTRAINT_NAME CONSTRAINT_TYPE TABLE_NAME STATUS DEFERRABLE DEFERRED VALIDATED INDEX_NAME
SERVICE_STATUS_PK P SERVICE_STATUS ENABLED NOT DEFERRABLE IMMEDIATE VALIDATED SERVICE_STATUS_PK
1. Using index scan:
SELECT COUNT (*)
FROM (SELECT subscr_no, active_dt, status_type_id, subscr_no_resets
FROM service_status
GROUP BY subscr_no, active_dt, status_type_id, subscr_no_resets
HAVING COUNT (*) > 1) ;
no rows returned
Explain plan:
Operation OBJECT Name ROWS Bytes Cost OBJECT Node IN/OUT PStart PStop
SELECT STATEMENT Optimizer MODE=CHOOSE 519 K 14756
FILTER
SORT GROUP BY NOSORT 519 K 7 M 14756
INDEX FULL SCAN ARBOR.SERVICE_STATUS_PK 10 M 158 M 49184
2. Using Full scan:
SELECT COUNT (*)
FROM (SELECT /*+ full(s) */ subscr_no, active_dt, status_type_id, subscr_no_resets
FROM service_status s
GROUP BY subscr_no, active_dt, status_type_id, subscr_no_resets
HAVING COUNT (*) > 1) ;
71054 rows returned.
Explain Plan:
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=CHOOSE 1 24123
SORT AGGREGATE 1
VIEW 519 K 24123
FILTER
SORT GROUP BY 519 K 7 M 24123
TABLE ACCESS FULL ARBOR.SERVICE_STATUS 10 M 158 M 4234
Index SERVICE_STATUS_PK is a unique and composite primary key VALID index. And the constraint is ENABLED and VALIDATED still having duplicate rows in table.
How it is possible?
Is it an Oracle soft Bug??
Regards,
Saket Bansalsaket bansal wrote:
Values are inserted as single rows inserts through an GUI interface.And you still claim to have over 71K duplicate records, without the GUI getting any kind of errors?
That does not add up and can only be explained by a "bug".
I tried inserting a duplicate record but failed.
SQL> insert into service_status (select * from service_status where rownum <2);
insert into service_status (select * from service_status where rownum <2)
ERROR at line 1:
ORA-00001: unique constraint (ARBOR.SERVICE_STATUS_PK) violatedAre you really sure there is no other way data in this table is populated/manipulated in bulk? -
Alternative Item group not appearing CS11
Hi all,
We have created BOM with all the substitution materials which can be used at the time of Production.
We have utilised the Alternative item group for this. When i look at BOM for a material say X using CS03 i can see the Alternative Item group. But when i explode the BOM using CS11 i cannot see the alternative item group in it.
The scenario in details is :
For the header material X i have X1,as component with different change numbers and unique validity dates and this component is seen in 3 lines in BOM with alternative item groups against it.
Now when i explode the BOM using CS11 i can see X1 component with alternative group for only 2 line items.
We are in ECC6.0 version, can i ask you whether there is any patch or oss note to be applied.I have tried searching OSS notes but couldnt find them
Please advice as this is of very high importance.
Thanking you
Regards
Raj KiranDear Raj,
What I wanted to confirm from you is ,after executing CS11--->
Changing Layout -
> Selecting Alternative Item group,
priority,Usage probablitity,the values are not shown in the field
properly though they are actually present in the BOM?
So enter the proper valid from dates in CS11(Select the date
on which the alternative item group is active) & also alternative
BOM number properly.
So go ahead as I suggested and even after entering the proper
valid from dates,Alt.BOM---changing layout ,if its not giving
proper results,then go for checking OSS notes.
This is with respect to ECC 6.0.
Check & revert back.
Regards
Mangal -
NVL function in use in PL/SQL
The following SQL statement runs fine and returns data. Notice the ,nvl(fld.MULTSELECT,0).
SELECT exs.PK
,fld.Name
,fld.Desc_
,fld.DataTp
,case when rtrim(fld.InlineName) = '' then
NULL
--convert(nvarchar(255), Null)
else fld.InlineName
end InlineName
,fld.UOM
,fld.High
,fld.Low
,fld.CriticalHigh
,fld.CriticalLow
,fld.ChTp
,nvl(fld.MULTSELECT,0)
,fld.Type
,fld.IsProtected
,fld.RecTp
,fld.RecTpMbrSeq
,fld.SrcEtType
,fld.TargetEtType
,fld.FldCat
--,fc.ChFK FldCateoryFK
-- ,dbo.fn_StripCharacters(fld.Name, '^a-z0-9') SrcStagingFld -- strip out all characters except alphanumeric
,nvl(CAST(trim(fld.PropagateToEAV) AS NUMBER(1,0)),1) PropagateToEAV
,CAST(trim(fld.RecTimeStamp) AS NUMBER(1,0)) RecTimeStamp
,CAST(trim(fld.RecTimeStampEnd) AS NUMBER(1,0)) RecTimeStampEnd
,nvl(CAST(trim(fld.EtTypeTimeStampFld) AS NUMBER(1,0)),0) EtTimeStampFld
,nvl(CAST(trim(fld.EtTypeTimeStampEndFld) AS NUMBER(1,0)),0) EtTypeTimeStampEndFld
,nvl(CAST(trim(fld.EtTypeNameFld) AS NUMBER(1,0)),0) EtTypeNameFld
,nvl(CAST(trim(fld.EtTypeNameFldDeId) AS NUMBER(1,0)),0) EtTypeNameFldDeId
,CAST(trim(fld.EtSrcSystRecKey) AS NUMBER(1,0)) EtSrcSystRecKey
,CAST(trim(fld.EtSrcSystRecAlternativeRecKey) AS NUMBER(1,0)) EtSrcSystAlternativeRecKey
,CAST(trim(fld.ParentEtSrcSystRecKey) AS NUMBER(1,0)) ParentEtSrcSystRecKey
,CAST(trim(fld.MainEtRecTp) AS NUMBER(1,0)) MainEtRecTp
FROM Ld_UD_RecTp fld
-- left join MD_FldCat fc on fld.FldCat = fc.Name
left join Md_Fld exs on fld.RecTp = exs.RecTp and fld.Name = exs.Name
left join Aud_ModDataError Err on err.RecTp = fld.RecTp and Err.BatLogId = 1 -- check if the recordtype has any load errors
where nvl(fld.name,'zzzzzzz') <>'zzzzzzz'
and Err.RecTp is Null
When used in a stored procedure as follows, the procedure doesn't compile
create or replace PROCEDURE MD_Ld_Flds
v_BatLogID IN NUMBER DEFAULT NULL
AS
BEGIN
MERGE INTO MD_Fld targ
USING (SELECT exs.PK
,fld.Name
,fld.Desc_
,fld.DataTp
,case when rtrim(fld.InlineName) = '' then
NULL
--convert(nvarchar(255), Null)
else fld.InlineName
end InlineName
,fld.UOM
,fld.High
,fld.Low
,fld.CriticalHigh
,fld.CriticalLow
,fld.ChTp
,nvl(fld.MULTSELECT,0)
,fld.Type
,fld.IsProtected
,fld.RecTp
,fld.RecTpMbrSeq
,fld.SrcEtType
,fld.TargetEtType
,fld.FldCat
--,fc.ChFK FldCateoryFK
-- ,dbo.fn_StripCharacters(fld.Name, '^a-z0-9') SrcStagingFld -- strip out all characters except alphanumeric
,nvl(CAST(trim(fld.PropagateToEAV) AS NUMBER(1,0)),1) PropagateToEAV
,CAST(trim(fld.RecTimeStamp) AS NUMBER(1,0)) RecTimeStamp
,CAST(trim(fld.RecTimeStampEnd) AS NUMBER(1,0)) RecTimeStampEnd
,nvl(CAST(trim(fld.EtTypeTimeStampFld) AS NUMBER(1,0)),0) EtTimeStampFld
,nvl(CAST(trim(fld.EtTypeTimeStampEndFld) AS NUMBER(1,0)),0) EtTypeTimeStampEndFld
,nvl(CAST(trim(fld.EtTypeNameFld) AS NUMBER(1,0)),0) EtTypeNameFld
,nvl(CAST(trim(fld.EtTypeNameFldDeId) AS NUMBER(1,0)),0) EtTypeNameFldDeId
,CAST(trim(fld.EtSrcSystRecKey) AS NUMBER(1,0)) EtSrcSystRecKey
,CAST(trim(fld.EtSrcSystRecAlternativeRecKey) AS NUMBER(1,0)) EtSrcSystAlternativeRecKey
,CAST(trim(fld.ParentEtSrcSystRecKey) AS NUMBER(1,0)) ParentEtSrcSystRecKey
,CAST(trim(fld.MainEtRecTp) AS NUMBER(1,0)) MainEtRecTp
FROM Ld_UD_RecTp fld
-- left join MD_FldCat fc on fld.FldCat = fc.Name
left join Md_Fld exs on fld.RecTp = exs.RecTp and fld.Name = exs.Name
left join Aud_ModDataError Err on err.RecTp = fld.RecTp and Err.BatLogId = v_BatLogID -- check if the recordtype has any load errors
where nvl(fld.name,'zzzzzzz') <>'zzzzzzz'
and Err.RecTp is Null -- Exclude recordtypes which had errors
) src on (src.PK = Targ.PK)
when matched then
update Set Targ.Name =src.Name
,Targ.Desc_ =src.Desc_
,Targ.DataTp =src.DataTp
,Targ.InlineName =src.InlineName
,Targ.UOM =src.UOM
,Targ.High =src.High
,Targ.Low =src.Low
,Targ.CriticalHigh =src.CriticalHigh
,Targ.CriticalLow =src.CriticalLow
,Targ.ChTp =src.ChTp
,Targ.MultSelect =src.MultSelect
,Targ.Type =src.Type
,Targ.IsProtected =src.IsProtected
,Targ.RecTp =src.RecTp
,Targ.RecTpMbrSeq =src.RecTpMbrSeq
,Targ.SrcEtType =src.SrcEtType
,Targ.TargetEtType =src.TargetEtType
,Targ.FldCat =src.FldCat
--,Targ.SrcStagingFld =src.SrcStagingFld
,Targ.PropagateToEAV =src.PropagateToEAV
,Targ.RecTimeStamp =src.RecTimeStamp
,Targ.RecTimeStampEnd =src.RecTimeStampEnd
,Targ.EtTimeStampFld =src.EtTimeStampFld
,Targ.EtTimeStampEndFld =src.EtTypeTimeStampEndFld
,Targ.EtNameFld =src.EtTypeNameFld
,Targ.EtNameFldDeId =src.EtTypeNameFldDeId
,Targ.EtSrcSystRecKey =src.EtSrcSystRecKey
,Targ.EtSrcSystAlternativeRecKey=src.EtSrcSystAlternativeRecKey
,Targ.ParentEtSrcSystRecKey =src.ParentEtSrcSystRecKey
,Targ.MainEtRecTp =src.MainEtRecTp
,targ.LastModified = SYSDATE
when not matched then --target
insert (Name
,Desc_
,DataTp
,InlineName
,UOM
,High
,Low
,CriticalHigh
,CriticalLow
,ChTp
,MultSelect
,Type
,IsProtected
,RecTp
,RecTpMbrSeq
,SrcEtType
,TargetEtType
,FldCat
--,SrcStagingFld
,PropagateToEAV
,RecTimeStamp
,RecTimeStampEnd
,EtTimeStampFld
,EtTimeStampEndFld
,EtNameFld
,EtNameFldDeId
,EtSrcSystRecKey
,EtSrcSystAlternativeRecKey
,ParentEtSrcSystRecKey
,MainEtRecTp
,LastModified)
values (src.Name
,src.Desc_
,src.DataTp
,src.InlineName
,src.UOM
,src.High
,src.Low
,src.CriticalHigh
,src.CriticalLow
,src.ChTp
,src.MultSelect
,src.Type
,src.IsProtected
,src.RecTp
,src.RecTpMbrSeq
,src.SrcEtType
,src.TargetEtType
,src.FldCat
--,src.SrcStagingFld
,src.PropagateToEAV
,src.RecTimeStamp
,src.RecTimeStampEnd
,src.EtTimeStampFld
,src.EtTypeTimeStampEndFld
,src.EtTypeNameFld
,src.EtTypeNameFldDeId
,src.EtSrcSystRecKey
,src.EtSrcSystAlternativeRecKey
,src.ParentEtSrcSystRecKey
,src.MainEtRecTp
,SYSDATE);
END;
When you show errors you get the following;
7/7 PL/SQL: SQL Statement ignored
125/8 PL/SQL: ORA-00904: 'SRC"."MULTSELECT": invalid identifier
If I compile the procedure without the NVL, the procedure compiles with no errors.
We're running Oracle 11gHi,
In a sub-query (such as the USING sub-query in a MERGE statement), each column in the SELECT clause has to have a unique, valid name.
In an unnested SQL query, you don't have to name the columns at all. If you say
SELECT NVL (dummy, 'FOO')
FROM dual;In SQL*Plus, it will automatically name the column "NVL(DUMMY,'FOO')" for you, and it doesn't insist that the name be unique.
In a sub-query, you have to explicitly name all the columns, and make sure they're unique; for example
,nvl(fld.MULTSELECT,0) AS multselect_or_0
To be excruciatingly precise, some versions of Oracle let you get away with not having aliases in certain circumstances, but there's no point in doing so. Always assign unique aliases to columns in a sub-query. -
Validate a viewRow bug ?
In a previuous posting I noticed the validate method in a ViewRowImpl was never called from the framework (see Re: validate Method doesn't fire in insert - is it a bug ?
Now I tested it in 10.1.2 and it's called every new row is read or inserted.
In the documentation there's non infomation about the timing of that call.
What's correct behaviour ?
What this method is expected to do and when?
I need to know when it's called in order to know how I can use it.
Tks
TullioHi,
Can anybody clarify the validate() method of view rows?
I read in another thread that this method should be called on all particpating entities.
In my case the first Entity is the only participating Entity and even on a One Entity based VO, the validate method is not called in Web application.
I noticed the following.
I my JClient application and in the application module tester the row validate methods are called.
But in my Struts/ADF web application using that same VO the row validation is never called.
I tought that the advantage of using ADF as the model for different UI clients, was the fact that a unique validation model, so testing for one kind of UI is valid for other UIs.
Is that the normal behaviour?
If yes could you advice me on where to force a call to the validate method in my struts/adf app.
In the onCommit method before calling doIt, is that the right place?
I have a lot of recoding to do so your advice is required.
Thanks
Fred -
Hello,
it seems that functional indexes are listed twice if there are two functions within the index columns.....
Example (Content from the indexes tab of the table view):
owner ....._PK UNIQUE VALID NORMAL N NO
NO ....._UUID
owner ....._UI1 UNIQUE VALID FUNCTION-BASED NORMAL N NO ENABLED NO SYS_NC00016$, SYS_NC00017$, ....._ID, ....._PLAN_ID SYS_EXTRACT_UTC("....._START")
owner ....._UI1 UNIQUE VALID FUNCTION-BASED NORMAL N NO ENABLED NO SYS_NC00016$, SYS_NC00017$, ....._ID, ....._PLAN_ID SYS_EXTRACT_UTC("....._END")
Both functions are in the same index "....._UI1".
The detail panel shows the same details.MPf_dba&amp;dataGmbH wrote:
Hello,
it seems that functional indexes are listed twice if there are two functions within the index columns.....
Example (Content from the indexes tab of the table view):
owner ....._PK UNIQUE VALID NORMAL N NO
NO ....._UUID
owner ....._UI1 UNIQUE VALID FUNCTION-BASED NORMAL N NO ENABLED NO SYS_NC00016$, SYS_NC00017$, ....._ID, ....._PLAN_ID SYS_EXTRACT_UTC("....._START")
owner ....._UI1 UNIQUE VALID FUNCTION-BASED NORMAL N NO ENABLED NO SYS_NC00016$, SYS_NC00017$, ....._ID, ....._PLAN_ID SYS_EXTRACT_UTC("....._END")
Both functions are in the same index "....._UI1".
The detail panel shows the same details.
What version of SQL*Developer?
I am using 3.2.20.09 and created 2 function-based indexes on a practice employee table, upper() on both first and last names. When displaying indexes through the table display using the Indexes tab and through the object navigator using indexes I only see each index once.
On a second pass I created a third composite index with upper on both first and last names and got the results similar to those you describe in both places. The column names (expression name in the table index pane) were different. -
Remote Desktop repeatedly installs ARD Client for standard users...
ARD 3.2 running on OS 10.5.4 on MacBook Core2Duos...
These are machines imaged from an asr disk image...
No issues with admin users...
Every time Remote Desktop is launched by a standard user, a admin user name / password is required and the Apple Remote Desktop Clint is reinstalled. After, ARD runs normally until it is quit and relaunched, even without a user logout...
Making the standard user an admin user resolves the issue. The issue returns when the admin right are removed from the user...
Have run permission repairs, removed and reinstalled Remote Desktop, manually checked permissions, etc...
It appears that from the standard user perspective, the ARD Client software needs to be updated. ...
Any ideas out there? I have to deploy these machines NOW and I am running out of ideas on this...
Thank you! LesDave,
Thank you for the ideas. While you are pretty much correct in what you have said, these are unfortunately not my issue(s). I wish they were!
1) ARD will run fine for a standard user (at least it did in Tiger) as long as it is properly setup and licensed by an admin user ahead of time (especially the entry of the license code). This I have done, and the license code is recognized just fine. I too thought of the promote / demote idea and have tried it. While promoted, it launches fine for the user, but upon demotion goes back to reinstalling the ARD Agent at each launch of the program (this install process does not run while the user is promoted)...
2) The systems are from the same disk image. However, I have given system its own unique, valid, legally purchased serial number. Though the program is loaded on the image, it has been installed only. It is not run or licensed on the master, only on the end-user client machines...
It appears to me that from the standard user perspective, the system thinks that the ARD Agent needs to be updated. I have verified with the PackageMaker SnapShot utility that the ARD Agent and its related files are being installed when this happens, and they appear to be the only thing being installed. The Remote Desktop Admin program itself seems to be fine.
Does anybody know exactly what happens at the file system lever when Remote Desktop is launched? I am thinking my standard user is lacking access to a particular file or directory or right, and I am sure I could quickly find it if I new what to trace. Watching fs_usage has yielded lots of information, but nothing that has helped...
I have also removed and reinstalled Remote Desktop to no avail. Disabled all ACLs on the file system, placed known-good receipts and run permission repairs, and forced chmod -R 777 down the path of everything I can find with the names Remote Desktop, ARD, etc...
I am a little worried at this point that the issue is created by the imaging process something like the question marks in docks in the latter updates of 10.4. I have seen similar issues come up (launching apps under Rosetta being one) with users' LaunchServices property lists after moving their home directories from one volume to another, making the issue very hard to track down, as they reside in files that do not contain the name of the app being affected...
Any further ideas would be much appreciated!
Les -
Bonjour
Quelle est la méthode pour faire fonctionner les formulaires dans Muse ?
J'ai bien créé un formulaire mais l'hébergeur (LWS) me bloque mes demandes considérant que l'envoi du mail est un spam ! Y a t'il un code spécial ? Je ne reçois rien sur le mail du formulaire alors qu'il est configuré avec le même nom que le nom de domaine !
Le captcha ne fonctionnant que sur business catalyst que faire ?
MerciBonjour, lorsque des soucis ont trait à l'envoi de mail, soit l'application générant le code est en cause (ici, Muse), soit l'hébergeur (ici LWS).
A priori, les formulaires passent sur de nombreux serveurs, mais peut-être certaines restrictions s'appliquent-elles chez LWS.
La question du Captcha ne serait pas en cause non plus puisque cette fois-ci, c'est directement le formulaire en lui même qui semble bloqué.
Pour le côté purement commercial du captcha sur BC uniquement, je vois surtout la facilité d'avoir un environnement ciblé et unique à valider (les serveurs BC) et non pas une multitude d'hébergeurs différents, installant différentes versions d'Apache, SQL, PHP et tout ce qui peut faire tourner vos sites web…
Google ReCaptcha doit pouvoir être intégré… à un élément HTML, c'est à dire en renseignant le code à l'intérieur d'un formulaire existant, mais pas directement dans le widget actuel (pas à ma connaissance en tous cas, et la doc d'affichage de recaptcha "sans plug-in" n'est clairement pas destinée à un profane…). -
Need help in to raise an exception in BundleException
Hi All,
I have one Create Page and one EO. In create page, I am displaying 10 blank rows at time for create new records. I am validating Code for uniqueness in method "validateEntity()" of "xxxxEOImpl.java". Here, what is happening, I am getting only one row validated at a time. Even, I tried to bundle all these errors and show at one shot by using "OAException.raiseBundledOAException(exceptions);".
For example:
If user enter 10 records for creation and out of 5 records are failed due to unique validation. Here, I want to bundle all these 5 validation errors and show at a time.
Please advice me if anybody knows or has done this kind of validation and raising errors.
Help is higlhly appreciated.
Thanks,
ArvinSome more examples which is similar to your requirement i believe.
Example 2
The following code caches exceptions thrown during validateEntity(), and then throws the cached exceptions
as one bundled exception.
protected void validateEntity()
super.validateEntity();
ArrayList exceptions = new ArrayList();
//check for duplicate Filter Name
if (getEntityState() == STATUS_NEW)
String value = getFilterName();
OADBTransaction tx = getOADBTransaction();
OAApplicationModule vam = getMyValidationAM();
FiltersVOImpl vo = vam.findViewObject("filtersViewUsage");
if (vo == null)
vo = vam.createViewObject("filtersViewUsage","oracle.apps.qrm.filter.server.FiltersVO");
vo.setMaxFetchSize(-1);
vo.initQuery(value,"C");
Row r = vo.first();
if (r != null)
exceptions.add(
new OAAttrValException (
OAException.TYP_ENTITY_OBJECT, // Entity attribute exception.
getEntityDef().getFullName(), //Entity full def name
getPrimaryKey(), //Row primary key
"FilterName", //Attribute Name
value, //Bad Value
"QRM", //Message Application Short Code
"QRM_UNIQUE_FILTERS_ERR")); //Message Code
//check for empty filters(no conditions)
EntityDefImpl def = EntityDefImpl.findDefObject("oracle.apps.qrm.filter.server.QrmFilterConditionsEO");
Iterator iterator = def.getAllEntityInstancesIterator(getDBTransaction());
String flag = "no";
while (iterator.hasNext())
QrmFilterConditionsEOImpl fcEO = (QrmFilterConditionsEOImpl)iterator.next();
// only check rows in valid state
if ( fcEO.getEntityState() != STATUS_DELETED && fcEO.getEntityState() != STATUS_DEAD )
flag = "OK";
if (flag.equals("no"))
exceptions.add(
new OARowValException (
getEntityDef().getFullName(),
getPrimaryKey(), //Row primary key
"QRM", //Message Application Short Code
"QRM_NO_CONDITIONS_ERR")); //Message Code
OAException.raiseBundledOAException(exceptions);
Example 3
The following code example caches exceptions thrown in a view object method, and then throws the cached
exceptions as one bundled exception.
public void checkUsed()
String ifSelected = null;
String name;
ArrayList exceptions = new ArrayList();
FiltersVORowImpl row = (FiltersVORowImpl)first();
while (row != null)
ifSelected = (String)row.getAttribute("SelectFlag");
if ("Y".equals(ifSelected))
name = (String)row.getAttribute("FilterName");
OAViewObjectImpl vo =
(OAViewObjectImpl)getApplicationModule().findViewObject("IsFilterUsedVO");
vo.setWhereClause(null);
vo.setWhereClauseParams(null);
vo.setWhereClauseParam(0,name);
vo.executeQuery();
Row r = vo.first();
//if there are analyses, then use them
if (r != null)
String msg= (String)r.getAttribute("AnalysisName");
String flag ="f";
while (r != null)
//change flag if it was the first row,if not append analysis name
if (flag.equals("f"))
flag = "N";
else
msg = msg +", "+ (String)r.getAttribute("AnalysisName");
r = vo.next();
MessageToken[] tokens = {new MessageToken("FILTER_NAME",name),
new MessageToken("ANALYSIS",msg)};
exceptions.add(
new OARowValException(
((ComponentObject)getViewObject()).getName(),
row.getKey(),
"QRM",
"QRM_FILTER_REMOVE_ERR",
tokens));
row =(FiltersVORowImpl)next();
OAException.raiseBundledOAException(exceptions);
Example 4
The following code example registers a validation exception in set<Attribute>() so BC4J can throw this
exception later during the entity validation.
public void setAmount(oracle.jbo.Number amnt)
// Clears any old exceptions for a fresh start.
clearAttributeException("Amount");
if(amnt < 0)
OAAttrValException attrEx = new OAAttrValException(
OAAttrValException.TYP_ENTITY_OBJECT,
getEntityDef().getFullName(),
getPrimaryKey(),
"Amount",
amnt,
"QRM",
"QRM_AMOUNT_IS_NEGATIVE");
registerAttributeException(getEntityDef().getAttributeDefImpl("Amount"),amnt, attrEx);
Example 5
This code example registers exceptions thrown during validateEntity()so BC4J can throw these exceptions
when validation completes.
protected void validateEntity()
super.validateEntity();
// Clears all Row and Attribute exceptions registered in validateEntity() for a fresh start.
clearAttributeException("FilterNAme");
clearRowExceptions();
//check for duplicate Filter Name
if (getEntityState()==STATUS_NEW)
String value = getFilterName();
OADBTransaction tx = getOADBTransaction();
OAApplicationModule vam = getMyValidationAM();
FiltersVOImpl vo = vam.findViewObject("filtersViewUsage");
if(vo == null)
vo = vam.createViewObject("filtersViewUsage", "oracle.apps.qrm.filter.server.FiltersVO");
vo.setMaxFetchSize(-1);
vo.initQuery(value,"C");
Row r = vo.first();
if (r != null)
OAAttrValException attrEx = new OAAttrValException (
OAException.TYP_ENTITY_OBJECT, // Entity attribute exception.
getEntityDef().getFullName(), //Entity full def name
getPrimaryKey(), //Row primary key
"FilterName", //Attribute Name
value, //Bad Value
"QRM", //Message Application Short Code
"QRM_UNIQUE_FILTERS_ERR")); //Message Code
registerAttributeException(getEntityDef().getAttributeDefImpl("FilterName"), value, attrEx);
//check for empty filters(no conditions)
EntityDefImpl def =
EntityDefImpl.findDefObject("oracle.apps.qrm.filter.server.QrmFilterConditionsEO");
Iterator iterator = def.getAllEntityInstancesIterator(getDBTransaction());
String flag = "no";
while (iterator.hasNext())
QrmFilterConditionsEOImpl fcEO = (QrmFilterConditionsEOImpl)iterator.next();
// only check rows in valid state
if ( fcEO.getEntityState() != STATUS_DELETED && fcEO.getEntityState() != STATUS_DEAD )
flag = "OK";
if (flag.equals("no"))
registerRowException(
new OARowValException (
getEntityDef().getFullName(),
getPrimaryKey(), //Row primary key
"QRM", //Message Application Short Code
"QRM_NO_CONDITIONS_ERR")); //Message Code
}
Maybe you are looking for
-
MacBook Pro won't turn on after crash. Charging LED blinking rapidly
Hi. I hope you can help me. I have a macbook Pro 13", from september 2012, which crashed earlier today: I was charging my iphone through USBport on my macbook (not an Apple USB-iPhone power-cable) . My MacBook was charging through the magsafe charger
-
Wait - interrupt Why Exception not thrown?
Hello. I expected that calling interrupt() on a waiting thread should result in InterruptedException thrown by wait(). Nevertheless, in the code below no Exception is thown as if there were no interrupt() call. Actually this snippet prints the same o
-
Programmatically generate password for pdf with data from database
Good day everyone, I would like to know is it possible to programmatically generate passwords for pdf?? The main idea is to enable an automated process of pdf acquiring individualised password from a database (Excel, Access, you name it) and finall
-
In Excel it was very easy to give a cell a name like 'Listprice' or 'Rate' (by typing it in above left in the sheet while having the cell selected). I've looked in the help, but can't find a way to do this in Numbers. I only find things about giving
-
Oracle BI Interactive Dashboards not working even OC4J is running
Hi, Just now I have installed OBI EE in my machine ( Standalone system). I have started the oc4j and it says "Initialized", when I try to open the Link for "Oracle BI Interactive Dashboards", its not opening. Regards, Ashoka BL