Settinc control hints values in entity object attributes generically

Hi, how are you? I work for a project , that uses JDeveloper 10.1.3.3 version and I am assigned to solve some problems in the part that is associated with ADF Business Components—Model—of the application. The question is how could I implement generic functionality in CustomEntityImpl and there I am to assign some control hint values to some attributes and then the entities that will extend this class will acquire this functionality in their attributes.
I send you some code I have in my mind in order to find out how to write something relevant to set control hints. I have searched in relevant api’s for AttributeHints and EntityDef but I did not find a solution to my problem. I’ve tried this code:
private final String desc = "Description";
protected boolean findAttribute(String name) {
String[] list = this.getAttributeNames();
for (int i = 0; i < list.length; i++) {                       
if (name.equals(list))
return true;
return false;
public void beforeCommit(TransactionEvent transactionEvent) {             
if (findAttribute(desc)){                                                                   
* AttributeDefImpl adi=null;
adi.setProperty(AttributeHints.ATTRIBUTE_DISPLAY_HINT_HIDE,"Hide");
AttributeDef desc=(AttributeDef)adi.getProperty(AttributeHints.ATTRIBUTE_DISPLAY_HINT_HIDE);
super.beforeCommit(transactionEvent);
but it does not work. How could I set this value – to hide one attribute whenever it exists in my entities , setting it once in my CustomEntityImpl class?
I’ve read the whole tutorial ADF Business Components For Forms 4GL Developers but I did not find a solution to my problem. Your help would be a gift to me. Thank you very much!
* I think that the error is here because this object can not be null. In an api I found the following :
Advanced users can provide their own implementation of EntityDefImpl (by subclassing EntityDefImpl). Within it, they can create their own AttributeDefImpls by using: new AttributeDefImpl(...);
How should I subclass EntityDefImpl to create an AttributeDefImpl object?

Hi
why don't you create a mehod on the ApplicationModule and call it from the managed bean (using ADF bindings) to pass ths values in ? Note that a managed bean that has a scope of session doesn't mean that it sits in the session to be shared with ADF BC
Frank

Similar Messages

  • Problem while setting new value to entity object attribute in doDML meathod

    Hi all,
    I am overriding the entity objects doDML method for generating the value of Sequence Number just before insert .
    For this puropose i am using doDML method. I am fetching the maximum value for the sequence number feild from the table by a prepared statement
    and then incrementing that value by one.
        protected void doDML(int operation, TransactionEvent e) {
            if (operation == DML_INSERT) {
                // code for getting the max+1 of sequence number before insert
                //command executes.
                try {
                    System.out.println("Inside doDML Method");
                    String sql =
                        "select nvl(max(seq_no),0)+1  from WF_LEAVE_HDR where org_unit_code = " +
                        this.getOrgUnitCode();
                    PreparedStatement pstmt =
                        getDBTransaction().createPreparedStatement(sql, 0);
                    ResultSet rs = pstmt.executeQuery();
                    rs.next();
                    Integer newSeqNo =rs.getInt(1); //(Number)rs.getString(0);
                    //this.setSeqNo(new Number(newSeqNo));
                    setAttributeInternal("SeqNo",new Number(newSeqNo));
                    System.out.println("Value of new seq no is -->>"+getSeqNo());
                } catch (Exception excpt) {
                    System.out.println("Inside catch block ");
                    excpt.printStackTrace();
            super.doDML(operation, e);
        }i am getting the value correct by using the sql statement but while i am using setAttributeInternal("SeqNo",new Number(newSeqNo));
    it is giving an error and value for new sequence no is not passed to the seq no feild of the entity object. I have tried this.setSeqNo(new Number(newSeqNo))
    but it is also not wotrking .
    Any one please help , I am using Jdeveloper 10.1.3
    Thanks all in advance.

    iloveoracle,
    Sigh... in addition to doing this in doDML (which Dimitar points out is the wrong place to do this)... you are making a huge huge mistake.
    select nvl(max(seq_no),0)+1  from WF_LEAVE_HDRWhat happens when two people do this at around the same time? You don't do any locking, so you will get two rows with the same SeqNo. This is absolutely the wrong way of doing sequence numbers. The best way of doing this would be to use real sequence numbers (an Oracle sequence) and ignore the fact that there will be gaps. If you insist on using your approach, you MUST LOCK THE ENTIRE TABLE before you try to do your little max() + 1 trick, otherwise you run the very real risk of getting duplicate SeqNos. OK, I see that you are trying to do sequences by org_unit_code, so you don't have to lock the whole table, but you do have to have some way of holding a lock. You must also write some code to be able to handle an "unable to get the lock because someone else already holds it" type of situation.
    <rant>
    I have seen so many people try to do this little max() + 1 trick. It DOES NOT, WILL NOT work until you handle locking properly. One question that I often ask when I interview database developers is about generating "gapless" sequences; unless the job is for a brand-new-with-absolutely-no-experience trainee, answering "select max() + 1" without any mention of concurrency issues would be grounds for an immediate rejection of the candidate. Seriously. Have a run over to http://asktom.oracle.com and search for "gapless" if you'd like to see a more strongly worded rant.
    </rant>
    Bottom line, just use an Oracle sequence if it's at all possible; otherwise, be prepared to write some bunches of code to deal with locking.
    John

  • Trying to set control hints in entity object attributes in generic classes

    Hi, how are you? I work for a project , that uses JDeveloper 10.1.3.3 version and I am assigned to solve some problems in the part that is associated with ADF Business Components—Model—of the application. The question is how could I implement generic functionality in CustomEntityImpl and there I am to assign some control hint values to some attributes and then the entities that will extend this class will acquire this functionality in their attributes.
    I send you some code I have in my mind in order to find out how to write something relevant to set control hints. I have searched in relevant api’s for AttributeHints and EntityDef but I did not find a solution to my problem. I’ve tried this code:
    AttributeHints ah=new AttributeHints(new AttributeDef(RIBUTE_DISPLAY_HINT_HIDE ) );
    but it does not work. How could I set this value – to hide one attribute whenever it exists in my entities , setting it once in my CustomEntityImpl class?
    I’ve read the whole tutorial ADF Business Components For Forms 4GL Developers but I did not find a solution to my problem. Your help would be a gift to me. Thank you very much!
    private String primary_key = "Id";
    private final String dte_insert = "Dteinsert";
    private final String dte_update = "Dteupdate";
    private final String user_insert = "Usrinsert";
    private final String user_update = "Usrupdate";
    private final String afm = "Afm";
    protected boolean findAttribute(String name) {
    String[] list = this.getAttributeNames();
    for (int i = 0; i < list.length; i++) {                       
    if (name.equals(list))
    return true;
    return false;
    protected void doDML(int operation, TransactionEvent transactionEvent) {
    //Insert Operation
    if (operation == DML_INSERT) {
    //Add history column
    if (findAttribute(dte_insert)) {
    Date date = new Date((new Date()).getCurrentDate());
    this.setAttribute(dte_insert, date);
    //Update Operation
    else if (operation == DML_UPDATE) {
    //Add history column
    if (findAttribute(dte_update)) {
    Date date = new Date((new Date()).getCurrentDate());
    this.setAttribute(dte_update, date);
    //Delete Operation
    else if (operation == DML_DELETE) {
    //To DO
    super.doDML(operation, transactionEvent);

    I Suggest you set its Attribute on EOImpl, override doDML, and before call super.doDML set your Attribute. There is a special reason to set Attribute on beforeCommit?
    Best Regards

  • Default value in Entity Object for SYSDATE   ??

    hi ,
    I have a database table which has a DATE column and default value for this column is SYSDATE.
    I want to set default value for this attribute in my EO as I am doing for all other attributes .
    What will be the value of Default Property of entity Object for SYSDATE ??
    Thanx,
    Prasoon

    Hi,
    I succesfully implemented a default systimestamp value.
    I suppose that the same implies for a default sysdate.
    In the DB:
    t_created TIMESTAMP default systimestamp NOT NULL
    In the Entity Object:
    Attribute: TCreated
    Type: Timestamp => in your case Date
    Persistent: yes
    Updateable: never
    Refresh: after insert
    Database column: T_CREATED type TIMESTAMP => in your case DATE
    You could have problems if you leave access to the attribute (updateable flag != never), in this case I suppose the framework adds the Field in the sql insert statement and that would overwrite the default value definition.
    Regards
    Fred
    PS I'm not from Oracle

  • Setting dynamic values to entity object

    Is there any way to set bean values (dynamic values) to Entity Object while commit the record, and how can i set these values using Groovy language
    Thanks in advance

    You need to give more information about the version of Jdev you use and your use case. read more -
    https://forums.oracle.com/forums/ann.jspa?annID=56

  • Entity object attribute with a list of objects

    Does anyone know how one sets up an entity object that has an attribute with a list of objects as the type? (assuming that's supported)
    as in:
    CREATE TYPE phones AS VARRAY(10) OF varchar2(10);
    Create table suppliers (supcode number(5),
    Company varchar2(20),
    ph phones);
    The SOA Suite in jDeveloper (new Entity Object/attributes etc) has an ARRAY that can point to REF or OBJECT. Neither work. When I try to Create DB Object later from the Entity Object I've created I get an invalid type.

    What you suggested about "validation codes on the VO" is not written on the ADF Documentation.
    I try to blindly/strictly follow best practices (particularly on Validations, using Declartive and/or built in validators) on most ADF documentation and blogs but there are many scenarios on coding some large ADF projects that I think must veer away from the best practices stated on the documentation or maybe add new rules on the documentation depending on how complex an ADF project would be.
    I religiously followed best practices stated on the documentation to use Entity and Attribute Validators when performing validations. What I did was i had created lots of Custom Validators (by implementing JboVAlidatorInterface interface) for each of the attributes on an Entity Object that need validated. So those validator is valid only for one attribute, its not reusable. And those validation codes either have reference to a ViewObject or call some PL/SQL procedure. So at some point are codes became messy.
    Ultimately the whole project became harder to manage when the codes became large. Now I am trying to refactor the whole application by separating it into project/package and I am hoping to do it with little Re-coding as possible.
    Hope to get your opinion on this one.
    regards,
    Anton

  • Problem to give default value in entity object using query

    hi,
    i have one entity object and i want to set default value of attribute like division which is based on employee code.
    entity object based on table leavedetail and using refrence table employee_hdr(empcode ,division).
    so how can i set default value of division attribute which is based on empcode attribute using SQL

    well,
    yes user, fetish nailed correctly.
    make some viewlink.
    something like says as example.
    department vo
    employee vo
    make viewlinks between those vo's
    important thing: exposed then source and destination accesor.
    use groovy :
    go to employee vo - create Department name field ( as transiest)
    use this statement default value expersion type.
    DepartmentView1.DepartmentName
    it will get the value. check over.
    so this example well suits to your scenario.
    i hope this will helps you.
    well create is an video. to get the value using groovy.
    http://www.youtube.com/watch?v=mpHV4x89a_A
    Edited by: ADF7 on Apr 14, 2012 5:46 AM

  • Control Hints, various languages????? 9.0.3

    Hi,
    how can i set the control hints for an attribute for various languages. in jdev 9.0.2 it was very easy but in jdev 9.0.3 pre??????
    Pleas help
    Thanks
    Achim

    Here's what I tried.
    Created a default JClient app over BC4J (Dept/Emp tables).
    Added control hints for Dept Entity attribute DName.
    Created a new class DeptImplMsgBundle_en_GB that extends DeptImplMsgBundle and lives in the same package (mypackage1.common)
    In the generated JClient example, I modified the "main()" method to perform Locale.setLocale(Locale.UK) in the first line in the main.
    And then when the JClient app is run it does pickup proper locale text for the control hints (from the UK msg bundle).
    Also I tried app.setLocale(Locale.UK) instead of Locale.setLocale() - where app is the JUApplication object returned from createApplicationObject method call in the main () and that worked too - The label/tooltip for Dname did show properly.
    To get data/connection setup in proper locale you may want to set the jbo.default.country and jbo.default.language properties in the application module configuration.

  • Internationalization ADF BC Control Hints Label

    Hi guys,
    In Control Hints Label of the ViewObject's Attribute, I declared a label. It's defined in ModelBundle.properties file. Then I created an localized version of the ModelBundle.properties file whose name is ModelBundle_tr.properties.
    On the JSPX page I included two ImageLink components, a CommandButton component and a InputText component. The source for the Links, the Button and the InputText are:
    &lt;af:commandButton text="#{res.LOGIN}"/&gt;
    bq. &lt;af:spacer width="10" height="10"/&gt;
    &lt;af:commandImageLink icon="/images/tr.png" actionListener="#{UserPreferences.localeChangeListener}" immediate="true"&gt;
    bq. &lt;af:setPropertyListener from="tr" type="action" to="#{UserPreferences.language}"/&gt;
    &lt;/af:commandImageLink&gt;
    &lt;af:spacer width="10" height="10"/&gt;
    &lt;af:commandImageLink icon="/images/us.png" actionListener="#{UserPreferences.localeChangeListener}" immediate="true"&gt;
    bq. &lt;af:setPropertyListener from="en" type="action" to="#{UserPreferences.language}"/&gt;
    &lt;/af:commandImageLink&gt;
    &lt;af:inputText value="#{bindings.FirstName.inputValue}"
    label="#{bindings.FirstName.hints.label}"
    required="#{bindings.FirstName.hints.mandatory}"
    columns="#{bindings.FirstName.hints.displayWidth}"
    maximumLength="#{bindings.FirstName.hints.precision}"
    shortDesc="#{bindings.FirstName.hints.tooltip}"&gt;
    &lt;f:validator binding="#{bindings.FirstName.validator}"/&gt; &lt;/af:inputText&gt;
    Within the UserPreferencesBean.java
    public class UserPreferences {
    private String language;
    public UserPreferences() {
    public void setLanguage(String language) {
    this.language = language;
    public String getLanguage() {
    return language;
    public void localeChangeListener(ActionEvent actionEvent) {
    FacesContext.getCurrentInstance().getViewRoot().setLocale(new Locale(getLanguage()));
    When I click on any of the ImageLink, the page is refreshes and the Text of the CommandButton changes. However the label of the InputText is not changes. What is strange is that when I click the same image link the label changes. That is, I should click twice the ImageLink to be able to have correct control hint label for the view object's attribute. The code in the localeChangeListener method is not enough to have the control hint of the view object to refreshed??

    Hi ,
    maybe you have the same problem as me.
    11G  bug, a Label on an ADF Datacontrol and Locale, adfbundle
    thanks edwin

  • Entity object track changes "Modified by"

    Hi Experts,
    I have a question about entity object track changes. I change enabled one entity object attribute to track change "Modified by".
    However whenever the DB changes occurs then the Modified column is updated, however the name is the database connection user name. How can i override that value during the record update. Do i need to set any DbTransaction.session environment variable to save that in the db/
    - t

    Sorry for the late reply,
    I tried this but no luck. Can anyone let me know how to change the entity history columns values like modified by user name. etc....
    - t

  • Implementing History types on query based view object attributes

    Hi All,
    I have to implement the history types
    created on,
    created by,
    modified on,
    modified by
    in my application, but I have all the Query based view objects in my work space, but according to my research History types can only be implemented on the Entity Objects attributes. So how can I do this for my application ? Any Solution ? Any alternative  please ?
    (NOTE: I have all the entity objects available in my common Model work space ).

    @TimoHahn, I have the following master view object query, which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?
    SELECT  NVL(A.STYP,0) STYP,A.DAT,C.BATNO,C.ITST, B.DEMNO,B.ITEM,LTRIM(RTRIM(D.ITEMNAME))ITEM_NAME,0 TRINQ,D.UOM ABRV,P.DAT DDAT,
        A.CSNO,PARTY,NVL(CSRAT,0)+(NVL(CSRAT,0)*NVL(B.GST,0))/100 GSTCSRAT,CSRAT,
        A.PDAYS DAYS, DECODE(C.CSTERM,1,'CASH',2,'CREDIT',3,'DD',4,'PAY ORDER',5,'ADVANCE%',6,'CHEQUE') ,B.GST,E.MASTDS PNAME,NVL(SUM(B.RQTY),0)DRQTY,DEPT.SEC_NAME DEPTDS,SUM(STOK.QTY) BAL,P.TRNO,C.EBY, C.SYSIP, C.TDAT
                  FROM ACCSTORE.STAC_CSM A, ACCSTORE.STAC_CSD B,ACCSTORE.ST_STAC_DEM_APRVD C,ACCSTORE.VITEMS D, ACC_MAST E,ACCSTORE.PRE_DEMANDM P,ACCSTORE.VSECTIONS DEPT,
                  (SELECT STYP,ITEMID,SUM(BALANCE) QTY FROM ACCSTORE.VITEMSTOCK GROUP BY STYP,ITEMID) STOK
                  WHERE A.CSNO=B.CSNO AND B.CSNO=C.CSNO AND B.DEMNO=C.DEMNO AND B.ITEM=C.ITEM AND B.STYP=C.STYP  AND C.PDEMNO=P.TRNO(+) AND P.DEPT=DIVNO AND P.SEC_NO=DEPT.SECNO(+)
                              AND C.STYP=STOK.STYP AND C.ITEM=STOK.ITEMID
                    AND C.STYP=D.STYP AND C.ITEM=D.ITEMID AND C.PARTY=E.MASTCD  AND B.APP=1 AND NVL(C.PONO,0)=0 
                    AND C.ITST=DECODE(C.STYP,0,11,14)
                    GROUP BY NVL(A.STYP,0),A.DAT,C.BATNO,C.ITST,B.DEMNO,B.ITEM,D.ITEMNAME,A.CSNO,PARTY,P.DAT,DEPT.SEC_NAME,P.TRNO,C.EBY, C.SYSIP, C.TDAT,
                    CSRAT,A.PDAYS,C.CSTERM,B.GST,E.MASTDS,D.UOM ORDER BY A.CSNO,D.ITEMNAME
    ORDER BY "DAT" DESC
    which i can not generate by using the Entity objects, Basically I am transforming an oracle form base ERP into Oracle ADF application, so I have available all the quries , Please let me know if i can have any alternative solution ?

  • Validating input values in Entity

    Hi,
    Is there any drawbacks while validating Input values in Entity object ?

    As your business logic remains in the model layer there is always some kind of entity level validation (at least the DB constrains are checked by the DB). There are other validations which don't touch EO at all. One is e.g. input parameters for ViewCriteria which may need to meet some conditions. As there is no EO involved you have to either make the check in the VO before executing the view criteria or you do it on the UI (if you can).
    Some simple checks are always done in the UI (e.r. required).
    So in summary you have to do validation on all levels, it just depends what you want to check. As a rule of thumb all validation which are part of the business logic should be define there (e.g. EO). ADF allows you to simply define such validation which are then enforced on the data.
    Timo

  • Entity object control hints not propagating to ui component

    hi there,
    i have had no problem with entity object label control hints propagating to ui components... but it would appear that if i add the labe lcontrol hint after the view and ui component are in place then the control hint is not proagating to the ui component.
    is there a setting that i am missing? certainly, its not necessary to rebuild the views and ui components that are based on the entity object?
    thanks in advance.

    There shouldn't be a problem changing the label in the EO definition after you created the UI, as long as your UI's label points to the correct binding.
    What's the value of your UI label field?

  • Passing SQL Server identity attributes values into adf entity objects

    Hi all.
    I'm using Jdeveloper 10g for developing an ADF Swing application based on MS SQL Server DB.
    Does anyone know if it is possible to pass SQL Server identity attributes values into the correspondent attrributes of adf entity objects, like we do with Oracle DB Sequence.
    The problem is that i should somhow implement cascade deleting of detail view objects, so i should use the composition association. But since i cant fill the primary key attribute with appropriate value (that is actually a ms sql server db sequence value) i always get
    the following exception: oracle.jbo.InvalidOwnerException: JBO-25030 as i try to create a new pair of master/detail objects.
    Thanks in advance.
    Alex.

    The approach is good. but i still dont understand how i can address the sql server db sequence (identity field) programmatically...
    The code offered
    SequenceImpl sequence = new SequenceImpl("PRODUCTS_SEQ",getDBTransaction());
    setProdId(sequence.getSequenceNumber());
    generates something like this:
    select deq_name.nextval from dual
    but this syntax works for oracle only... and not for sql server...
    Edited by: Timin on Mar 26, 2009 6:34 AM
    Edited by: Timin on Mar 26, 2009 10:25 AM

  • Control hints tab for an attribute of a view object shows null pointer erro

    hi
    I am using j developer 11g. I have a view object and it is working fine and i set control hints for an attribute , i set display label and length etc
    there. now i am taking the view object the control hints tab for the particular tab didnt shows and there displayed follwing error
    how can i rectiify this error.
    java.lang.NullPointerException
         at oracle.jbo.dt.ui.main.misc.ControlHintsPanel.isOverridenProperty(ControlHintsPanel.java:662)
         at oracle.jbo.dt.ui.main.misc.ControlHintsPanel.processUIHintsOnEnter(ControlHintsPanel.java:577)
         at oracle.jbo.dt.ui.main.misc.BaseControlHintsPanel.initializeControlsFromContext(BaseControlHintsPanel.java:187)
         at oracle.jbo.dt.ui.main.misc.BaseControlHintsPanel.enter(BaseControlHintsPanel.java:340)
         at oracle.jbo.ui.wizard.JboWizard.selectPage(JboWizard.java:806)
         at oracle.jbo.ui.wizard.JboWizard.selectPage(JboWizard.java:758)
         at oracle.jbo.ui.wizard.JboWizard.newMddPageSelected(JboWizard.java:827)
         at oracle.jbo.ui.mdd.MddTraversable.onEntry(MddTraversable.java:70)
         at oracle.ide.panels.MDDPanel.enterTraversableImpl(MDDPanel.java:1213)
         at oracle.ide.panels.MDDPanel.enterTraversable(MDDPanel.java:1194)
         at oracle.ide.panels.MDDPanel.mav$enterTraversable(MDDPanel.java:128)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelectedNavigable(MDDPanel.java:1650)
         at oracle.ide.panels.MDDPanel$Tsl.updateSelection(MDDPanel.java:1518)
         at oracle.ide.panels.MDDPanel$Tsl.actionPerformed(MDDPanel.java:1512)
         at javax.swing.Timer.fireActionPerformed(Timer.java:271)
         at javax.swing.Timer$DoPostEvent.run(Timer.java:201)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:177)
         at java.awt.Dialog$1.run(Dialog.java:1045)
         at java.awt.Dialog$3.run(Dialog.java:1097)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.awt.Dialog.show(Dialog.java:1095)
         at java.awt.Component.show(Component.java:1422)
         at java.awt.Component.setVisible(Component.java:1375)
         at java.awt.Window.setVisible(Window.java:806)
         at java.awt.Dialog.setVisible(Dialog.java:985)
         at oracle.jbo.ui.main.JboDialog.setVisible(JboDialog.java:164)
         at oracle.jbo.ui.wizard.JboWizard$MddWizardDialog.setVisible(JboWizard.java:2557)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.bali.ewt.dialog.JEWTDialog.runDialog(Unknown Source)
         at oracle.jbo.ui.main.JboDialog.showDialog(JboDialog.java:142)
         at oracle.jbo.ui.wizard.JboWizard$MddWizardDialog.showDialog(JboWizard.java:2493)
         at oracle.jbo.ui.wizard.JboWizard.createMddWizard(JboWizard.java:549)
         at oracle.jbo.ui.wizard.JboWizard.setVisible(JboWizard.java:352)
         at oracle.jbo.ui.wizard.JboWizard.showDialog(JboWizard.java:330)
         at oracle.jbo.dt.jdevx.ui.JdxMenuManager.invokeEOAttributeDialog(JdxMenuManager.java:1295)
         at oracle.jbo.dt.jdevx.ui.JdxMenuManager.invokeAttributeDialog(JdxMenuManager.java:1277)
         at oracle.jbo.dt.ui.main.DtuMenuManager.doEditMenuAction(DtuMenuManager.java:1776)
         at oracle.jbo.dt.ui.main.DtuMenuManager.performMenuAction(DtuMenuManager.java:1584)
         at oracle.jbo.dt.ui.main.DtuMenuManager.doMenuAction(DtuMenuManager.java:1377)
         at oracle.jbo.dt.jdevx.ui.JdxMenuManager.doMenuAction(JdxMenuManager.java:892)
         at oracle.jbo.dt.jdevx.deployment.ui.JxdMenuManager.doMenuAction(JxdMenuManager.java:66)
         at oracle.jbo.dt.ui.main.DtuMenuManager.doAction(DtuMenuManager.java:1363)
         at oracle.jbo.dt.ui.main.DtuMenuManager.doAction(DtuMenuManager.java:1348)
         at oracle.jbo.dt.jdevx.ui.editors.common.JeoBaseEditor.doMenuAction(JeoBaseEditor.java:327)
         at oracle.jbo.dt.jdevx.ui.editors.common.JeoEditorPage.doMenuAction(JeoEditorPage.java:777)
         at oracle.jbo.dt.jdevx.ui.editors.view.VoeAttributesPage.doMenuAction(VoeAttributesPage.java:366)
         at oracle.jbo.dt.jdevx.ui.editors.common.JeoEditorPage.mouseDoubleClick(JeoEditorPage.java:642)
         at oracle.jbo.dt.jdevx.ui.editors.common.JeoEditorPage.mouseClicked(JeoEditorPage.java:623)
         at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:253)
         at java.awt.Component.processMouseEvent(Component.java:6044)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
         at java.awt.Component.processEvent(Component.java:5806)
         at java.awt.Container.processEvent(Container.java:2058)
         at java.awt.Component.dispatchEventImpl(Component.java:4413)
         at java.awt.Container.dispatchEventImpl(Container.java:2116)
         at java.awt.Component.dispatchEvent(Component.java:4243)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3995)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
         at java.awt.Container.dispatchEventImpl(Container.java:2102)
         at java.awt.Window.dispatchEventImpl(Window.java:2440)
         at java.awt.Component.dispatchEvent(Component.java:4243)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

    I did try making a VO that extends the original VO, but with the attribute based on the SDO_NN_DISTANCE function call, which means that a call to SDO_NN MUST be in the WHERE clause.
    This works to some extent, in that the common attributes and methods are in the second VO, inherited from the first, without me having to write them again. However, I have to use them in my ViewController project as two separate VOs. For one thing, I need two separate result pages, one for when the query used the SDO_NN in the where, and needed the distance in the output, and one without. One uses the original VO, and the other uses the new one. Similarly, I need two separate pages for adding additional criteria. Doing it this way with pairs of nearly identical pages is going to be a pain, and will be difficult to maintain, since any change will have to be done twice. Or can .jspx pages be written that extend other .jspx pages, and in particular override the VO bindings in the pageDef? Could a single .jspx page decide dynamically which pageDef to use?
    I decided to try a different tack. Back to a single VO, I wrote a WHERE clause that calls SDO_NN, but returns all of the rows. That way, I can have a call to SDO_NN_DISTANCE in the SELECT for all queries, and I was even able to add a parameter that sets the Distance attribute to NULL if it is irrelevant to the query the user constructs. This is a good work around, but it is a little slow, because SDO_NN is doing a lot of work but returning every row when it hasn't been replaced with an "actual" SDO_NN where clause.
    One more possibility: Can I have a method that replaces the entire SELECT command for this VO dynamically? I assume that you need to make sure that the expressions in the SELECTed data still map to the attributes one to one, with the same aliases. After all, I am already replacing the WHERE clause dynamically, and it works fine.

Maybe you are looking for