Dynamic Visibility Function in TCA

Hi,
I have a requirement where I need to create couple of buttons using Extensions (Extensible Attributes) in Customers Online (similar to User Defined Attributes in Oracle Adavanced Product Catalog) . The problem I have is I need to make these buttons dynamically visible. Now we can make these buttons dynamically visible only by using User Defined Java Functions (as we can't use User Defined PL/Sql functions here!).
I have found a sample code of this user defined java function from the knowledge base which is very simple and is given below. My problem is how can i make call to database pl/sql packages from within this java function (i.e. how to get the page context in my standalone java class?).
I would really appreciate any help/suggestions on this.
Java Code for user defined java function:
public class XX_PARTY_SITE_Function
public static oracle.apps.ego.common.EgoBoolean getVisible (StringBuffer theInput)
try {
if ("N".equals(theInput.toString())) {
return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
} else {
return (new oracle.apps.ego.common.EgoBoolean( new Boolean("False"))) ;
catch ( NullPointerException e ) {
return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
Thanks,
Kamal

hi
use this example in your code
import java.sql.CallableStatement;
import java.sql.SQLException;
import java.sql.Types;
OADBTransaction txn = getDBTransaction();
CallableStatement cs =
txn.createCallableStatement("begin dbms_application_info.set_module(:1, :2);
end;");
try
cs.setString(1, module);
cs.setString(2, action);
cs.execute();
cs.close();
catch (SQLException sqle)
try { cs.close } catch (Exception(e) {}
throw OAException.wrapperException(sqle);
This example illustrates an OUT parameter:
import java.sql.CallableStatement;
import java.sql.SQLException;
import java.sql.Types;
import oracle.jdbc.driver.OracleCallableStatement;
DBTransaction txn = getDBTransaction();
String sql = "BEGIN :1 := FND_MESSAGE.GET; END;";
CallableStatement cs = txn.createCallableStatement(sql, 1);
String messageBuffer = "";
try
665
((OracleCallableStatement)cs.registerOutParameter(1, Types.VARCHAR, 0, 2000);
cs.execute();
messageBuffer = cs.getString(1);
cs.close();
catch (SQLException sqle)
try { cs.close } catch (Exception(e) {}
throw OAException.wrapperException(sqle);
thanx
Pratap

Similar Messages

  • Dynamic Visibility Function in customers Online (TCA)

    Hi,
    I have a requirement where I need to create couple of buttons using Extensions (Extensible Attributes) in Customers Online (similar to User Defined Attributes in Oracle Adavanced Product Catalog) . The problem I have is I need to make these buttons dynamically visible. Now we can make these buttons dynamically visible only by using User Defined Java Functions (as we can't use User Defined PL/Sql functions here!).
    I have found a sample code of this user defined java function from the knowledge base which is very simple and is given below. My problem is how can i make call to database pl/sql packages from within this java function (i.e. how to get the page context in my standalone java class?).
    I would really appreciate any help/suggestions on this.
    Java Code for user defined java function:
    public class XX_PARTY_SITE_Function
    public static oracle.apps.ego.common.EgoBoolean getVisible (StringBuffer theInput)
    try {
    if ("N".equals(theInput.toString())) {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
    } else {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("False"))) ;
    catch ( NullPointerException e ) {
    return (new oracle.apps.ego.common.EgoBoolean( new Boolean("True"))) ;
    Thanks,
    Kamal

    Hi,
    To make it more simpler, I've created a user-defined java function in Customers online and now I want to register a stand alone java class/method which will be used by the newly created user defined java function.
    The problem is that I wouldn't have any control over Page context or any such thing. In that case how will I be able to make database connection from my java class..?
    Thanks,
    Kamal

  • Dynamic visibility for icon

    Hi friends,
    In my current dasboard i am using dynamic visibility functionality. So for that i am using 2 icons for pricing & costing,2 pie charts for pricing & costing.
    for this i map like for each icon in destination property i gave i blank cell in excel. For corresponding pie chart in behavior tab ->Dynamic visibility for status tab i used that blank cell. Its working fine but when user click on icon1 then it showing the corresponding pie chart. when ever we click i con2 it show pie chart over the old one.
    So my question is how to disable automatically  the the first pie chart..
    Thanks
    Yogisha.G

    Hi Yogisha,
    Insted of taking 2 icons i suggest you to take a radio button with lables Pricing and Costing.
    Use of radio button makes the functionality clear and flexible as only one will be selected at any point of time .
    Take source as pricing and Costing eg:Sheet1!$A$1:$A$2
    Destination as blank cell eg:Sheet1!$C$1
    take your pie chart for Pricing and Give status as Sheet1!$C$1
    Key as Pricing(Sheet1!$A$1)
    take your pie chart for costing and Give status as Sheet1!$C$1
    Key as Pricing(Sheet1!$A$2)
    Change the orientation of radio button as horizontal.
    Note :Make shure that Key cell matches exact format in which labels are given .
    Hope this helps you .
    @Sri

  • Dynamic visibility for a custom component

    Hi everybody,
    I have implemented dynamic visibility for my component and try to use it with the Xcelsius checkbox.
    At preview my component is visible as the checkbox is checked.
    I unchecked the checkbox then my component is no more visible,  and it is works fine.
    But when I checked the checkbox again, my compoenent doesn't appear any more...
    Any idea ?

    Hi Evan,
    I am developing a component which requires "Dynamic Visibility" property.
    Its an Icon component where I have to bind a value for Icon. (i.e 0-30 Smiley, 31-70 dash, 71-100 Frown)
    The dynamic visibility works fine only when I bind both (Value for Icon,  Dynamic Status) to the same excel cell.
    Looks like Xcelsius wants all the bindings to be done to same cell in the Excel.
    [Here|http://docs.google.com/View?id=dzf62p8_35gc73brzm] is my code for your review.
    Please help me. Your timely respose would be of great help for me.
    Thanks
    Ravi.

  • Dynamic Visibility Issue

    I have two seperate Label based menu - one of them branched into another.
    The first menu consists of Metrics,Demograpcis,Key audiences & Whatif Analysis and the other menu branching from demographics to Age, Marital Status,Religion, etc.I have several different type of graphs which would show these demograpics. My apparent problem is how to tackle the dynamic visibility of the different componenets at different levels making sure for eg that the label at the second level show at the appropriate time.

    <p>It seems like you need two label based menus - I am guessing, horizontal menus, one positioned below the other (the top menu being Metrics, Demographics, Key audiences, and WhatIf). </p><p>Based on what is clicked on the top level menu, adjust the items in the secondary menu to match the selected item in the top level. For instance, when Demographics is clicked, the secondary menu could be populated with Age, Marital status, Religion, and so forth. These labels could be determined by using a lookup from a list. The idea in mind is that both the top menu and the secondary menu are visible and unchanging. <em>What changes is their labels and behavior as you click different items in the menus.</em> As you do this it dredges up the appropriate charts (e.g., When you click Demographics on the top menu, and then Age on the secondary menu, you might have a few charts or tables relating to age, displayed.).</p><p>While you don&#39;t need to worry about dynamic visibility for the label based menus, you do need to manage visibility for the charts. You may want to refer to my article <a href="http://www.xcelsiusjournal.com/index.php?option=com_content&task=view&id=51&Itemid=2" target="_blank" title="Xcelsius Journal article: Dashboard Multi-Layer Control- A Best Practice">Dashboard Multi-Layer Control</a>  for some techniques on managing dynamic visibility. <br /></p><p>Loren Abdulezer/Evolving Technologies Corporation<br /><strong><a href="http://www.XcelsiusBestPractices.com">www.XcelsiusBestPractices.com</a></strong><br /><strong><a href="http://www.XcelsiusJournal.com">www.XcelsiusJournal.com</a></strong> </p>

  • Dynamic visibility for tabset

    Hi
    is there an option or parameter for dynamic visibility for each tab inside tabset component ?
    that way i can control what each a specific user can see

    so far there isnt any option doing this!

  • Class to Generate Dynamic Filter Function

    I have built an ActionScript Class to allow me to create a
    dynamic Filter Function for the several ArrayCollections I use in
    my Flex Application. It works just as I intended, however, I'm
    wondering if it's too verbose, and can be skimmed down to use less
    code. For example, is there some way I could extend the Function
    class? See a snippet of my Class attached.

    I have built an ActionScript Class to allow me to create a
    dynamic Filter Function for the several ArrayCollections I use in
    my Flex Application. It works just as I intended, however, I'm
    wondering if it's too verbose, and can be skimmed down to use less
    code. For example, is there some way I could extend the Function
    class? See a snippet of my Class attached.

  • Dynamic visibility with Push buttons

    Hi ,
    Could anyone please guide me how to use pushbuttons with Dyamic visibilty option.
    Eg:-When I click on Push button1-It should display a bar chart
          When we click on Push button1-It should display a bar chart

    Hopefully it's OK to ask a similar question here rather than create a new thread.
    I would like to use the Label Based Menu component in conjunction with an invisible Toggle Button component (or possibly the new Push Button component).  The hidden button would insert into the same cell that the Label Based Menu component is inserting into.  This allows me to create what looks like a hyperlink in my dashboard that simply affects dynamic visibility.
    This seems to work for the most part, except that the Label Based Menu does not change to reflect the current state accurately.  For example, if both components insert "Apples" or "Bananas" as values into cell A1:
    1. Toggle Button component successfully inserts "Apples" and dynamic visibility works, however
    2. Label Based Menu component still shows "Bananas" as the active menu selection
    I thought I had come across a feature in some components where you could tell the component to update itself based on the changing values in a given insertion cell, but I don't see that now for some reason.

  • Tab Component Dynamic Visibility to Combo Boxes

    I am using a Tab component.  I have 3 tabs on my dashboard.  I have 2 Combo boxes that I am using to filter rows of data on 3 Excel sheets.  Both Combo boxes are not used on all the tabs.  How can I pass example: User clicks on Tab 1 and use dynamic visibility for Combo Box 1 and Combo Box 2 are visible.  If the user clicks on Tab 2 I want only Combo Box 1 to be visible.

    Hi Joe,
    This can be achieved in Dynamic visibility.
    On click on Tab,just map to some target(say value "1") and then For Combo box,set target cell mapped for tab to 1,which means when the target cell gets "1",show the Combo box.
    If you are not clear then you can refer the following URL,which will give you more informations about this.
    http://everythingxcelsius.com/2008/08/tip-7-xcelsius-dynamic-visibility-video-tutorial.html
    Rgds,
    Murali

  • Using Dynamic Visibility with Accordian Menu

    Hiya.  I am trying to use dynamic visibility with an accordian menu.  My menu categories are years, 2005 - 2010. My categories items are key performance indicators such as abandon percentage,  first call resolution, customer satisfaction percentage, call volume and average speed of answer. 
    Of my 6 KPIs, 4 display as percentages and 2 display as whole numbers.  When the percentage graphs are displayed the axis labels needs to be percentages.   When the whole number graphs are displayed the axis label needs to show whole numbers.
    I thought to achieve this I should use dynamic visibility with two different line charts where one line chart shows percentages and the other line chart shows whole numbers.   However I am strugging trying to make that happen.
    Is my concept correct, or is there an easier way to accomplish this?  If my concept is correct,can someone give me some advice on how to make dynamic visibility display the correct chart depending on which KPI I select from my accordian menu?
    Thanks!

    Hi
    You can achieveby doing following steps..
    Insert your categories into D3 and label bind to E3.
    take two charts and bind to the destination data of Accordion menu
    then write a formula in F3 like this =IF(OR(E3="abandon percentage",E3="customer satisfaction percentage"),1,0)
    and bind your two charts to the F3 and set DV for % charts as 1 and # charts as 0.
    I hope this will helps you
    Thanks,
    Srinivas Dandamudi.

  • Dynamic visiblity

    Hi Guys,
    My dashboard has a combo box to select the "Project Type". The labels linked in the Excel spreadsheet are - A & B. The Destination cell for the Combo box is stored in Cell D2.
    In the spreadsheet, I also have 2 sets of information for each "Project Type" selected. They are - Project Distribution & Manager Distribution.
    Project Distribution has columns for "Dept Name" & "No.of Projects"
    Manager Distribution has columns for "Dept Name" & "No. of Managers".
    Each "Project Type" has its own Project & Manager Distribution data in the spreadsheet.
    Now, when the user selects "Project Type A", then he should be shown pie charts for the Project & Manager distribution. Same thing when "Project Type B" is selected. Could anyone please help me achieve this in my dashboard?

    Hi Jeevan,
    Select combo box and choose project type as lable and store selected value at one destination. Refer below screenshot.
    And if you want to show no of projects dept wise for project A in pie chart select a pie chart and do below dynamic visibility settings for it. Similary you can use another pie chart which can appear when type B project is selected by user.
    Please let us know if you ve further query regarding dynamic visibility.
    Status: keeps on changing as per combo box output and key u can fix for each chart.
    Regards
    Shabnam

  • Urgent Dynamic Visibility Problem

    I'm creating a dashboard and everything was going really well. At some point, the things I designated with dynamic visibility just stopped showing up. If I create a component and don't put anything for Display Status, it shows up fine, but appears on all my "pages." If I try and qualify the component so it only appears on one page, it won't show up at all in the SWF.
    The weird thing is that if I make a copy of an existing component, it will show up, but only if the dynamic visibility settings aren't changed. If I copy a component that's on page 2 and want it to appear on page 3, it won't do it.
    The dashboard has gotten kind of large, and I don't know if that has anything to do with this. All I know is that I've become completely frustrated because I'm two pages into a four page dashboard and can't continue. Nothing new can be created to go on those last two pages.
    Can someone help me with this?
    Thanks!

    Although there is not a "limit" to how complex your dashboard can be, at a certain point performance will be compromised. This same principle is also true for your Excel spreadsheet. I assume that since you are creating a complex multi-page dashboard that the underlying data is also dense and complex. You can either: simplify the data, reducing either its size or the number of formulas/calculations being performed; or simplify the dashboard. Rather than creating one dashboard with several complex layers, you may find creating a parent dashboard that calls multiple external "child" SWF files yields a better performing dashboard. *Caution: parent/child or nested dashboards are more complicated to distribute to viewers, which should be considered depending on your application.

  • Dynamic visibility case with ALL charts??

    Hi SDN members,
    How can i with the dynamic visibility add a case where ALL CHARTS can be displayed, to the normal cases where only each and one chart is displayed: Now i use the component LABEL BASED MENU selector.
    Or is it perrhaps possible to use another selector component which allows me to select or display more than one or all charts in the same window at the same time.
    2nd question: Can i set the charts so that in case of one chart, this can be maximize and center in the windows and when displaying all the charts, each one can have the original position in the dashboard windows.
    Kind regards
    Arnaud

    Hi,
    Drag three charts at the center of canvas(workspace) and increase size and enable dynamic visibility. So that you can view each one at the center when selected. Drag a canvas container component and copy and paste three charts, adjust size  and place them at the corner as you wish to view. disable dynamic visibility of three small charts inside the canvas container and enable dynamic visibility for canvas container. So canvas container with three charts acts as a separate component. So you have four layers now. three charts with dynamic visibility enabled and one canvas container with three small charts in it and  dynamic visibility enabled(here you are selecting key and status for canvas container component. 3 small charts are embedded in it. they are the copies of three big charts. differences are small in size and dynamic visibility disabled. But data mapping is same. So when canvas container is displayed three charts can be viewed at their respective position).
    follow the same step to dynamically show the canvas container with 3 charts in their original position by selecting all chart option in label menu. ie give status and key for canvas container and map it with all charts option in label menu.
    Hope it is clear for you. Let me know if you have any doubts.
    Regards,
    Nikhil Joy

  • More bugs - Dynamic Visibility

    Post Author: Brian Gratigny
    CA Forum: Xcelsius and Live Office
    I have had non-stop problems with Xcelsius 2008.  The latest one is with dynamic visibility.  I can't change the existing cells dynamic visibility is referencing.  When I go in to change it, it won't update.  If I try to delete it our, it clears the cell reference but when I go back in, it comes right back.  This is unacceptable!  I have been working on this for hours.  Don't release a product if it is not ready. 

    True...
    Example:
    http://www.forumtopics.com/busobj/viewtopic.php?t=166072&highlight=dynamic+visibility

  • Dynamic select / function module for select queries

    Hello experts,
    Is there any function module to build dynamic select queries and also to build standard select queries .
    Thanks,
    krishnakumar

    What are you meaning by 'to build' ???
    BR, JAcek
    Message was edited by: Jacek Slowikowski

Maybe you are looking for