How to Use Swing-ADF in a Three-Tier-Archiitecture

I am currently avaluating Swing-ADF (11g) and I wonder how I can leverage it in a three-tier, rich-thin-client-environment. When I bind a control, normally I would do it directly to the database. As I want to have my business logic and database access on the middle-tier, how do I bind my controls to the middle-tier which in turn accesses the database. Does ADF support a mechanism to bind the Swing-Client to the middle-tier-data? Is the recommended way to go for webservices? Can Webservices easily bound to the ADF-controls? Is it the only way?
best regards
Stefan

Stefan,
It is a built-in feature of ADF Business Components to expose an application module as a stateful EJB session bean to support three-tier Swing-client access. It requires absolutely no effort from the developer, who can even easily switch between running/testing in 2-tier or 3-tier modes. Shay's answer is valid for the general case, but in the specific case of what the ADF tech stack can bring to bear to solve your problem, it can be completely simple to achieve (even requiring zero code, if you choose to leverage that feature of ADFBC).

Similar Messages

  • How to use Swing in a web Application

    Can you suggest me some good PDF/tutorial or some good site for reading about using SWING in a Web Application.
    In our web application we plan to use JSP/Struts for the presentation layer. However there are a few screens that require some advanced UI like color coded assets and a graphical version of Outstanding Vs Available limit. We are wondering whether we should use SWING for these screens. Do you think this is a good idea or is there a better apprach to deal with this
    What are the disadvantages of using SWING VS JSP/Servlet in a Web environment. Is there a site or pdf where i can get information about this.

    I'd say the biggest disadvantage is that your client machines have to download and install the bloody java plug in.
    What you write about your UI ain't half vague. What the deuce is a "color coded asset"? Is it
    interactive? If not, could it be represented by an image? If so, even if it is a non-static image, it is a simple
    matter for your webapp to generate the image on the fly. Many web app tutorials demonstrate that.

  • How to use Swing in a Web applicatrion

    Can you suggest me some good PDF or some good site for reading about using SWING in a Web Application.
    In our web application we plan to use JSP/Struts for the presentation layer. However there are a few screens that require some advanced UI like color coded assets and a graphical version of Outstanding Vs Available limit. We are wondering whether we should use SWING for these screens. Do you think this is a good idea or is there a better apprach to deal with this
    What are the disadvantages of using SWING VS JSP/Servlet in a Web environment. Is there a site or pdf where i can get information about this.

    Applet/HTML page combinations are used often when a portion of a page requires Swing/AWT capabilities, e.g. administration consoles for Weblogic and JBoss are designed this way. The page is typically divided with frames that contain either applet or HTML code.
    A

  • How to use Swing in Web Applications

    Can you suggest me some good PDF or some good site for reading about using SWING in a Web Application.
    In our web application we plan to use JSP/Struts for the presentation layer. However there are a few screens that require some advanced UI like color coded assets and a graphical version of Outstanding Vs Available limit. We are wondering whether we should use SWING for these screens. Do you think this is a good idea or is there a better apprach to deal with this
    What are the disadvantages of using SWING VS JSP/Servlet in a Web environment. Is there a site or pdf where i can get information about this.

    As mentioned above, you could simply use an Applet, but I would discourage that approach.
    Although it's harder to have a good UI on the web, it's definitely possible (witness Gmail). You can do all sorts of clever things like building collapsible/expandable tree structures on the web with a little Javascript/CSS.
    Swing is much, much slower than regular HTML elements and the API for some Swing things is needlessly complicated (i.e. JTree).
    Could you be a bit more specific about the UI elements that you need? If you wanted to do something like Photoshop, well, it would be almost impossible on the web (to do it well at least), but many other applications are very do-able.

  • How to use swing 3d to do a menu list ?

    Is anyone know any good webpage to show some simples about swing 3d ? I want to do a menu which is using swing 3d . Thank you .
    regards
    jojo

    I've never mixed swing and Java3D but I've got the following URL in my bookmarks. Maybe it will help you.
    http://www.jroller.com/page/gfx/?anchor=a_swing_button_with_3d
    Bye!

  • How to use Swing html to parse a html file..

    I am currently working on a project in java.i need to read a Html file, extract the table tag along with its contents if it has a button embedded in it and replace it with another code..
    i tried it with Reg Ex in java but in vain.. Any help is great... I need an idea of how to use Html parser for this prob.. any examples will be fine..

    Run the program from command line, this way you will see the errors, if any.
    example.: java -jar theJarfile.jar
    I was successful in creating a comm application. I placed the win32com.dll in the same directory of my application jar file and all worked.
    I also extracted the comm.jar , and jar'd my app with the extracted comm files to make one jar.
    I also had a fileWriter() to get the clients jre path and my app would write the javax.properties file to the correct place.
    It took me severel weeks and late nights to accomplish this, but it was all necessary to be able to install only my app, and not a bunch of api's that were needed.

  • How to install oracle applicatons in a three tier architecture

    Hi,
    i want to install oracle apps in a three tier architecture?
    application tier -- middle tier
    database tier -- database tier
    Any steps or a meta link document
    Regards
    Sudharshan

    Hi,
    http://download.oracle.com/docs/cd/B34956_01/current/acrobat/120oaig.pdf
    Pages 2-10 and Pages 2-19 don't specify this ???
    They indicate only having to install with rapidwiz 1 time (as root user if appl/ora accounts setup) ??It is mentioned in Page 1-2
    Release 12 utilizes the conf_<SID>.txt file in certain situations, for example where the database has not yet been created. The configuration file is also employed in multi-node (distributed) installs, where you only need to enter the install information once, on one machine, and can then copy the configuration file to other machines as required.
    If you are installing in an environment where different machines are used to support the database and Applications tiers (as is typically the case), you would run Rapid Install on each machine in turn, starting with the database machine.
    Regards,
    Hussein

  • How to use scanner ADF with SANE in linux using Morena

    Hi! I'm using Morena libraries to access my scanner in my linux by the SANE backend. I'm able to scan one page, but I just can't scan all the pages on the scanner. I've tried loops and status but nothing successfull.
    Using linux utility "scanadf" works great, it scans all the pages. I don't know what I'm missing.
    Hope some one out there has used the Morena project to accesso SANE scanners.
    Best regards!

    Hope, that something of the below will help:
    According to the Sane specification, Sane backend (i.e. scanner) should report the "out of paper" situation by returning SANE_STATUS_NO_DOCS status code. Some backends do it by default, some require to set a special sane option, so that they accept the fact that "application wants to use ADF". E.q. when you scan multiple papers using ADF just by default options with our scanner HP ScanJet 6300C, it will result in endless repeated scans. In that situation you need to examine the list of backend's options and find the appropriate adf option name. In case of our HP ScanJet scanner, you need to call setOption("source", "ADF");
    Is is possible, that some backends need to be inform to pull the next paper into the adf (something like change document option).
    How To detect out of paper using Morena
    1) Morena produces acquired data via Java ImageProducer interface. When image was acquired correctly, it will send imageComplete(ImageConsumer.STATICIMAGEDONE). When some error occurs, it will send imageComplete(ImageConsumer.IMAGEERROR). Developer can track these values. MorenaImage class has it's own getStatus() method, which reflects these values. Here is an example how to:
    MorenaImage image;
    SaneSource source=SaneConnection.selectSource(null);
    source.setResolution(100);
    source.setOption("mode", "Color");
    source.setOption("source", "ADF");
    do
    { image = new MorenaImage(source);
    System.out.println("Size of acquired image is " + image.getWidth() + " x " + image.getHeight() + " x " + image.getPixelSize() + ", image.getStatus=" + image.getStatus());
    } while (image.getStatus() == ImageConsumer.STATICIMAGEDONE);
    2) When developer decides not to buffer the acquired image, it is possible to omit MorenaImage class:
    Image image;
    SaneConnection saneConnection=null;
    try
    saneConnection = SaneConnection.connect("localhost");
    SaneSource source=saneConnection.selectSource(null,null);
    source.setOption("mode", "Color");
    source.setResolution(100);
    source.setOption("source", "ADF");
    do
    image=Toolkit.getDefaultToolkit().createImage(source);
    MediaTracker tracker=new MediaTracker(this);
    tracker.addImage(image, 0);
    try
    { tracker.waitForAll();
    catch (InterruptedException e)
    { e.printStackTrace();
    tracker.removeImage(image);
    System.out.println("Size of acquired image is " + image.getWidth(this) + " x " + image.getHeight(this) + ", saneConnection.getResultCode()=" + saneConnection.getResultCode());
    } while (saneConnection.getResultCode() != SaneConstants.SANE_STATUS_NO_DOCS);
    catch (Exception e)
    { e.printStackTrace();
    finally
    { if(null!=saneConnection)
    try
    { saneConnection.close();
    catch (Exception e)
    { e.printStackTrace();
    3) Quit simple solution is to detect a size of the acquired images. If the size = 0 (or -1 in some scanners), stop the scanning.
    Martin Motovsky

  • How to Use Time Capsule to Backup Three Computers?

    Hello,
    I just unwrapped my new Time Capsule today, and am starting to set it up. I did all the AirPort Utility stuff, and the Wi-Fi is working great. I now know how to set up Time Machine on my computer, but I need to know how to get Time Machine on three computers. I don't know if I have to partition or what, so may I have instructions please? Thank you!
    C h r i s t o p h

    Oh that's an easy one. Simply install the TimeCapsule software onto each of the computers you plan to back up. Once installed, you will be able to use the same set-up from your computer, select the Airport Extreme Time Capsule, and begin the back up.
    Time Capsule will create an individual data file for each of the computers backing up to it. My only advice (you probably already know this) is to do your first back-up using an Ethernet cable. You are good to go from there.

  • How to use Swing Components in  JavaFX

    Hi All,
    I am new to JavaFx. I am trying to use java swing components in javafx.
    I found a sample program in net and tried it. But it shows compile time error.
    Code:
    MySwingComponent .fx
    import javafx.ext.swing.SwingComponent;
    import javax.swing.JComponent;
    import javax.swing.JButton;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    * @author nandha
    class MySwingComponent extends SwingComponent{
    var button: JButton;
    public var text: String on replace {
    button.setText(text);
    public var action: function();
    override protected function createJComponent () : JComponent {
    button = new JButton();
    button.addActionListener(ActionListener {
    public override function actionPerformed(e:ActionEvent){
    action();
    return button;
    The above code shows no error.
    Test SwingButton.fx
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import swingcomponents.MySwingButton;
    * @author nandha
    Stage {
    title: "Swing Button Example"
    scene: Scene {
    width: 250
    height: 80
    content: [
    MySwingButton{  // error message: imcompatible type. found MySwingButton. Required javafx.scene.Node[]
    text: "Click Me!"
    action: function(){
    println("Hello World!");
    This code which used the MySwingButton shows error: imcompatible type. found MySwingButton. Required javafx.scene.Node[] - where i have added the MySwingButton.
    Please help me to fix the error.
    Thanks &Regards,
    Nandha K

    Hi Sasa,
    First thanks for your reply.
    I found the problem and have fixed.
    Problem:
    There is no class MySwingButton in the package swingcomponents. Its MySwingComponent that i should have used, which is a big mistake that i have done. To my surprise i don't know NetBeans didn't show any error message at that line.
    Thanks & Regards,
    Nandha K

  • How to use Swing Worker

    Hello,
    I have an exe file which is to be called from my program and it runs as seperate thread. The main purpose of this exe file is to create two files within the application directory. Next my program check to see if these files exists if these file exists then the program display that the files have been created to the user..
    Now my problems
    The part of program which checks to see if the exe has created the file should runs in while loop as a seperate thread.
    The part of program which displays that the file is being generated should also runs as another thread.
    Please any body could code/pseudo-code the above for me, I would really be thank full and appreciate. I have tried to do the above, but in vain because some times the GUI interface does not get updated or some times the file does get created and the program loops forever.
    Please help
    Josh

    I just use SwingUtilities.invokeLater(..). Something like:
    SwingUtilities.invokeLater(new Runnable()
         public void run()
              someTextField.setText("some new text");
    });

  • How to use Swing?

    The source I included below is a part of my program which reads input from the DOS console. I am interested in GUI so can anyone help me in this?
    case 1:                
                        System.out.println("Patron ID: " +id);
                        System.out.print ("Name : ");
                        String n = input.readLine();
                        System.out.print ("Address : ");
                        String add = input.readLine();
                        System.out.print ("Tel. No : ");
                        String t = input.readLine();
                        System.out.println();
                        System.out.print("Save record? (y/n) ");
                        String answer = input.readLine();
                        if (answer.equals("y")||answer.equals("Y"))
                             name[i] = n;
                             address[i] = add;
                             tel[i] = t;
                             i++;
                        else if (answer.equals("n")||answer.equals("N"))
                             System.out.println("Record not saved.");
                             System.out.println();
                        else System.out.println("Invalid option!");
                             System.out.println();                    
                   } break;     

    This is a good place to start:
    http://java.sun.com/docs/books/tutorial/uiswing/index.html
    Kevin

  • WPF How can I implement the INotifyPropertyChanged in a Three-tier architecture?

    I am a student and I am confused on using the INotifyPropertyChanged in a three-tier style of coding. Can you guys help me a bit with these?
    I have a solution named MetroAppProject. It is composed of four projects (I omitted the using clauses and references, just imagine they are there and are working fine):
    1. MetroApp.BluePrints - a class library composed of the classes in my sql db
    An example of my class
    namespace MetroApp.BluePrints
        public partial class Patient
            public long Id { get; set; }
            public string PatientNumber { get; set; }
            public string LastName { get; set; }
            public string FirstName { get; set; }
            public string MiddleName { get; set; }        
            public string AddressLine1 { get; set; }
            public Nullable<short> CityId { get; set; }
    public string CityName { get; set; }
            public Nullable<short> ProvinceId { get; set; }
    public string ProvinceName { get; set; }        
    Then the second project:
    2. MetroApp.DataAccess = a class library composed of methods that calls my sql procedures. I used the SqlHelper class which contains the connection strings and other stuffs.
    example class
    namespace MetroApp.DataAccess
        public class PatientDb
    public Patient Retrieve(PatientParams parameters)
                SqlCommand command = new SqlCommand();
                Patient singItem = new Patient();
                command.CommandText = "RetrievePatients";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
                DataTable dt = SqlHelper.GetData(command);
                if (dt.Rows.Count > 0)
                    DataRow row = dt.Rows[0];
                    singItem.Id = TDefaultValue.GetInt(row["Id"].ToString());
                    singItem.PatientNumber = TDefaultValue.GetString(row["PatientNumber"].ToString());
                    singItem.LastName = TDefaultValue.GetString(row["LastName"].ToString());
                    singItem.FirstName = TDefaultValue.GetString(row["FirstName"].ToString());
                    singItem.MiddleName = TDefaultValue.GetString(row["MiddleName"].ToString());
                    singItem.AddressLine1 = TDefaultValue.GetString(row["AddressLine1"].ToString());
                    singItem.CityId = TDefaultValue.GetShort(row["CityId"].ToString());
                    singItem.CityName = TDefaultValue.GetString(row["CityName"].ToString());
                    singItem.ProvinceId = TDefaultValue.GetShort(row["ProvinceId"].ToString());
                    singItem.ProvinceName = TDefaultValue.GetString(row["ProvinceName"].ToString());
                return singItem;
            public List<Patient> RetrieveMany(PatientParams parameters)
                var items = new List<Patient>();
                var command = new SqlCommand();
                command.CommandText = "RetrievePatients";
                command.CommandType = CommandType.StoredProcedure;
                command.Parameters.AddWithValue("@Id", parameters.Id).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@PatientNumber", parameters.PatientNumber).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@LastName", parameters.LastName).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@FirstName", parameters.FirstName).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@MiddleName", parameters.MiddleName).Direction = ParameterDirection.Input;            
                command.Parameters.AddWithValue("@CityId", parameters.CityId).Direction = ParameterDirection.Input;
                command.Parameters.AddWithValue("@ProvinceId", parameters.ProvinceId).Direction = ParameterDirection.Input;
                DataTable dt = SqlHelper.GetData(command);
                foreach (DataRow row in dt.Rows)
                    var item = new Patient();
                    item.Id = TDefaultValue.GetLong(row["Id"].ToString());
                    item.PatientNumber = (row["PatientNumber"].ToString());
                    item.LastName = (row["LastName"].ToString());
                    item.FirstName = (row["FirstName"].ToString());
                    item.MiddleName = (row["MiddleName"].ToString());                
                    item.AddressLine1 = (row["AddressLine1"].ToString());
                    item.CityId = (short)row["CityId"].ToString();
                    item.CityName = (row["CityName"].ToString());
                    item.ProvinceId = (short)row["ProvinceId"].ToString();
                    item.ProvinceName = (row["ProvinceName"].ToString());
                    items.Add(item);
                return items;
            public bool Insert(Patient entity, int userId, ref bool doesExist)
                var command = new SqlCommand();
                try
                    command.CommandText = "AddPatient";
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
    command.Parameters.AddWithValue("@Id", entity.Id).Direction = ParameterDirection.Input;
                    command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
                    int result = SqlHelper.ExecuteNonQuery(command);
                    doesExist = (bool)(command.Parameters["@DoesExist"].Value);
                    entity.Id = (int)(command.Parameters["@Id"].Value);
                    if (result == 0 || doesExist)
                        return false;
                    return true;
                catch (Exception)
                    return false;
            public bool Update(Patient entity, int userId, ref bool doesExist)
                var command = new SqlCommand();
                try
                    command.CommandText = "EditPatient";
                    command.CommandType = CommandType.StoredProcedure;
                    command.Parameters.AddWithValue("@PatientNumber", entity.PatientNumber).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@LastName", entity.LastName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@FirstName", entity.FirstName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@MiddleName", entity.MiddleName).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@AddressLine1", entity.AddressLine1).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@CityId", entity.CityId).Direction = ParameterDirection.Input;
                    command.Parameters.AddWithValue("@ProvinceId", entity.ProvinceId).Direction = ParameterDirection.Input;
    command.Parameters.AddWithValue("@Id", SqlDbType.Int).Direction = ParameterDirection.Output;
                    command.Parameters.Add("@DoesExist", SqlDbType.Bit).Direction = ParameterDirection.Output;
    doesExist = (bool)(command.Parameters["@DoesExist"].Value);
                    int result = SqlHelper.ExecuteNonQuery(command);
                    if (result == 0 || doesExist)
                        return false;
                    return true;
                catch (Exception)
                    return false;
    Then a business logic
    3. MetroApp.BusinessLogic = class libray for calling the methods from DataAccess
    namespace MetroApp.BusinessLogic
        public class PatientMgr
            #region Fields
            private readonly PatientDb _db;
            #endregion
            #region Properties
            public Patient Entity { get; set; }
            public List<Patient> EntityList { get; set; }
            public PatientParams Parameters { get; set; }
            #endregion
            #region Constructors
            public PatientMgr()
                _db = new PatientDb();
                Entity = new Patient();
                EntityList = new List<Patient>();
                Parameters = new PatientParams();
            #endregion
            #region Methods
    public Patient Retrieve(PatientParams parameters)
                return _db.Retrieve(parameters);
            public List<Patient> RetrieveMany(PatientParams parameters)
                return _db.RetrieveMany(parameters);
            public bool Insert(Patient entity, int userId, ref bool doesExist)
                return _db.Insert(entity, userId, ref doesExist);
            public bool Update(Patient entity, int userId, ref bool doesExist)
                return _db.Update(entity, userId, ref doesExist);
            #endregion
    Then the last one, the WPF GUI
    <UserControl x:Class="MetroDentProject.Pages.PatientDetailsPage"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 xmlns:dims="clr-namespace:MetroAppProject.UserCons"
                 mc:Ignorable="d" 
                 d:DesignHeight="720" d:DesignWidth="1280">
        <Grid x:Name="MainGrid" >
            <Grid.RowDefinitions>
                <RowDefinition  Height="40"/>
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
                <RowDefinition  />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <GroupBox Grid.Column="0" Grid.Row="1" Grid.RowSpan="7" x:Name="DetailsGroupBox" Header="Patient Details" >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Id: " Grid.Column="1" Grid.Row="0" Visibility="Collapsed"/>
                    <TextBox x:Name="IdTextBox" Grid.Column="1" Grid.Row="1" Visibility="Collapsed"/>
                    <TextBlock x:Name="PatientNumberTextBlock" Text="Patient Number: " Grid.Column="0" Grid.Row="0" />
                    <TextBox x:Name="PatientNumberTextBox" Grid.Column="1" Grid.Row="0" IsReadOnly="True" IsReadOnlyCaretVisible="True"/>
                    <TextBlock Text="Last Name: " Grid.Column="0" Grid.Row="1" />
                    <TextBox x:Name="LastNameTextBox" Grid.Column="1" Grid.Row="1" />
                    <TextBlock Text="First Name: " Grid.Column="0" Grid.Row="2" />
                    <TextBox x:Name="FirstNameTextBox" Grid.Column="1" Grid.Row="2" />
                    <TextBlock Text="Middle Name: " Grid.Column="0" Grid.Row="3" />
                    <TextBox x:Name="MiddleNameTextBox" Grid.Column="1" Grid.Row="3" />
                </Grid>
            </GroupBox>
            <GroupBox x:Name="ContactDetailsGroupBox" Header="Contact Details" Grid.Column="1" Grid.Row="1" Grid.RowSpan="7">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition/>
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <TextBlock Text="Address: " Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" />
                    <TextBlock Text="City: " Grid.Column="0" Grid.Row="2" />
                    <TextBlock Text="Province: " Grid.Column="0" Grid.Row="3"/>
                    <TextBox x:Name="AddressTextBox" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
                             TextWrapping="Wrap"
                             AcceptsReturn="True"
                             VerticalScrollBarVisibility="Auto"
                             />
                    <ComboBox x:Name="CitiesComboBox"  Grid.Column="1" Grid.Row="2"  />
                    <ComboBox x:Name="ProvincesComboBox"  Grid.Column="1" Grid.Row="3" />
                </Grid>
            </GroupBox>
            <dims:FunctionButtonsControl x:Name="FunctionButtonsCon" Grid.Row="9" Grid.Column="0" Grid.ColumnSpan="2"
                                         ExecuteClick="FunctionButtonsCon_OnExecuteClick"
                                         UndoClick="FunctionButtonsCon_OnUndoClick"
                                         BackClick="FunctionButtonsCon_OnBackClick"
                                         DeleteClick="FunctionButtonsCon_OnDeleteClick"
                                         />
        </Grid>
    </UserControl>
    I apologize for the long post. As you can see, I don't use binding. Binding requires me to use INotifyPropertyChanged interface which I am not familiar. Can you at least make my project to implement the INotifypropertyChanged?
    Here is my sample code for the WPF page:
    public partial class PatientDetailsPage 
            readonly PatientMgr itemMgr = new PatientMgr();       
            public PatientParams CurrentPar = new PatientParams(); // for undoActionType _action = ActionType.Insert; // this is an enum from another project, ActionType.Insert, ActionType.Update
            public ActionType Action
                get { return _action; }
                set { _action = value; }
            public PatientDetailsPage()
                InitializeComponent();
                BindComboBoxes();
            #region Methods
            public void OnFragmentNavigation(FragmentNavigationEventArgs e)
            public void OnNavigatedFrom(NavigationEventArgs e)
            public void OnNavigatedTo(NavigationEventArgs e)
            {            Setup();
            public void OnNavigatingFrom(NavigatingCancelEventArgs e)
            public Patient GetPageEntity()
                Patient setEntity = new Patient();
                setEntity.Id = (long)IdTextBox.Text;
                setEntity.PatientNumber = PatientNumberTextBox.Text;
                setEntity.LastName = LastNameTextBox.Text;
                setEntity.FirstName = FirstNameTextBox.Text;
                setEntity.MiddleName = MiddleNameTextBox.Text;
                setEntity.AddressLine1 = AddressTextBox.Text;
                setEntity.CityId = (short)CitiesComboBox.SelectedValue);
                setEntity.ProvinceId = (short)ProvincesComboBox.SelectedValue;
                setEntity.StatusId = true;
                return setEntity;
            public void Setup()
                switch (Action)
                    case ActionType.Insert:
                        Clearer(); //clears all textboxes and set all comboboxes to default
                        this.PatientNumberTextBlock.Visibility = Visibility.Collapsed;
                        this.PatientNumberTextBox.Visibility = Visibility.Collapsed;
                        FunctionButtonsCon.ExecuteButton.Content = "Add";
                        FunctionButtonsCon.DeleteButton.IsEnabled = false;
                        FunctionButtonsCon.DeleteButton.Visibility = Visibility.Hidden;
                        break;
                    //**Setup Update
                    case ActionType.Update:CurrentPar.Id = (long)IdTextBox.Text;
                        LoadSingle(CurrentPar);
                        this.PatientNumberTextBlock.Visibility = Visibility.Visible;
                        this.PatientNumberTextBox.Visibility = Visibility.Visible;
                        FunctionButtonsCon.ExecuteButton.Content = "Save";
                        FunctionButtonsCon.DeleteButton.IsEnabled = true;
                        FunctionButtonsCon.DeleteButton.Visibility = Visibility.Visible;
                        break;                
                LastNameTextBox.CaretIndex = LastNameTextBox.Text.Length;
                IsVisibleChanged += AutoFocus;
            public void LoadSingle(PatientParams parameters)
                var entity = itemMgr.Retrieve(parameters); //calls the BusinessLogic
                IdTextBox.Text = (entity.Id);
                PatientNumberTextBox.Text = (entity.PatientNumber);
                LastNameTextBox.Text = (entity.LastName);
                FirstNameTextBox.Text = (entity.FirstName);
                MiddleNameTextBox.Text = (entity.MiddleName);
                AddressTextBox.Text = (entity.AddressLine1);
                CitiesComboBox.SelectedValue = (short)entity.CityId;
                ProvincesComboBox.SelectedValue = (short)entity.ProvinceId;
            public void Save(ActionType action, int userId)
                itemMgr.Entity = GetPageEntity();
                bool doesExist = false;
                switch (action)
                    case ActionType.Insert:
                        if (itemMgr.Insert((itemMgr.Entity), userId, ref doesExist))
                            System.Windows.Forms.MessageBox.Show("Successfully added a Patient!", "Patient Insertion");                  
                        else if (doesExist)
                            System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Insertion");
                        else
                            System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Insertion");
                        break;
                    case ActionType.Update:
                        if (itemMgr.Update(itemMgr.Entity, userId, ref doesExist))
                            System.Windows.Forms.MessageBox.Show("Successfully updated a Patient!", "Patient Modification");
                            itemMgr.Parameters.Id = itemMgr.Entity.Id;
                            Action = ActionType.Update;
                            Setup();
                        else if (doesExist)
                            System.Windows.Forms.MessageBox.Show("Item already exists.", "Patient Modification");
                        else
                            System.Windows.Forms.MessageBox.Show("Not all fields were filled in.", "Patient Modification");
                        break;                
            public void Clearer()
                IdTextBox.Clear();
                PatientNumberTextBox.Clear();
                LastNameTextBox.Clear();
                FirstNameTextBox.Clear();
                MiddleNameTextBox.Clear();
                CitiesComboBox.SelectedIndex = 0;
                ProvincesComboBox.SelectedIndex = 0;
                AddressTextBox.Clear();            
            public void BindComboBoxes()
                CitiesComboBox.ItemsSource = new BindingSource(CommonMgr.GetCitiesDropDown(), null);// the CommonMgr is a static class from another project. It works just fine
                CitiesComboBox.DisplayMemberPath = "Value";
                CitiesComboBox.SelectedValuePath = "Key";           
                ProvincesComboBox.ItemsSource = new BindingSource(CommonMgr.GetProvincesDropDown(), null);
                ProvincesComboBox.DisplayMemberPath = "Value";
                ProvincesComboBox.SelectedValuePath = "Key";
                CitiesComboBox.SelectedIndex = 0;
                ProvincesComboBox.SelectedIndex = 0;
            #endregion
            #region Events
            private void FunctionButtonsCon_OnExecuteClick(object sender, RoutedEventArgs e)
                Save(Action, SessionHelper.MyUser.Id); //SessionHelper.MyUser.Id
            private void FunctionButtonsCon_OnUndoClick(object sender, RoutedEventArgs e)
                if (Action == ActionType.Insert)
                    Clearer();
                    return;
            private void FunctionButtonsCon_OnBackClick(object sender, RoutedEventArgs e)
                Exiter();
            private void FunctionButtonsCon_OnDeleteClick(object sender, RoutedEventArgs e)
                var ans = System.Windows.Forms.MessageBox.Show("Are you sure you want to delete this entry?", "Patient Deletion", MessageBoxButtons.YesNo);
                if (!Equals(ans, System.Windows.Forms.DialogResult.Yes)) return;
                Action = ActionType.Delete;
                Save(Action, SessionHelper.MyUser.Id);
                Exiter();
            #endregion

    Hello Kokombads,
    I thought you are using MVVM from your title but it seems your project is just a simple WPF project. In that way, please check the following msdn article to know how to Implement Property Change Notification
    https://msdn.microsoft.com/en-us/library/ms743695(v=vs.110).aspx
    using System.ComponentModel;
    namespace SDKSample
    // This class implements INotifyPropertyChanged
    // to support one-way and two-way bindings
    // (such that the UI element updates when the source
    // has been changed dynamically)
    public class Person : INotifyPropertyChanged
    private string name;
    // Declare the event
    public event PropertyChangedEventHandler PropertyChanged;
    public Person()
    public Person(string value)
    this.name = value;
    public string PersonName
    get { return name; }
    set
    name = value;
    // Call OnPropertyChanged whenever the property is updated
    OnPropertyChanged("PersonName");
    // Create the OnPropertyChanged method to raise the event
    protected void OnPropertyChanged(string name)
    PropertyChangedEventHandler handler = PropertyChanged;
    if (handler != null)
    handler(this, new PropertyChangedEventArgs(name));
    It is not so complex, you only need to refer to the interface from here:
    https://msdn.microsoft.com/en-us/library/system.componentmodel.inotifypropertychanged(v=vs.110).aspx
    And understand that you have to do the following:
    For change notification to occur in a binding between a bound client and a data source, your bound type should either:
    Implement the INotifyPropertyChanged interface (preferred).
    Provide a change event for each property of the bound type
    Best regards,
    Barry
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Help required building ADF-Swing/ADF-Faces using ADF Business Components

    My question is in regards to how you can go about building a light swing application to an ADF model?
    In particular if I were to say that we were developing a 3-tier project whereby we had a database tier, a series of EJB-ADF façade session beans to the database (middle-tier), and a swing client communicating with the session beans (view-controller tier), how would you go about developing these screens?
    In particular can we develop these screens using ADF-Faces and also ADF-Swing?
    The EJB session façade beans of course are ADF app modules with customised methods. The methods would return back customised DTO objects. These DTO objects are wrappers to row objects ADF would create. This would be mainly due to making these facade beans web service enabled (Oracle state that these methods cannot return oracle.jbo objects if they are to be web service enabled).
    This would be typically deployed to an app server, like Oracle App Server 10G.
    Could you please have a look at this, as I am doing a lot of research into this.
    eg. Taking example from oracle magazine sept/oct 2006
    with slight enhancements
    package oramag.frameworks.example.common;
    import oracle.jbo.ApplicationModule;
    import oramag.frameworks.customdto.EmployeeDTO;
    public interface HRService extends ApplicationModule {
    void deleteCurrentEmpAndCommit();
    EmployeeDTO findEmployee(int employeeId); // new method
    import oramag.frameworks.customdto.EmployeeDTO;
    public class HRServiceImpl extends ApplicationModuleImpl {
    public void deleteCurrentEmpAndCommit() {
    Row empRow = getEmpView().getCurrentRow();
    if (empRow != null) {
    empRow.remove();
    getDBTransaction().commit();
    public EmployeeDTO findEmployee(int employeeId)() {
    EmployeeDTO employeeDTO = null;
    EmployeesImpl employees = getEmployees();
    employees.setNamedWhereClauseParam("EmployeeId", employeeId);
    employees.executeQuery();
    if(employees.hasNext()) {
    EmployeesRowImpl employee = (EmployeesRowImpl)employees.next();
    employeeDTO = new EmployeeDTO(employee);
    return employeeDTO;
    public EmployeesImpl getEmployees() {
    return (EmployeesImpl)findViewObject("Employees");
    Now given the above code snippet, how could you turn this into an ADF-Swing/ADF Faces application so that if a user using the swing application enters an employee id, then the application will execute the query on the app server, the app server in turn returns the results to the client, and the client finally display the results. Typical MVC example.
    Cheers
    Rodney

    The tutorial is for ADF BC used with JavaServer Faces.
    While the tutorial doesn't cover it, we also support drag and drop development for Swing and visual WYSIWYG layout for Swing panels and windows, too. For a very simple example, watch screencast #4 on my blog here:
    http://radio.weblogs.com/0118231/stories/2005/06/24/jdeveloperAdfScreencasts.html
    One thing I have noticed is that when using ADF business components, when the app module returns a custom DTO object like the above example, it returns the data in a element structure according to the data control palette.
    You don't generally ever need to create your own custom DTO's when working with ADF for use by client UI's. The only situation where can be necessary -- until we simplify this in the JDeveloper/ADF 11g release -- is when you desire to expose custom methods that can return sets/arrays of typed row structures through a web service. However, web services are not involved/required in building 3-tier Swing applications.
    When dropping onto a page it does so like a string and doesnt give option to display the data in a read only form etc. Is there anything we need to do, to get the functionality.
    It's more of what you don't need to do :-)
    Just leverage the active data model that the ADF application module provides. You can read more about it in section 4.5 "Understanding the Active Data Model" of the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html). Your UI's bind to view object instances in the data model, and your UI's are automatically kept up to date without needing to write methods that return data. I short article I wrote that preceeded my writing the ADF Developer Guide content on this topis is here:
    http://radio.weblogs.com/0118231/stories/2006/01/26/theAdfBusinessComponentsActiveDataModel.html
    I know that when dropping a view object you get this functionality. Also was wondering if we were to pass an object of thios type back to the model it might not give us the rich functionality like input forms, like what Oracle provides if we were to drop a enitity view object.
    Just use the active data model and everything becomes totally easy, with no changes required to switch between local or three-tier deployment configurations.
    Trying to do everything with hand-coded DTO beans is really going the hard way.
    Could you help us regarding this?

  • How to use  ADF application functionality in Webcenter Portal

    Hi,
    We have an separate ADF application with bunch of functionality that are been using in others applications.We have to use these functionality in the WebCenter portal.
    In this ADF application, each jspx page used for implementing different functionality(for example Calendar for one page, subscriptions for one page like that) and there are no bounded task flow used.
    Challenge here is, need to some how import the ADF application as reusable component (section) and yet to use different functionality (I mean accessing each jspx page)
    So, what are the ways we can utilize these ADF functionality in WebCenter portal? Let me know your thoughts?
    Any help really appreciated.
    Thanks,
    San.

    All,
    if you have WebCenter in place the best way is to use the ADF portlet bridge. You can create portlet entries at design time in JDev on each JSPX as well as on any TaskFlow definition (right click as mentioned above). That's quite convenient if you stay in the WebCenter / ADF world. You'll get the standalone as well as the portletized application so the standalone version will still be working. Mind that if you portletize an ADF Application you need to deploy it in a portlet runtime. That means you need to extend your ADF container with the portlet runtime. That requires a WebCenter license for the server since the portlet runtime is a part of the WebCenter product stack.
    In respect of SSO, after deploying your Portlet Producer App you'll get WSRP Webservices on application level for which you can apply OWSM policies (Enterprise Manager) so the identity of the portal will be propagated to the Portlet Producer App. Details can be found on WebCenter Portal Developer's Guide.
    Just to let you know that these portlets can be only consumed on Oracle's portals (be that WebCenter or Oracle Portal 11g). That's caused by some Oracle specific WSRP additions to the ADFPortlet Bridge.
    Jiri, what do you mean with "enhance it with portal features"? Oracle's portlet aproach is fully based on WSRP, means decoupling. So you cannot add portal features to the portlet. Everything has to be packed in request and response. There's no direct access to portal /portlet resources to interact with.

Maybe you are looking for