Dynamic UI using JavaBeans?

Hi,
Several years ago I created a Windows application where the complete UI was dynamically created depending upon the ActiveX components that the container application found registered on the system.
Does anyone know if this kind of thing can be achieved using JavaBeans ?
I have a feeling that it can, but I cannot find any documentation or samples of this kind of thing being done.
To this end I have a couple of questions. Any help would be greatly appreciated.
1. Does anyone know how a Java container client application can detect which beans are "registered" on the system.
2. Is there even a "registration" even for beans ?
3. How about "un-registering" beans ?
4. Given that a registered bean CAN be detected by the application, can the bean make modifications to the container, for example, adding menu and toolbar items specific to that bean?
Thanks
FC

Several years ago I created a Windows application
where the complete UI was dynamically created
depending upon the ActiveX components that the
container application found registered on the system.Arranged in what manner? If I had a Button ActiveX component "registered" on my system, how would it know that my current UI needed ten buttons? How would it lay them out in the panel?
Does anyone know if this kind of thing can be achieved using JavaBeans ?Registration = Windoze registry? There's the Preferences API.
I have a feeling that it can, but I cannot find any documentation or samples of this kind of thing being
done.
To this end I have a couple of questions. Any help
would be greatly appreciated.
1. Does anyone know how a Java container client application can detect which beans are "registered" on
the system.I'd be able to answer if I understood what "registered" really meant.
2. Is there even a "registration" even for beans ?See previous answer.
3. How about "un-registering" beans ?See previous answer.
4. Given that a registered bean CAN be detected by the application,
can the bean make modifications to the
container, for example, adding menu and toolbar items
specific to that bean?I don't see how a Bean can know how to modify ten completely different containers. A single registration can't possibly handle every disparate UI that comes along.
You sound like you need something along the lines of a UIBuilder class that could take some kind of descriptor and create a UI panel from it. That descriptor could be held in a properties or XML descriptor file as well as a registry. The UIBuilder would have to read the descriptor and pump out the UI panel that you wanted.
Perhaps I don't understand the Windoze registry that you're talking about, but I don't see how it can possibly handle arbitrarily complex UIs.
Somebody else was just asking about this kind of thing yesterday. I'll see if I can find the link.

