Custom data control createRowData(DCRowContext ctx)

Custom data control createRowData(DCRowContext ctx)
public Object createRowData(DCRowContext ctx) {
System.out.println("createRowData()");
DCRowSetIteratorImpl rsi = (DCRowSetIteratorImpl)ctx.getRowSetIterator();
ARow row = new ARow(new PersonTO(new Integer(122),"Juhan", "Santiago", "223311" ), rsi);
return row;
I overrode this method in my custom data control class ( MyCustomDataControl extends EjbDataControl)
However the returned row is not added to the rowsetiterator. ARow is a custom class which extends RowImpl,
there i only overrode the constructor. PersonTO is what would be returned by ctx.getRowDataProvider().
How can i get a PersonTO to be inserted into the rowsetiterator to which the ctx refers?
Many thanks!

I know... But at the moment it's the only solution i can see that works.
I have tested it by executing the EL in my data control to retreive the value from my TF input parameter and it works.
So basically i am trying to write a DC that will retreive information from another system. As an input parameter of the taskflow, you need to specify the name of that system and it's that parameter I want to pass to my DC. So currently I have something like this:
    public MyDC() {
        super();
        System.out.println("calling constructor");
        String system = (String)get("#{pageFlowScope.system}");
        System.out.println("System: " + system);
        SessionFactory factory = new SessionFactory(system);
        Session session = factory.getCurrentSession();
        System.out.println("init complete");
    }SessionFactory and Session are from the custom java API so don't bother about that :)
I have tested this and it works but I know it's not the best solution... (that's why I wrote this post)
Based upon that, is there a better way for passing the system name to the DC?
Edited by: Yannick Ongena on Jan 18, 2012 12:16 PM

