Domain Portal

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 12 July 2008

Customizing Applications with MDS - Practical Overview

Posted on 02:21 by Unknown
During ODTUG Kaleidoscope 2008, I was discussing with Shaun O'Brien (Principal Product Manager from Oracle Development Tools group) about new functionality offered in JDeveloper 11g - development of customizable applications with MDS. This functionality is very critical for us - consultants, because its very common requirement when there is a need to have the same application but with smaller or bigger differences for different clients. In this blog post, I will not describe how to enable MDS functionality in your application, because you can find all needed information for this topic on OTN, read this Cue Card - Customize and Personalize an Application. What I will show in this blog, is how you can apply MDS in your project from first day - develop customized validation rules.

My blog post is based on sample application I have created - MDSValidation.zip. MDS functionality is enabled based on the steps provided in Cue Card I have mentioned. In order to run this application in your environment, you will need to deploy a customization class - right click on Model project, and select Deploy -> to JAR file. After JAR file will be created, ensure it is available in JDEVELOPER_HOME\jdev\lib\patches\ directory.

Developed application don't use any customizations in ViewController layer, only in Model. When I was developing it, at first I have generated ADF BC, have created ADF Task Flow and implemented JSPX page - nothing new, just common steps. When application was done, I decided to add 2 profiles - headquarters and remoteoffices. With headquarters profile active, validation rule is applied for Salary attribute in Employees entity. With remoteoffices profile active, no validation rules are applied. So, first things I did - I have deployed and registered customization class - SiteCC. Also have created customization.properties file, where active profile for my application is set:


After those 2 things were done, I have switched my JDeveloper 11g TP4 to Customization Developer role, in order to apply specific validation rule for headquarters profile:


JDeveloper 11g have restarted in order to apply required settings and I got Customizations Property tab available:


With headquarters role selected, I have opened Employees entity object wizard and defined specific validation rule on Entity level in order to compare Salary value with Minimal and Maximal salary values allowed for specific Job assigned for Employee:


When this rule was defined, metadata file related to headquarters role was created by JDeveloper. This metadata file contains customizations applied for selected role:


Ok, validation rule specific for selected role is defined, now we can switch back JDeveloper 11g to Default Role mode:


When JDeveloper 11g restarts in Default Mode, you can open Employees entity object wizard again, and check Validators section - no Validation rules. Its because, we have defined validation rule only for headquarters role and customizations are applied not only on runtime, but in development mode also:


When application will be deployed in production, its enough to set profile information in customization file:


And since there are no validation rules defined for remoteoffices profile, there is no validation applied for Salary attribute:


But, if second deployment will have different setting in customization file:


Validation rule defined for headquarters will be applied:


Looks like MDS is really very powerful feature in new JDeveloper release - JDeveloper 11g.
Email ThisBlogThis!Share to XShare to Facebook
Posted in ADF, JDeveloper 11g | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • Groovy - Multiple LOV's per Attribute in JDeveloper 11g
    I was blogging previously about multiple LOV's per attribute functionality. I was using RowImpl class for View object in order to calcu...
  • External Transaction Service in Oracle TopLink
    I have developed sample application, in order to demonstrate how to use External Transaction Service (ETS), when Oracle TopLink is used in M...
  • Workaround for Null Value Bug in ADF List Of Values 11g
    Those of you, who are using List Of Values (LOV) component in ADF 11g, most probably already have noticed bug related to Null value. Simple ...
  • Trip to US
    I'm in US this week, Connecticut. Here is the same weather as in Lithuania, it's winter with about -5 degrees in Celsius.
  • Oracle ADF - between 4GL and J2EE is only one step
    According to ADF architecture described in Oracle JDeveloper 10g (10.1.3) Developer's Guide Section 1.1.1 - Framework Architecture and S...
  • Creating new row using CreateInsert operation
    Sample application - CreateInsert.zip , demonstrates how to create editable table with 'create new row' functionality in ADF BC. We ...
  • Show Buttons based on Disclosed Tab
    In 11g it becomes quite common use case to structure application page with tabbed panels. If you develop your pages based on templates, most...
  • Multilanguage in fixed af:selectOneChoice ADF Faces component
    If someone will face a problem how to enable multilanguage support in fixed af:selectOneChoice component, or simply how to bind fixed af:sel...
  • JDeveloper 11g on Mac OS X Leopard
    I'm using Apple Mac Book Pro for about half of a year, but shame for me all this time I was running Windows OS using Apple Boot Camp so...
  • Why I'm here?
    Oracle for me is more then technology, it is a way how I think. So, I'm creating this blog in order to express my knowledge in Oracle Fu...

Categories

  • ADF
  • Apex
  • Apple
  • BPEL
  • Events
  • Forms
  • Groovy
  • JDeveloper 11g
  • Nomination
  • ODTUG Kaleidoscope
  • OFUG
  • Oracle Magazine
  • Oracle OpenWorld
  • Security
  • SOA
  • Spatial
  • TopLink
  • Traveling
  • Uncategorized
  • Vgo Software
  • Web Services
  • WebCenter
  • WebLogic
  • Workarounds

Blog Archive

  • ▼  2008 (72)
    • ►  December (2)
    • ►  November (3)
    • ►  October (9)
    • ►  September (4)
    • ►  August (9)
    • ▼  July (6)
      • UKOUG 2008 Conference
      • BGOUG Autumn' 2008 Conference
      • ODTUG 2008 Gallery from Frans Thamura
      • Import Functionality in Oracle ADF BC
      • Customizing Applications with MDS - Practical Over...
      • Declarative Security in JDeveloper/ADF 11g
    • ►  June (10)
    • ►  May (4)
    • ►  April (5)
    • ►  March (7)
    • ►  February (5)
    • ►  January (8)
  • ►  2007 (65)
    • ►  December (6)
    • ►  November (7)
    • ►  October (6)
    • ►  September (4)
    • ►  August (3)
    • ►  July (4)
    • ►  June (6)
    • ►  May (5)
    • ►  April (6)
    • ►  March (4)
    • ►  February (5)
    • ►  January (9)
  • ►  2006 (9)
    • ►  December (9)
Powered by Blogger.

About Me

Unknown
View my complete profile