Similar Messages

  • How to use javabean

    can anyone can have a easy understand explain for how to use javabean?
    for example, if i am going to have a bean named "Dog", which will can speak "blah blah blah". what is the procedure to get it work?
    thanks

    Hi.
    I'm not quite sure what you're asking, but I'll give it a shot at a simple explanation. Let's say you create a Dog bean. A Bean is really just a Class that follows some general rules and naming conventions to make interpreting of the exported interface easier.
    The Java Beans specification says that the Dog bean should be serializable - That is, you can modify the values in the fields of Dog (i.e., you could change it's breed, or it's name, or it's owner, or what ever other fields you have), and write it out to a file, and load it back at a later time, and these fields would still have memory of the changes you made earlier. This is called persistance.
    Further to this, a bean declares properties as fields xxx that have matching methods getXxx and setXxx. Let's say you wish to have several dogs, one that speaks "arf", one that says "ruff", another that says "woof", one that says "yip yip, one that says "bow wow", and finally, one that says "yo quiero Taco Bell". Then, you would have a property called word that would be defined in the following way:
    private String word;
    public void setWord(String word) { this.word = word; }
    public String getWord() { return word; }Then, using your favourite Bean box or design tool, you would create several dogs, and set the word differently for each one.
    The code for speak would be this:
    public void speak() { System.out.println(word); }The benifit provided using the beans conventions of getXxx and setXxx allows the Bean Box to determine that there is a property called word, and that you can set this property to allow you to change the word that is spoken without overwriting the speak method.
    I'll say this again, becuase this is important: Anything that can be done with beans can be done without. The advantage to using beans is that a tool like a bean box, or the Introspector class, can dynamically determine which fields provided by a class are intended for use by another external class, AND which methods are used to set or retrieve the values of those fields.
    For example, you could define the same property with the following code:
    public String word;
    public void changeToNewWord(String word) { this.word = word; }
    public String whatDoesItSay() { return word; }The problem with this code, however, is that an introspector or bean box would have ABSOLUTELY NO IDEA that the changeToNewWord method is the method that should be called to set the property word.
    That's the basic idea. It goes much further than this, as you can then define events, such as the SawAnotherDogEvent that cause the bean to call the method speak. Also, you could create a custom bean info class that would tell the introspector that the changeToNewWord method was the setter method for word. The whole point is to provide extra information about you're class so that it can be recognized by some other coding as certain types of fields.
    To find out more, there is an excellent tutorial for Beans on the java developer website (java.sun.com), and the Beans specification is also there. Hope this helps you out. Good Luck!

  • How to get the list of values for a dynamic parameter using Web Services SDK?

    <p>I am struggling to get the list of values for a dynamic parameter of a report.</p><p>I am using Java Web Services SDK ... I tried to use PromptInfo.getLOV().getValues() method but it does not work.</p><p>First of all ... is this possible (to get the list of values for a dynamic param) using Web Services?</p><p>Second of all, if this is possible, how should I do it ... it seems it works fine when running the report from CMC. It asks for DB logon info and after that it provides a list of values.</p><p>Thx </p>

    <p>Your assumption is correct. We are trying to get the LOVs from the Crystal Report. I was not aware that this is not supported by Web Services SDK.</p><p>We used Web Services SDK to integrated the Crystal Reports in our web application. We implemented some basic actions for reports: schedule, view instances, run ad-hoc reports.</p><p>We encountered this problem when trying to run/schedule reports with dynamic parameters (a list of values from DB). We were unable to get the LOVs.</p><p>Please let me know if you can think of an alternative to look at.</p><p>Thanks a lot,</p><p>Catalin </p>

  • How to create a viewobject dynamically without using wizard

    Hi,
    I am Using jDEV 11G, i need to create a viewobject dynamically without using wizard, without binding from any entity.
    Actually my intention is to make a grid like in .Net, when a user want to create a new row in RichTable without using DB.
    just like shopping cart.
    i have done thsi code:
    ViewObjectImpl view=new ViewObjectImpl();
    view.addDynamicAttributeWithType("Att1","String",null);
    view.addDynamicAttributeWithType("Att2","String",null);
    view.addDynamicAttributeWithType("Att2","String",null);
    Row rw=view.createRow();
    rw.setAttribute("Att1","First1");
    rw.setAttribute("Att2","First2");
    rw.setAttribute("Att2","First3");
    view.insertRow(rw);
    I have a RichTable , i need bind this viewobject into that.
    Edited by: vipin k raghav on Mar 10, 2009 11:39 PM

    Hi Vipin,
    You can create the view object with rows populated at run time.
    [http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcquerying.htm#CEGCGFCA]
    For reference of how to create an empty rwo at run time on button click
    [http://kohlivikram.blogspot.com/2008/10/add-new-row-in-adf-table-on-button.html]
    ~Vikram

  • Question regarding the creation of a custom dynamic stamp using "Will Print" from "Set Doc. Actions

    Hi all,
    Using Acrobat 9.0 Professional, I have successfully created a dynamic stamp using the forums where I have added Login / Date to my own image and it works great as designed.  However, the problem I am having is that when a document is stamped it becomes flat and doesn't update dynamically which does not work for my requirements.
    I need to create a pdf that is stamped by myself so that other users (using only Reader) can open the pdf and when printed the stamp will print with the correct date/time (in the format I describe below).
    I found a workaround (outside of a stamp) where I added a text box (called "Today") that updates everytime the document is printed by going to
    Advanced / Document Processing / Set Document Actions / Document Will Print
    and adding the following Java Code:
    var f = this.getField("Today");
    f.value = util.printd('yyyymmddhMMss', new Date());
    This provides me with the unique number that I need for printing  (ie: 20100317102030).  It works great as an inserted text field on my pdf.
    My problem is that when I use the "create custom stamp" as in other tutorials by inserting this new text field, it will not update (or display) on print, even though it was set the exact same way as the custom stamp I got working using the Adobe dynamic stamp information.
    Can you offer any advice on how I can get this to work as a custom stamp?  I would rather not have to create both a stamp and then overlay the text field manually as I have hundreds of documents (maybe more) to do this for.
    Also, as an aside, if I could get this to work, I would also like to add Login ID that updates in the same manner as my custom date format (but one problem at a time I guess! )
    Thanks for any and all help that you can provide.  I looked through these forums and elsewhere, but I don't seem to see anyone else with the same problems (with solutions posted).
    I really wish Adobe had a Custom Stamp creator as part of their program, with the dynamic option.  It would be so easy for them and save a lot of users so much time.

    Stamps are just like a inked rubber stamp, except in Acrobat you can suppress printing them and you can move them. So if you use a dated "Faxed" stamp when you fax a document, even though you can adjust the stamp before affixing the stamp, once the document is stamped the date on the document can not be changed or moved. It appears, that the use of a stamp might not be the best solution.
    "Interactive" means Acrobat JavaScript programing.
    With JavaScript not only can you insert variable data but also fixed text strings or a combination of both.
    So your script could be updated to something like:
    var f = this.getField("Today");
    f.value = "Printed : " + util.printd('yyyymmddhMMss', new Date());
    http://forums.adobe.com/message/1333261#1333261
    Getting the 'login name" will require some special JavaScript code being added to an application level JavaScript folder that runs upon initialization and is the data or function created is then accessed  by your PDF. This file will need to be installed on each user's system.
    http://www.acrobatusers.com/forums/aucbb/viewtopic.php?pid=30444

  • With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?

    With a PDF Dynamic form using show/hide actions, how to ensure that when the completed form is saved, closed and re-opened, the form still show the fields as before it was closed?
    I have developed a form with fields hidden by default, that become visible based on box ticked or radio button selections.
    My problem is that, when I close the form and re-open it, it comes back to it's default presentation, regardless of the information already recorded in the form (including in the now hidden fields.
    How to correct that
    Thanks in advance for any hint you can provide.

    I've had the same problem. This solved it...
    Go to the "Form properties..." in the File-menu. Select "Run-time" to the left and in the box "Scripting" Preserve scripting changes to form when saved: choose Automatically (Script-based state changes are saved locally in an insecure fashion. This option cannot be used for certified forms).
    Hope it works for you to...

  • Using JavaBeans in a JSP Page

    I wan't to know the advantages and disadvantages of using JavaBeans in a JSP page.
    Like for example general traditional approach for a database connection
    is to create a connection and access the database from that and close the connection
    at the end of the page, instead of the If I use a common connection bean for making connections,
    is that suggestable and then when should i close the connection then.
    One good application of JavaBeans is using a Set and Get methods for form fields in
    a registration form to get back the values.
    So may i know how best can we use the JavaBeans other than this application.
    ThanX in advance,
    kiran
    [email protected]

    I believe putting processing and query code in the JavaBean was one of the reasons for putting JavaBeans support in JSP in the first place. The original idea was to use the setXXX methods to populate the bean's data from the posted form, then do the processing (or database query), then use the getXXX methods to display the bean's data.
    Efficiency-wise, it's exactly the same as putting all the code in-line in the JSP page (actually, it might be a bit slower, because of the reflection required to do it.) Code-wise though, it makes the JSP easier to read.
    Of course, we have EJBs now too, which tie very closely and can match database queries almost one-to-one, one way to incorporate these is inside the JavaBean you reference from the JSP, another way from a servlet you redirect the JSP to, etc...

  • How to use javabean in forms e.g.Jcalender in forms?

    hey all....
    I am using FORMS 10G and java plug-in 1.4.2 for adding javabean in forms and fallowing changes
    1) Installed JRE 1.4
    2)copied Jcalender.jar in /forms/java
    3)edit /forms/server/formsweb.cfg as fallows
    baseHTMLjpi=basejpi.htm
    archive=frmall.jar,Jcalender.jar
    jpi_download_page=http://java.sun.com/products/archive/j2se/1.4.2_06/index.html
    jpi_classid=clsid:CAFEEFAC-0014-0002-0000-ABCDEFFEDCBA
    jpi_codebase=http://java.sun.com/products/plugin/autodl/jinstall-1_4_2-win.cab
    jpi_mimetype=application/x-java-applet;jpi-version=1.4.2
    4)load module Jcalender.fmb in form builder
    5)Register the path of 'Jcalender.jar' file where it is stored, in 'FORMS_BUILDER_CLASSPATH'
    5)import java class 'Jcalender.jar' from Program in menu bar
    6)Then it give an exception
    Importing Class oracle.forms.fd.Jcalender...
    Exception occurred: java.lang.UnsupportedClassVersionError: oracle/forms/fd/Jcalender (Unsupported major.minor version 49.0)
    help will be appreciated..plz
    Thank in advance..

    Hi..
    Thanks 4 ur suggestion.
    I am using forms 10.1.2.0.2.i am compiling it on my local m/c.
    Jcalender is not working but the method of all javabean is almost same.
    i can use laf.jar with template 'laf_template.fmb.
    will u plz tell me the steps to use javabean(with plugin ) and suggest the version.
    thanks a lot. Expecting reply..
    bye..

  • How to send an entire HTML, PHP dynamic page using phpmail()?

    How to send an entire HTML, PHP dynamic page using phpmail()
    from PHP website, similar to mail this page or send to a friend
    link?

    Hello,
    Please change the mail address
    "info[at]furkids[dot]co[dot]za" from this thread ^^^look above^^^
    to "[email protected]"
    Thank you

  • How to create a dynamic newsflash using dreamweaver and PHP

    Hi there,
       I would like to create a dynamic newsflash using dreamweaver and PHP in that the newsflash will be pulling information from a MySQL database. The newsflash should also have a link to view more information about the piece of news a user wants to know more about. Which tools do I need to use in dreamweaver and how's the procedure to go about that. Any advice is highly appreciated. Thanx in advance!

    I think you´ll need at least a MySQL table with the following columns:
    - id (primary key, int, auto_increment etc)
    - news_headline (varchar)
    - news_teaser (text)
    - news_content (text)
    What I´d personally add are columns such as:
    - news_date (date or datetime)
    - news_external_link (varchar), if a "read more..." link is supposed to navigate to an external URL rather than displaying the contens of the "news_contents" column.
    Based on such a MySQL table it should be easy to use Dreamweavers standard Server Behaviors to create the usual datalist.php, insert.php, update.php and delete.php documents, and there are numerous tutorials out there which will teach you how to do that.
    Am I right when assuming that you´ll also need to know how to automatically pull, say, the 5 most recent news records from the database ?

  • How to create two level dynamic list using JSP , Java Script and Oracle

    I am new in JSP. And i am facing problem in creating two level dynamic list using JSP ,Java Script where the listdata will come from Oracle 10g express edition database. Is there any easy way in JSP that is available on in ASP.NET.
    Plz response with details.

    1) Learn JDBC API [http://java.sun.com/docs/books/tutorial/jdbc/index.html].
    2) Create DAO class which contains JDBC code and do all SQL queries and returns or takes ID's or DTO objects.
    3) Learn Servlet API [http://java.sun.com/javaee/5/docs/tutorial/doc/].
    4) Create Servlet class which calls the DAO class, gets the list of DTO's as result, puts it as a request attribute and forwards the request to a JSP page.
    5) Learn JSP and JSTL [http://java.sun.com/javaee/5/docs/tutorial/doc/]. Also learn HTML if you even don't know it.
    6) Create JSP page which uses the JSTL c:forEach tag to access the list of DTO's and iterate over it and prints a HTML list out.
    You don't need Javascript for this.

  • Using javabean in tomcat(unable to compile class)

    Hello, I am using jakarta-tomcat-5.0.28, OS:WinXP
    I am getting the following error when i use javabean in tomcat (the example is executed just fine in another web server:Blazix)
    I am very new to this (JSP, Servlets and tomcat) so any help would be greatly appreciate.
    THE ERROR IS:
    ==============================================================
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: Unable to compile class for JSP
    An error occurred at line: 1 in the jsp file: /SaveName.jsp
    Generated servlet error:
    C:\Programs\internet\jakarta-tomcat-5.0.28\work\Catalina\localhost\JSPSession\org\apache\jsp\SaveName_jsp.java:42: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.SaveName_jsp
    UserData user = null;
    ^
    An error occurred at line: 1 in the jsp file: /SaveName.jsp
    Generated servlet error:
    C:\Programs\internet\jakarta-tomcat-5.0.28\work\Catalina\localhost\JSPSession\org\apache\jsp\SaveName_jsp.java:44: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.SaveName_jsp
    user = (UserData) jspxpage_context.getAttribute("user", PageContext.SESSION_SCOPE);
    ^
    An error occurred at line: 1 in the jsp file: /SaveName.jsp
    Generated servlet error:
    C:\Programs\internet\jakarta-tomcat-5.0.28\work\Catalina\localhost\JSPSession\org\apache\jsp\SaveName_jsp.java:46: cannot resolve symbol
    symbol : class UserData
    location: class org.apache.jsp.SaveName_jsp
    user = new UserData();
    ^
    3 errors
         org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
         org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332)
         org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.
    ===============================================================
    ERROR END
    I use the folowing files:
    GetName.html
    SaveName.jsp
    NextPage.jsp
    UserData.java
    My Dir Structure is:
    /JSPSession
        GetName.html
         SaveName.jsp
         NextPage.jsp
       /WEB-INF
          /classes
             UserData.java
             UserData.class
       /libThe Code for the files is:
    GetName.html
    <HTML>
    <BODY>
    <FORM METHOD=POST ACTION="SaveName.jsp">
    What's your name? <INPUT TYPE=TEXT NAME=username SIZE=20><BR>
    What's your e-mail address? <INPUT TYPE=TEXT NAME=email SIZE=20><BR>
    What's your age? <INPUT TYPE=TEXT NAME=age SIZE=4>
    <P><INPUT TYPE=SUBMIT>
    </FORM>
    </BODY>
    </HTML>---------------------------------------------------------------------------------------------------
    SaveName.jsp
    <jsp:useBean id="user" class="UserData" scope="session"/>
    <jsp:setProperty name="user" property="*"/>
    <HTML>
    <BODY>
    <A HREF="NextPage.jsp">Continue</A>
    </BODY>
    </HTML>-----------------------------------------------------------------------------------------------------
    NextPage.jsp
    <jsp:useBean id="user" class="UserData" scope="session"/>
    <HTML>
    <BODY>
    You entered<BR>
    Name: <%= user.getUsername() %><BR>
    Email: <%= user.getEmail() %><BR>
    Age: <%= user.getAge() %><BR>
    </BODY>
    </HTML>------------------------------------------------------------------------------------------------------------
    UserData.java
    public class UserData {
        String username;
        String email;
        int age;
        public void setUsername( String value ) {
            username = value;
        public void setEmail( String value ) {
            email = value;
        public void setAge( int value ) {
            age = value;
        public String getUsername() { return username; }
        public String getEmail() { return email; }
        public int getAge() { return age; }
    }

    A very common question. Tomcat dislikes classes which are not packaged. So, add a package statement in your UserBean.java
    package beans; // or something like thatand then place the compiled class file UserBean.class into WEB-INF/classes/beans.
    Put the import statement into the JSP accordingly and try again.
    ***Annie***

  • How to make dynamic actions using Set Value work in all browsers?

    I’m having a cross-browser incompatibility issue with dynamic actions using Set Value.  The dynamic action works like a charm on Chrome but has no effect on either IE or Firefox.  The code in oracle.apex.com and here are the credentials:
    Workspace: DDBA
    Username: [email protected]
    Password: redtruck12
    These code is on page 3 and here are the details:
    There are two report lists (Standard and Special) and some of the reports require additional information supplied in either select lists or text boxes.
    If the user selects a Standard report requiring a select list/text box, then the dynamic action sets the value of Special Reports to NULL (and vice-versa).
    The dynamic action is to prevent a simultaneous selection of both the Standard and Special reports.  To see how it works on Chrome, do this:
    Run Page 3
    Select the ‘Report for Search Criteria’ option from the Standard Report list.  A ‘Search Criteria’ text box appears
    Select the ‘Report by Release’ option from the Special Reports list.  A select list appears and the ‘Search Criteria’ text box disappears.
    If you do the same things on IE or Firefox, the text box does not disappear. 

    Hi,
    Things are going wrong with setting the item values to NULL. If you check your session state, you'll see that in chrome your items values indeed will be set to null, but in firefox they won't.
    Also I've noticed that you don't reset the other input fields, so their values persist in the session state. Since you submit your page every time you change one of the report select lists, this might lead to unexpected behaviour. Lastly, I've noticed you use a sql exists expression to manage the display/hide of your page items. A condition of type "Value of  expression 1 = expression 2" causes less overhead as you don't need to switch to the db sql engine for every item to validate.
    I'd suggest you rethink your specs and try to create:
    - One dynamic action (since a value of standard select excludes the value of special select, and vice versa)
    - Set the values for hidden items to null, also in session state
    - Use a refresh of region as extra event in your dynamic action, instead of submitting your page for every change.
    Regards,
    Vincent
    http://vincentdeelen.blogspot.com

  • How to use JavaBean in Form Builder 6i

    Hi,
    How to use JavaBean in Form Builder 6i (Oracle Developer 6i)?.
    i'am using Oracle Sever 8.0.4 and Oracle Developer 6i.
    Please give your valuable suggestion
    Regards
    Seema

    I would suggest you start with the sample Java bean code we have
    on otn.
    http://otn.oracle.com/products/forms
    go to the sample code section.

  • Dynamic Routing Using Query String (SOAP)

    Hi Folks,
    Does anyone have any examples on how to do a dynamic routing using a query string from a SOAP Adapter. I know how to get the query string but don't know how to map for dynamic routing.
    Thanks,
    AArhyn.

    After some further examination it seems that both calls are picked up by the same interface. In the RWB both the messages are picked up by the MIOS_GetDetails...
    How can i fix this?

Maybe you are looking for

  • At my wits end - HELP!!!!

    After 22 total restores and many many crashes and quits I brought the iPhone 3G to the Genius Bar, they replaced it without questions when I told them what was happening making me think I was NOT alone (although, the Apple Forums are FULL of problems

  • UPGRADE G5

    hello guys, I have a small question to ask, but first I must apologize for my English, I have the powerpc g5, dual processor 2.3GHz, with 16 gb ram, 1 samsung solid state drive with 250 GB, and other samsung sata with 500 gb, it's good but i like mor

  • How can I share a photo slideshow

    How can I share a photo slideshow?

  • 10.6.5 update went well except....

    now my second monitor is darker? I tried several setting and re calibrated, but it is just darker than it was before and i cannot get it back to what it was??? I think i read the issue from someone else, but that was hours ago and probably 100 clicks

  • ACE: buffer issue?

    Hi all, I implemented an ACE for "ACCOUNTCRM" and event background job is triggered to update the trace table whenever an account is created. However, I notice that the results return is incorrect due to some buffer issue which i suspect. My scenario