Similar Messages

  • Building custom date control in WAD

    Hi,
    Plz. let me know how can I build a custom date control in WAD which will take date intervals.
    OR
    How can I represent a date interval variable in WAD by not using the variable screen feature of the web template.
    Thanks,
    Priya

    Hi Ashish,
    Actually I searched for quite sometime & also consulted with SAP, but could not find an answer. I thus ended up building the whole logic myself. I used Input Field & Button Group web items to build the date controls & made it look like the standard SAP date control complete with icon etc. I enabled Javascript on the Button Group webitems that called a Calendar control for input date selection (my requirement was a date interval, so from & to dates). I then passed the input selection thru' Javascript using Command API to the query variables on click of another Button Group webitem along with some other inputs from Drop Down webitem etc.
    --Priya

  • How to create custom Data Control for Iterator?

    Hi,
    I have seen somewhere that is possible to customize set of data controls for all iterators in Data Controll Palette e.g. by adding custom data control (I remember JDev uses Velocity to display data controls). Is there any documentation or tutorial how to do it. Meybe any Oracle ACE will write some steps on his blog.
    Kuba

    I'm looking for any documentation or better some examples to customize files:
    jdev/system/oracle.adfm.dt.faces.10.1.3.41.57/jsp_databinding_templates.xml
    jdev/system/oracle.adfm.dt.faces.10.1.3.41.57/faces_creator_configuration.xml
    This customization may be very useful while developing appliations
    Kuba

  • Using UCM data controls in ADF application

    Using *.6 Jdeveloper/UCM/Protal Application/UCM
    Calling all the experts in Webcenter/Spaces/UCM/ADF.
    We have a requirement to design search inteface for Documents stored in UCM for Webcenter Portal and Spaces application.
    Our approach is
    Design simple ADF application (no security/templates)
    Bounded task flows using fragments.
    Framents to use UCM data controls (provided by oracle)
    UCM data control definition is extended to use custom metadata.
    package the application.
    Added as ADF library jar to portal application
    Added as Shared Library to Spaces application.
    Question.
    Is this approach sound?
    Does UCM data controls provide all the functionality, for example if we want to read a option list for custom metadata or need custom metadata in return table?
    Can we add other methods to UCM data control provided by Oracle or should we create different one?
    Is there good documentation for such requirements. We have acces Webcenter developers guide which throws some light on UCM data controls.
    Let me know if more clarity is needed...
    Regards

    Hi.
    One of my last components was a custom "Document Explorer" and I used for first time JCR Data Control (Custom UCM Data Control provided by Oracle).
    Sharing my experience I did something similar to you:
    1) Create a ADF Bounded Task Flow and test it individually.
    2) Add generated ADF JAR Library to WebCenter Spaces shared-lib.
    3) Add your Task Flow to Resource Catalog.
    Challenges that I found using custom Data Control:
    1) When items retrieved are content/files all custom metadata can be retrieved OOTB.
    2) When retrieving folders don't provide custom metadata like files. I used RIDC with JCR Data Control to provide all the information relative to folders. If you don't need more information about folders than the name, URI and icons then is OK :).
    3) Using JCR Data Control registers in DataControls.dcx UCM Connection name used when generate JCR Data Control. After deploy your ADF JAR Library in WebCenter Spaces you'll have problems if you don't have a WebCenter Content Connection created with the same name. (Not talking about export UCM Connection with ADF JAR Library, Data Control uses a Connection name by itself :)).
    I added extra functionallity with RIDC (not extending JCR Data Control).
    I hope this help you.
    Regards.

  • Manipule a lista in data control

    Hi everyone,
    I have a data control from a oracle component and I don't have access to this code, so I used it in my page, the data control returns a collection of items, so I can use adf tree and other thinks like that.
    The data control is a data control from a UCM component and I'm using getItems method.
    So, as I say before I don't have access to the code of data control but I need manipulate the return with java operations, I need sort this list.
    I was thinking about call this method in my java method and create my custom data control, but I don't know how "call" the data control method in my custom method.
    I would like to know if it's possible cat the result of this oracle data control in a java method and so I can manipulate this.
    Thks in advance,

    Is it possible to which type of Object, the list returned by the datacontrol contains?
    If yes, you could create a custom comparator,
    (The below sample NavigationTreeNode is the type of each item in the list)
    import java.util.Comparator;
    public class NavigationTreeNodeComparator implements Comparator<NavigationTreeNode> {
    public NavigationTreeNodeComparator() {
    super();
    @Override
    public int compare(NavigationTreeNode navigationTreeNode1,
    NavigationTreeNode navigationTreeNode2) {
    int displaySequence1 = navigationTreeNode1.getDisplaySequence();
    int displaySequence2 = navigationTreeNode2.getDisplaySequence();
    if (displaySequence1 > displaySequence2) {
    return +1;
    } else if (displaySequence1 < displaySequence2) {
    return -1;
    } else {
    return 0;
    After getting the list from method, you can use the custom comparator to sort the list as follows:
    Here, the navigationTree contains the list of navigationTreeNodes
    NavigationTreeNodeComparator navigationTreeNodeComparator =
    new NavigationTreeNodeComparator();
    Collections.sort(navigationTree, navigationTreeNodeComparator);
    Thanks,
    Navaneeth

  • Login Data Control

    I am trying to use Login Data Control that comes with WebCenter Portal application.
    I dragged & dropped it's handleLogin() method on my jsfx page as ADF parameter form. It created 2 text boxes for username & password each & a button to execute handleLogin() method. Now if I enter username & password (weblogic/weblogic1) & click this button, it should ideally call handleLogin() method... nothing happens, not sure if it called handleLogin() method of LoginDC class or not (this data control is created with LoginDC class - checked it's definition).
    Checked code of handleLogin() method - it should redirect to 'success page' if login succeeds. 'success page' is an attribute in LoginDC class.
    How do I set this attribute before calling handleLogin() method?
    Later I created a custom data control which extends LoginDC:
    package portal;
    import oracle.webcenter.security.login.LoginDC;
    public class MyLoginDC extends LoginDC {
    public MyLoginDC() {
    public void doLogin(String username, String password) {
    setSuccessUrl("/welcome.jspx");
    handleLogin(username, password);
    And used this DC on my page but still nothing happens... it doesn't redirect to 'welcome page' - not even any error...
    Can anyone help in using WebCenter's Login Data Control?
    Thanks.

    You don't need that data control.
    Just use the OOTB managed beans.
    Take a look at my tutorial: http://www.yonaweb.be/webcenter_11g_ps3_tutorial_building_webcenter_template
    The part about adding a login popup has all the code you require to put a login form on your application.

  • Custom data bean collection

    I want to make available in Data Control Palette a custom collection data control. I proceeded like samples in [a]http://www.oracle.com/technology/products/jdev/collateral/papers/10g/ADFBindingPrimer/ADFBindingIntro.zip[a] from doc. Oracle ADF Data Binding Primer and ADF/Struts Overview but I didn't obtain same result (look for CommissionPlan+CommissionService).
    That are my files which I made to construct my custom data collection control:
    1)The child java bean:
    package tdb.zero.model;
    public class PersonBean
      String name;
      String pren;
      public PersonBean()
      public PersonBean(String s1, String s2)
      {setName(s1);setPren(s2);
      public String getName()
        return name;
      public void setName(String name)
        this.name = name;
      public String getPren()
        return pren;
      public void setPren(String pren)
        this.pren = pren;
    } and the descriptive file of the bean:
    <?xml version='1.0' encoding='windows-1252'?>
    <JavaBean
       id="PersonBean"
       xmlns="http://xmlns.oracle.com/adfm/beanmodel"
       version="9.0.5.15.88"
       BeanClass="tdb.zero.model.PersonBean" >
       <Contents >
          <Attribute
             Name="name"
             IsUpdateable="true"
             AttrLoad="Each"
             IsQueriable="false"
             IsVisible="true"
             IsPersistent="false"
             IsUnique="false"
             IsNotNull="false"
             PrecisionRule="true"
             DiscrColumn="false"
             SourceName="name"
             Type="java.lang.String" >
          </Attribute>
          <Attribute
             Name="pren"
             IsUpdateable="true"
             AttrLoad="Each"
             IsQueriable="false"
             IsVisible="true"
             IsPersistent="false"
             IsUnique="false"
             IsNotNull="false"
             PrecisionRule="true"
             DiscrColumn="false"
             SourceName="pren"
             Type="java.lang.String" >
          </Attribute>
       </Contents>
    </JavaBean>2) the collection:
    package tdb.zero.model;
    import java.util.ArrayList;
    import tdb.zero.model.PersonBean;
    public class AgendaBean
      private ArrayList agenda= new ArrayList(10);
      public AgendaBean()
        agenda.add(new PersonBean("twew","pdske"));
        agenda.add(new PersonBean("peter","george"));
        agenda.add(new PersonBean("raddsu","iosxdnel"));
        agenda.add(new PersonBean("paz","raz"));
      public void setAgenda(ArrayList agenda)
        this.agenda = agenda;
      public ArrayList getAgenda()
        return agenda;
    }I generated this AgendaBean class as custom data control and the xml is:
    <?xml version='1.0' encoding='windows-1252' ?>
    <JavaBean
       id="AgendaBean"
       xmlns="http://xmlns.oracle.com/adfm/beanmodel"
       version="10.1.2.18.73"
       BeanClass="tdb.zero.model.AgendaBean" >
       <Contents >
          <AccessorAttribute
             id="agenda"
             BeanClass="tdb.zero.model.PersonBean"
             IsCollection="true"
             Type="java.util.ArrayList" >
          </AccessorAttribute>
       </Contents>
    </JavaBean>The DataControls.dcx is:
    <?xml version='1.0' encoding='windows-1252' ?>
    <DataControlConfigs
       id="DataControls"
       xmlns="http://xmlns.oracle.com/adfm/configuration"
       version="10.1.2.18.73" >
       <Contents >
          <DataControl
             id="AgendaBeanDataControl"
             SubType="DCJavaBean"
             SupportsFindMode="false"
             SupportsTransactions="false"
             FactoryClass="oracle.adf.model.generic.DataControlFactoryImpl"
             Definition="tdb.zero.model.AgendaBean"
             BeanClass="tdb.zero.model.AgendaBean" >
          </DataControl>
       </Contents>
    </DataControlConfigs>In Control Data Palette I have no acces to name and pren attributes of collection agenda.
    I receive the error:
    Wrong node type found. Expected a node of type oracle.adf.dt.navigator.nodes.BeanModelXmlNode , but found type oracle.bali.xml.addin.XMLSourceNode. You need to create your data control in a seperate project.
    . What that means? What I have to do things works?
    null

    I found a solution reading the doc. above.
    You don't have to manual describe an xml file for structure of the child bean (members of the collection).
    Since introspection of the AgendaBean only tells us that the property is of type Collection, this additional "Bean class" metadata property lets us record the specific kind of bean that will be in the collection at runtime, tdb.zero.model.PersonBean. I had to set this property manually, using the Property Inspector. Once you tie the PersonBean bean into the AgendaBean by setting this BeanClass property, JDeveloper 10g creates the PersonBean.xml metadata file as well to record metadata about that bean as well. Strange is that automatically generated xml contains same data as the before xml file made by hand by me.
    Now, the problem is how to make the collection class to keep the current row indicator trace. If I post something to my current row, the row pointer is resetted to the first. I want this pointer to mantain its position.

  • Creating Data Control Adapters

    Hi,
    I'd like to create custom data control adapter. Unfortunately, documentation I have found covers 10.1.3 version:
    http://sqltech.cl/doc/oas10gR3/web.1013/b25386/advanced_adf_data_controls.htm
    Why there is no documentantion to 11g ?
    Kuba

    Hi,
    in JDeveloper 12c we provide a wizard for this. Not sure what your reason is for building your own adapter, but in the past people outside of Oracle only used POJO beans and never considered writing their own adapters. This is how it comes that there is no documentation. So 12c is the target for your requirement
    Frank

  • Creation of Data Control for custom java method  which will return records

    Hi Guys,
    I have a requirement of creating a a custom java method in App module which will return a record set taking an id as input.In case of single return type it works fine but in case of returning record set it is not working.In my case i have to combine two tables and return it as a single entity as a view in Data Control.
    Warm Regards,
    Srinivas.

    Why don't you just create a custom view object? There's even an example or 2 in the docs:
    http://docs.oracle.com/cd/E16162_01/web.1112/e16182/intro_tour.htm#CHDGDIEC (check out "View object on refcursor" example)
    Edit: you are aware that you can create a View Object based on more than one table?
    John

  • How to cause POJO data control to use custom base ViewObject class

    ADF 11.1.1.4
    We have a POJO data control that displays data in a table.  We can filter the table using the column filters and this performs in-memory filter.   If an exception occurs I see that it is using a ViewObject for the in-memory filtering because this shows up in the stack trace.
    oracle.jbo.server.ViewObjectImpl.rowQualifies(ViewObjectImpl.java:2811)
    It uses DCDataVO which extends ViewObjectImpl
    We have a Custom base view object defined that all our normal view objects inherit from, defined in Project Properties/BC/Base Classes
    Is there any way to make the DCDataVO also extend from  our Custom View Object that inherits from ViewObject so that we can override methods?  For example if I wanted to customize the rowQualifies method.
    In DCBeanDataControl.Java I see where it actually gets created.
    vo = DCDataVO.createViewObjectFromDef(vdef, this, getApplicationModule());

    So you have already overridden then rowQualifies() method in your custom base View Object ? Are you calling super in that ?
    Cheers
    AJ

  • How to access the Custom Data type variable given in Expression edit control To and From LabVIEW

    Hello, I would like to know how to access the custom data type variable given in the Espression Edit Control from LabVIEW and vice-versa
    Say, the FileGlobals.Reference_Handle (Custom Data Type Variable) contains the
    VISA I/O session (Which in turn contains VISA_DeviceName: String, Session: Number),
    Channel1: Number and
    Channel2: Number
    I am expecting the user to give FileGlobals.Reference_Handle as the input at the ExpressionEdit Control in the edit screen of the VI Call.
    I would like to know how to get the values of this custom data type to LabVIEW?
    Say, if I have the Cluster in LabVIEW like VISA I/O session (Deive Name and Session Number), Channel1 and Channel2
    how do i need to set this cluster to the Custom Data type variable in TestStand?
    Thanks and Regards
    Prakash 

    Hi,
    TestStand to LabVIEW: i didnt understand what you r trying to achieve. But if you are using references, Use Property nodes and Invoke nodes to achieve what you want in LabVIEW.
     LabVIEW to TestStand: check the image below: You need to click the button next to 'container'. I have used a cluster output in the VI.
    Hope this helps
    .......^___________________^
    ....../ '---_BOT ____________ ]
    ...../_==O;;;;;;;;_______.:/
    Attachments:
    1.JPG ‏187 KB

  • What are the benefits of converting my custom class into Data Control?

    Hi,
    I have developed my own custom class which implements no of methods for execution of Business Logic. Now I have two ways to use the same -
    *1. Create and instance of the same (wherever required) and call those methods.*
    *2. Expose the class as Data Control.*
    I want to understand which methods/technique is better and why?
    Does creating that class as Data Control provides me better performance any other benefit.
    Thanks in Advance,
    Amit

    Hi,
    1. You use this if you don't want to use ADF bindings to access the business logic (e.g. to build input forms or table for it)
    2. You use this when you want to work with ADF. Additional benefits you gain is that you can specify UI control hints on the generated metadata, apply validation rules that are consistently applied to all uses of the POJO class. In addition you don't need to handle class instantiation and dismissal yourself anymore as the ADF framework takes care of it.
    The base line though is "no data control - no ADF binding"
    Frank

  • Data control - Attributes in custom table

    Hi!
    Is it possible to design a custom data table (output) with the desired attributes of a data control? For example, dragging the attributes
    and placing them in a specific cell of a table(html) ?

    Hi,
    you can use Trinidada tablelayout, rowLayout and cellLayout components to build a grid. However, the attributes you drag and drop will only show the data of the current row in the ADF iterator binding.
    Frank

  • Windows Phone - Cannot bind custom user controll with listview item source property

    It is Windows Phone 8.1 (runtime)
    I have some problem of binding custom user controll with list of data. I'll make it simple as I can.
    My problem is that somehow if I use DataBind {Binding Something} inside my custom controll it will not work.
    I need to transfer binded data (string) to custom controll.
    It is strange that if I do not use DataBind, it will work normally. Eg MyCustomControllParameter = "some string" (in my example 'BindingTextValue' property)
    Does anyone Know how to bind custom user controll with inside ListView with DataTemplate.
    Assume this:
    XAML Test-Main page
    <Grid  Background="Black">        <ListView x:Name="TestList" Background="#FFEAEAEA">                    <ListView.ItemTemplate>                <DataTemplate>                    <Grid Background="#FF727272">                        <local:TextBoxS BindingTextValue="{Binding Tag, FallbackValue='aSource'}" local:TextBoxS>                    </Grid>                </DataTemplate>            </ListView.ItemTemplate>        </ListView>    </Grid>
    XAML Test-Main page c#
    public sealed partial class MainPage : Page    {        List<TTag> tags = new List<TTag>();        public MainPage()        {            this.InitializeComponent();            this.NavigationCacheMode = NavigationCacheMode.Required;        }        public class TTag        {            public string Tag { get; set; }        }        private void InitializeAppData()        {            TTag tag = new TTag() { Tag = "hello world" };            tags.Add(tag);            tags.Add(tag);            tags.Add(tag);            TestList.ItemsSource = tags;        }             protected override void OnNavigatedTo(NavigationEventArgs e)        {            InitializeAppData();        }           }
    User Control XAML:
      <UserControl    x:Class="CustomControllTest.TextBoxS"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    xmlns:local="using:CustomControllTest"    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    mc:Ignorable="d"    d:DesignHeight="300"    d:DesignWidth="400">      <Grid x:Name="LayoutRoot" Background="#FF4F4F4F"   >        <RichTextBlock x:Name="MyTestBlock">        </RichTextBlock>    </Grid></UserControl>
    User Control c#
    public TextBoxS()       {            this.InitializeComponent();            LayoutRoot.DataContext = this;        }        public static readonly DependencyProperty BindingTextValueProperty = DependencyProperty.Register(                                         "BindingTextValue",                                         typeof(string),                                         typeof(TextBoxS),                                         new PropertyMetadata(default(string)));        public string BindingTextValue        {            get            {                return GetValue(BindingTextValueProperty) as string;            }            set            {                SetValue(BindingTextValueProperty, value);                //This method adds some custom logic into RichTextBlock, pointed correctly                SetupBox(value);            }        }
    Thanks for helping ;)

    If you use a built-in control rather than your custom control, does binding work? You should verify that first.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • How to get value in data control at run time based on bind variable in VO

    Hi,
    we are capturing the value of customer id at run time. we are associating the captured value of customer id to bind variable of the view object.
    View object is returning the data of that customer id, this view object is part of the application module ,this application module is exposed as data control,so than we have drag and drop this view object response on the
    page from data control.
    How ever after assigning the customer id to bind variable but still it is not showing on jsf page,even we refreshed the data control manually with the help of java code so kindly provide some solution for it.

    Hi,
    If i got your post correctly,you can filter your VO using defining view criteria see following samples
    Oracle ADF - Create View Criteria and Execute using Bean.
    http://adf-lk.blogspot.com/2011/05/oracle-adf-create-view-criteria-and_4727.html

Maybe you are looking for