To begin with we will do some Q & A. This will be followed by some scenarios, and I will then end this training session with an Audio-Visual demo of SPEL.
IMPORTANT:- Please do not jump onto the SPEL Audio-Visual until you have read this article.
Why will I ever use SPEL in OA Framework?
Lets say you wish to hide a field Purchase order buyer using personalization. In order to hide that field, you can simply set the Rendered property of that field to FALSE using personalization. However, what if your requirement is to hide or display this field conditionally? Lets say that you wish to display a Field Named Buyer if and only if the purchase order amount is greater than 4000. This can be achieved using Framework personalization and SPEL.
What is SPEL?
It is an expression that will either return TRUE or FALSE.
If Rendered property of a field in OA Framework is attached to SPEL, then
Field will be displayed if SPEL equates to TRUE
Field will not be displayed if SPEL equates to FALSE.
Properties that can be modified at run time using personalizations ( via spel) are :-
Rendered - To conditionally make a field in OA Framework hidden/displayed
Read Only - To conditionally make a enterable or non-enterable
Required - To make a field mandatory or non-mandatory
Enabled - To conditionally enable or disable that field
Any other properties that can be modified using SPEL?
At the moment OA Framework allows only those set of properties to be alterable via SPEL.
What is the syntax of SPEL?
I think it is better to give examples, rather than provide syntax.
Whatever the syntax is, it must always return a BOOLEAN.
For example:-
${oa.FunctionSecurity.IRC_VIS_HOME_SALES_JOBS}
The above expression returns true if user is currently accessing OAF screen from function named IRC_VIS_HOME_SALES_JOBS
${oa.ViewObjectName.IsPOGreaterThan4000}
Above expression means that, if value of attribute named IsPOGreaterThan4000 is FALSE then, the field will either be disabled or hidden or non-mandatory, depending upon which property this SPEL is attached to.
What if my requirement is to display a field named Buyer Name, if purchase order amount is greater than 4000? Can SPEL be used in this case?
Yes, if there already exists a view object attribute of type BOOLEAN. That view object attribute should have a value of TRUE if purchase order amount is greater than 4000, or else that attribute must have value FALSE.
What if i the VO in question does not already have one such attribute?
You have three options here:-
Option 1. Extend the View Object and add a transient attribute of type Boolean. In the View Object Row Implementation class, inside IsMoreThan4000 return TRUE or FALSE, depending upon the value of the PO Amount field
Option 2. Extend the controller, checking the value of the amount, via VO.
If the amount is greater than 4000, then set the bean rendered property of buyer name field appropriately.
Option 3. Use java script. Oracle does not recommend this, but yet many implementations use this, primarily because web programmers are usually big fans of java scripting. You can either embed a java script by extending the controller or by simply using add new item using personalization, whereby the new item is of style RAWTEXT with javascript embedded within.
In this training lesson, we will use equivalent of Option 1
CLICK HERE FOR THE AUDIO VISUAL DEMO OF SPEL IN OA FRAMEWORK
Comments
(23)
...
written by Anil Passi , May 04, 2007
written by Anil Passi , May 04, 2007
Hi Mayanak
Please create two different Form Functions for the SIT Form.
Then do personalization at Function Level.
Personalization on First Function will use SPEL ${oa.FunctionSecurity.FUNCTION_IT_NAME} for 5 segments
Personalization on Second Function will use SPEL ${oa.FunctionSecurity.FUNCTION_FINANCE_NAME} for other 5 segments
Thanks,
Anil
Votes: -1
Please create two different Form Functions for the SIT Form.
Then do personalization at Function Level.
Personalization on First Function will use SPEL ${oa.FunctionSecurity.FUNCTION_IT_NAME} for 5 segments
Personalization on Second Function will use SPEL ${oa.FunctionSecurity.FUNCTION_FINANCE_NAME} for other 5 segments
Thanks,
Anil
report abuse
vote down
vote up
...
written by Mayank , May 04, 2007
written by Mayank , May 04, 2007
Comment: Hi Anil Again...a very good demo and explanation. Need your help in resolving a query. My requirement is : I create an SIT in HRMS and give access to that SIT to different employees in separate depts (IT & Finance)using SSHR. Now suppose that SIT has 10 segments, then an IT guy should be able to to fill in only the first 5 segements of that SIT, the rest 5 should appear to him but in a read only mode. Once the IT guy fills the SIT and submits, a workflow notification would go to the finance guy. The same SIT would be filled by the Finance guy as well, but now he will only be able to fill the last 5 segments and the first 5 sgements filled by the IT guy should only appear to him in a read only mode. Let me know if this is possible using SPEL in OA framework. Thanks again for your help! Regards, Mayank
Votes: -1
report abuse
vote down
vote up
...
written by Mayank , May 07, 2007
written by Mayank , May 07, 2007
Hi Anil
Thanks a lot for your response. Sorry for asking a dumb question, but can this be done through front end ro will it needs to be handled by modifying the query as shown in your demo.
Thanks again for your help!
Mayank
Votes: +0
Thanks a lot for your response. Sorry for asking a dumb question, but can this be done through front end ro will it needs to be handled by modifying the query as shown in your demo.
Thanks again for your help!
Mayank
report abuse
vote down
vote up
...
written by Anil Passi , May 09, 2007
written by Anil Passi , May 09, 2007
Hi Mayank
No genuine question is a dumb question.
In answer to your query, for SPEL based on Function Security, you do not need to extend BC4J. This can achieve this purely using personalizations.
Thanks,
Anil
Votes: +0
No genuine question is a dumb question.
In answer to your query, for SPEL based on Function Security, you do not need to extend BC4J. This can achieve this purely using personalizations.
Thanks,
Anil
report abuse
vote down
vote up
...
written by Anil Passi , June 06, 2007
written by Anil Passi , June 06, 2007
Kindly have a look at below links where you will find the answer to your questions.
jDev can generate the stubs based on WSDL URL.
You can do the same with Netbeans or with Eclipse too.
http://oracle.anilpassi.com/integrate-oa-framework-with-web-service.html
http://oracle.anilpassi.com/oa-framework-with-captcha-webservice.html
Thanks
Anil Passi
Votes: +0
jDev can generate the stubs based on WSDL URL.
You can do the same with Netbeans or with Eclipse too.
http://oracle.anilpassi.com/integrate-oa-framework-with-web-service.html
http://oracle.anilpassi.com/oa-framework-with-captcha-webservice.html
Thanks
Anil Passi
report abuse
vote down
vote up
...
written by Kaustuv Tarai , June 06, 2007
written by Kaustuv Tarai , June 06, 2007
Hi, Anil,There are 2 wsdls and i need to know the details of how to call these 2 wsdls using Java Program.
Kaustuv.
Votes: +1
Kaustuv.
report abuse
vote down
vote up
...
written by SUNDAR , June 25, 2007
written by SUNDAR , June 25, 2007
Hi anil,
We have a manager self service function which displays five segments from the assignment DFF. We would likle to make one of the segment as read only using SPEL. However when we enter the SPEL syntax as ${oa.FunctionSecurity.
Votes: +0
We have a manager self service function which displays five segments from the assignment DFF. We would likle to make one of the segment as read only using SPEL. However when we enter the SPEL syntax as ${oa.FunctionSecurity.
report abuse
vote down
vote up
...
written by Anil Passi , June 25, 2007
written by Anil Passi , June 25, 2007
Hi sundar
You can use function level personalization to achieve this result
thanks
anil
Votes: +0
You can use function level personalization to achieve this result
thanks
anil
report abuse
vote down
vote up
...
written by SUNDAR , June 25, 2007
written by SUNDAR , June 25, 2007
Hi anil,
Can you Explain detail?
Regards
Sundar
Votes: +0
Can you Explain detail?
Regards
Sundar
report abuse
vote down
vote up
...
written by SUNDAR , July 02, 2007
written by SUNDAR , July 02, 2007
Hi anil,
I had asked you how to make one segment as read only on 06/06/2007 at 12:23. I have solved that requirement by putting ($RO$) to that particular segment, using personalization. Now its working. Thanks for your assistance
Regards
Sundar
Votes: +0
I had asked you how to make one segment as read only on 06/06/2007 at 12:23. I have solved that requirement by putting ($RO$) to that particular segment, using personalization. Now its working. Thanks for your assistance
Regards
Sundar
report abuse
vote down
vote up
SPEL Function
written by Sukhjinder , October 12, 2007
written by Sukhjinder , October 12, 2007
Hi
Is there any way we can display one field conditional depends upon null or not null value of another field with in the same region of the page using SPEL. All fileds values are getting generated through a dyanmic view.
Regards
Jinder
Votes: +0
Is there any way we can display one field conditional depends upon null or not null value of another field with in the same region of the page using SPEL. All fileds values are getting generated through a dyanmic view.
Regards
Jinder
report abuse
vote down
vote up
How to make a field mandatory or non-mandatory
written by Sai Kumar , November 28, 2007
written by Sai Kumar , November 28, 2007
Hi Anil,
I have a requirement in iExpenses to make a field mandatory based on the Context (Expense Type).
Can you please let me know how to achieve this requirement through personalization by using the SPEL?
Thanks in advance,
Sai
Votes: +1
I have a requirement in iExpenses to make a field mandatory based on the Context (Expense Type).
Can you please let me know how to achieve this requirement through personalization by using the SPEL?
Thanks in advance,
Sai
report abuse
vote down
vote up
How to handle this?
written by Devanathan , April 03, 2008
written by Devanathan , April 03, 2008
Hi Anil,
This is Devanathan. Hope you are doing good.
I have some questions on this article.
Scenario: Suppose Oracle apps Customer has a page with a table. one of the column in the table shld be enabled/disabled based on some condition. But customer shld do it declaratively and not programatically (shld not open jdeveloper). The condition might be like, if column A values starts with "xyz" , then column B shld be enabled/disabled.
In the above scenario, am trying to use SPEL binding. i think customer shld use ur 3rd option which i have writtern below.
Option 3. Use javascript. Oracle does not recommend this, but yet many implementations use this, primarily because web programmers are usually big fans of java scripting. You can either embed a javascript by extending the controller or by simply using add new item using personalization, whereby the new item is of style RAWTEXT with javascript embedded within.
I have created a new RAWTEXT item as one of the column item. But am not aware of how i shld use javascript in that. is the javascript here checks for column A (in the above scenario)??. Also how could i specify it in column B COZ as per oracle standards it shld use the formats ${oa.. or ${oa.FunctionSecurity. for SPEL.
Thanks in advance. waiting for your reply.
Votes: +0
This is Devanathan. Hope you are doing good.
I have some questions on this article.
Scenario: Suppose Oracle apps Customer has a page with a table. one of the column in the table shld be enabled/disabled based on some condition. But customer shld do it declaratively and not programatically (shld not open jdeveloper). The condition might be like, if column A values starts with "xyz" , then column B shld be enabled/disabled.
In the above scenario, am trying to use SPEL binding. i think customer shld use ur 3rd option which i have writtern below.
Option 3. Use javascript. Oracle does not recommend this, but yet many implementations use this, primarily because web programmers are usually big fans of java scripting. You can either embed a javascript by extending the controller or by simply using add new item using personalization, whereby the new item is of style RAWTEXT with javascript embedded within.
I have created a new RAWTEXT item as one of the column item. But am not aware of how i shld use javascript in that. is the javascript here checks for column A (in the above scenario)??. Also how could i specify it in column B COZ as per oracle standards it shld use the formats ${oa.. or ${oa.FunctionSecurity. for SPEL.
Thanks in advance. waiting for your reply.
report abuse
vote down
vote up
Re:How to handle this?
written by Arun Sista , April 03, 2008
written by Arun Sista , April 03, 2008
Hi Devanathan,
It is perfectly understandable that Oracle does not recommend this method. Consider a scenario where a user hides a particular column that you are scrapping or even if he changes the order your logic would blow up.
What you should look to do instead is.. Make a one time effort to understand the VO for the underlying region. You could look up on about this page link at the bottom of the page by enabling FND Diagnostics profile option. Then go to the Business Component References Details and check out the view object and guess the column name. It should not be very tough to do this.
Once you have the VO and column name it is easy to write the SPEL as mentioned above.
Hope this helps.
Arun.
Votes: -1
It is perfectly understandable that Oracle does not recommend this method. Consider a scenario where a user hides a particular column that you are scrapping or even if he changes the order your logic would blow up.
What you should look to do instead is.. Make a one time effort to understand the VO for the underlying region. You could look up on about this page link at the bottom of the page by enabling FND Diagnostics profile option. Then go to the Business Component References Details and check out the view object and guess the column name. It should not be very tough to do this.
Once you have the VO and column name it is easy to write the SPEL as mentioned above.
Hope this helps.
Arun.
report abuse
vote down
vote up
Employee Self Service - Special Information Types
written by shashi , September 18, 2008
written by shashi , September 18, 2008
Hi Anil,
I have a requirement to make couple of segments in SiT (Special Information Types ) as REad Only. I have gone thru this thread. It says it can be done purely by personalization. Can you please guide me the steps. I have tried personalizing the Special Inforamtion Page but no luck. Please Help me out..
Thanks,
Shashi
Votes: +0
I have a requirement to make couple of segments in SiT (Special Information Types ) as REad Only. I have gone thru this thread. It says it can be done purely by personalization. Can you please guide me the steps. I have tried personalizing the Special Inforamtion Page but no luck. Please Help me out..
Thanks,
Shashi
report abuse
vote down
vote up
...
written by JR , March 10, 2009
written by JR , March 10, 2009
I have a requirement to make the project field required based upon certain account segments, how can I achieve this? Any help is really appreciated.
Thanks
Votes: +0
Thanks
report abuse
vote down
vote up
How to Handle this notification
written by surepalli , January 11, 2010
written by surepalli , January 11, 2010
Hi Anil,
I have a requirement like below.
We need to display new region in PO Requisition Notification page and this change only visible to PO notificationsa not other any notifications.
How Can I handle this scenarion?
Please give me your suggestions.
Regards
Subbu
Votes: +0
I have a requirement like below.
We need to display new region in PO Requisition Notification page and this change only visible to PO notificationsa not other any notifications.
How Can I handle this scenarion?
Please give me your suggestions.
Regards
Subbu
report abuse
vote down
vote up
BI Discovrer
written by Rohit , April 23, 2010
written by Rohit , April 23, 2010
Please can you send me is you have any demo related to BI Discovrer plus how we can use all the feature of this tool
Votes: +0
report abuse
vote down
vote up
Make some DFF as read only
written by arya , December 08, 2010
written by arya , December 08, 2010
Hi Anil,
I have created 5 DFF in Supplier and need to make 3 of the DFF as read only, just like Sundar's questions.
Can you explain detail to do this
Thanks
Votes: +0
I have created 5 DFF in Supplier and need to make 3 of the DFF as read only, just like Sundar's questions.
Can you explain detail to do this
Thanks
report abuse
vote down
vote up
| < Prev | Next > |
|---|





Thanks,
Suneetha