Dive into Oracle ADF

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:15:44 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

Search blog with Google:
 

Search BC4J JavaDoc:
 

January 2005
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Dec   Feb

Get Firefox!

Tuesday, January 11, 2005

Andrej Koelewijn posed an interesting question over on the JDeveloper OTN Discussion forum about how to allow a client to supply an XML message for processing by ViewObject.readXML() that does not contain the primary key attribute, which is typically required. His scenario is that the primary key is a sequence-derived value, while the client thinks of the key as some other more human-understandable unique attribute. I posted a reply in the forum to explain what I ended up finding as the simplest workable solution to the problem involving preprocessing the incoming XML message to insert the missing sequence-derived key attribute values after using a read-only view object to do the quick lookup.
1:08:47 PM    



I've just asked for this to be added to the JDeveloper 10.1.2 Release Notes Addendum, but just in case it helps someone else out there I'm posting it here. A few users on OTN have already run into the issue and have been able to avoid it with the advice given here...

Data Actions Extending DataForwardAction Change to Data Pages Incorrectly (Bug 4113412)

When you customize the basic ADF Data Action, their custom action class should directly or inditectly extend the DataAction class in the oracle.adf.controller.struts.actions package. On the other hand, when you customize an action for an ADF Data Page it should directly or indirectly extend the DataForwardAction class in that same package. Additionally for data pages, JDeveloper associates the action to its related page by recording the name of the page in the value of the parameter attribute of the Struts action in your struts-config.xml file. In contrast, plain data actions which are not data pages do not have a parameter attribute recorded.

In 9.0.5.2 and 10.1.2 it is possible for users to accidentally create a custom data action class which incorrectly extends the DataForwardAction class instead of the correct DataAction class. This was harmless in 9.0.5.2, but in 10.1.2 a data action whose custom action class extends DataForwardAction instead of just DataAction has an undesireable side-effect when the Struts page flow diagram is opened the first time in each JDeveloper session. JDeveloper 10.1.2 notices that the action extends DataForwardAction and assumes that you meant it to be a data page. It then notices this presumed data page is missing its required parameter attribute, so JDeveloper 10.1.2 adds a parameter="unknown" attribute for it. This can have the unwanted side effect of making your data action nodes in the diagram turn into data page nodes.

The way to avoid the problem is to insure that your custom data action classes that are not intended to be data pages:

  • Extend DataAction instead of DataForwardAction
  • Do not have a parameter attribute in their corresponding struts-config.xml <action> element entry

12:55:02 PM    


Having recently returned from a vacation in Costa Rica (where my sister got married over the holidays), it seems that much more apropos that I got an email today announcing a new JDeveloper Latin America blog. ¡Bienvenidos!


2:44:15 AM    


© Copyright 2008 Steve Muench.