Example of use of table on visual web pack (netbeans 5.5.1)

I want one sample (or article, paper, example ...) that shows how to use the component table (of netbeans 5.5.1 visual web pack) retriving data from ObjectListDataProvider (by use of method .setList(List<MyObject>) ...) populate the table and having one collun with radio button and the way to retrive this especific object (selected by user on radio button).

The getPersons() code will give an ClassCastException error. Change it to:
   public SelectItem[] getPersons()
   ArrayList<SelectItem> people = new ArrayList<SelectItem>();
   //Start For Loop reading from database into 'item' Object
    people.add(new SelectItem(item.getID() + "",item.getName()));
   // End Loop
/**This line.*/
   return (SelectItem[]) people.toArray(new SelectItem[]{});
   }But this might not be the problem.

Similar Messages

  • Netbeans 6.0 Visual Web Pack and facelets

    Is it current possible to use Netbeans 6.0 Visual Web Pack and facelets and/or Seams?
    If so please point me to some useful resource.

    >
    ...Below is from the Launch tab:>What exactly is a 'launch tab'? Are you talking about some NetBeans window?
    The reason I ask is that the 'JNLP file' shown, is complete rubbish. It is a bunch of symbols pretending to be a JNLP file. The fundamental problem is that it is invalid (and hence it is not the 'JNLP format' it claims to be).
    How any particular Java implementation deals with an invalid JNLP file is quite unpredicatable.*
    Please people, do not just 'presume' that you (or your IDE) can write a valid JNLP file. Instead - validate it against a DTD or XSD.
    After all.. Garbage in, Garbage out!
    * And to the poster who mentioned that adding the first Jar line twice solved the problem. That is a dangerous and fragile kludge. If it works in some specific microversion of Java, it might (probably will) break in the next.
    Edit 1 - Highlit the most major error in that file using 'code' tags. Hopefully that will make the basic problem more obvious..
    <j2se version="1.5+" java-vm-args="-Djava.endorsed.dirs="C:\Program Files (x86)\NetBeans 6.0.1\java1\modules\ext\jaxws21\api" "/>Edited by: AndrewThompson64 on May 21, 2008 9:20 AM
    Edit 2 - Added possible alternatives..
    <j2se version="1.5+" java-vm-args="-Djava.endorsed.dirs='C:\Program Files (x86)\NetBeans 6.0.1\java1\modules\ext\jaxws21\api' "/>
    <j2se version="1.5+" java-vm-args='-Djava.endorsed.dirs="C:\Program Files (x86)\NetBeans 6.0.1\java1\modules\ext\jaxws21\api" '/>The hard coded path, as well as the use of unescaped backslashes (e.g. '\' as opposed to '\\') also looks suspiciously wrong, but since I only deploy off the internet, I am not entirely sure.
    Edited by: AndrewThompson64 on May 21, 2008 9:26 AM

  • Visual Web Pack looking for AppServer but set for Tomcat

    I am having trouble starting a Creator 2 project I imported into the Visual Web Pack. It seems to be trying to use the AppServer which I do not have installed. It is set up to use Tomcat55. I set it up following the import instructions. It is clearly marked Tomcat55 in project.properties. It wont launch though. It just prints null and the following error is in the ide log...it happens every time i try and run the project. Other projects I create in VWP run fine with tomcat embedded. The error is:
    INFORMATIONAL *********** Exception occurred ************ at 8:25 PM on Jan 16, 2007
    javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException: deployer:Sun:AppServer::localhost:4849 The Application Server installation directory is not correctly set up. (Use the Tools->J2EE Platform Manager menu to correct.)
    at org.netbeans.modules.j2ee.sun.ide.dm.SunDeploymentFactory.getDisconnectedDeploymentManager(SunDeploymentFactory.java:130)
    at org.netbeans.modules.j2ee.deployment.impl.Server.getDisconnectedDeploymentManager(Server.java:144)
    at org.netbeans.modules.j2ee.deployment.impl.Server.getDisconnectedDeploymentManager(Server.java:138)
    [catch] at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getDeploymentConfiguration(ConfigSupportImpl.java:432)
    at org.netbeans.modules.j2ee.deployment.config.ConfigSupportImpl.getWebContextRoot(ConfigSupportImpl.java:227)
    at com.sun.rave.project.jsfproject.ProjectWebModule.getContextPath(ProjectWebModule.java:107)
    at com.sun.rave.project.jsfproject.ui.customizer.WebProjectProperties.init(WebProjectProperties.java:328)
    at com.sun.rave.project.jsfproject.ui.customizer.WebProjectProperties.<init>(WebProjectProperties.java:262)
    at com.sun.rave.project.jsfproject.WebProject.getWebProjectProperties(WebProject.java:466)
    at com.sun.rave.project.jsfproject.RaveWebActionProvider.invokeAction(RaveWebActionProvider.java:124)
    at org.netbeans.modules.project.ui.actions.ProjectAction.actionPerformed(ProjectAction.java:96)
    at org.netbeans.modules.project.ui.actions.LookupSensitiveAction.actionPerformed(LookupSensitiveAction.java:139)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:357)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1170)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1211)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Message was edited by:
    CandideEC

    Hi!
    It seems to me that your application is deployed to Sun Application Server. Try to change Deployment Server in project's properties. For that:
    1) Rightclick on top of project in 'Projects' window.
    2) Select Properties.
    3) Change Server in 'Run' section.
    Thanks,
    Roman.

  • Visual web pack on mandriva

    hello I install netbeans on a mandriva 2008. I have one problem with the visual web pack because during the installation the system ask me where is the "path" of netbeans installation. can you help me? where is this directory?
    thanks

    Hi!
    It seems to me that your application is deployed to Sun Application Server. Try to change Deployment Server in project's properties. For that:
    1) Rightclick on top of project in 'Projects' window.
    2) Select Properties.
    3) Change Server in 'Run' section.
    Thanks,
    Roman.

  • Problem passing quoted parameter to MySql from Visual Web Pack

    In my session bean VWP did generate:
    private CachedRowSetXImpl myRowSet = new CachedRowSetXImpl();
    The query for myRowSet is:
    SELECT * FROM myTable WHERE name IN ( ? )
    The parameter was passed in different ways ( getSessionBean1().getMyRowSet().setString(1, parameterValue) ) :
    parameterValue = "paul','peter";
    or
    parameterValue = "paul\',\'peter";
    BUT in all cases MySql add backslashes to my quotes in this way:
    SELECT * FROM myTable WHERE name IN ( 'paul\',\'peter' )
    or
    SELECT * FROM myTable WHERE name IN ( 'paul\\\',\\\'peter' )
    And of course this is not working.
    I only want MySql execute : SELECT * FROM myTable WHERE name IN ( 'paul','peter' )
    I tried : getSessionBean1().getMyRowSet().getStatement().setEscapeProcessing(false)
    Two days on this simple thing and only thing I got was a headache.
    Pleas help me, Visual Web Pack is a great Tool, but i can't get work done.

    Thanks for yoyur reply Futeleufu_John
    If I try the way you say
    parameterValue = "'Paul','Peter'";then MySql log shows:
    SELECT * FROM myTable WHERE name IN ( '\'paul\',\'peter\'' )Every sigle quote ( ' ) is replaced by ( \' )
    I abandone visual web pack as my first alternative until my brain or someone else's can resolve this.
    Again, please help me if you get some idea.
    Note : I know this seems aparently very easy to solve, Im not a professional programmer, but I develop web apps in java / tomcat more than 3 years ago and is the first time that an issue gets unresolved for me :�(

  • Could not get Using JPA Within a Visual Web JSF App Netbeans Tut.to work

    [http://testwww.netbeans.org/kb/60/web/web-jpa.html|http://testwww.netbeans.org/kb/60/web/web-jpa.html]
    Hi All,
    I am having difficulty displaying the content of Users table (Derby sample database) despite having followed all the steps provided in Using Java Persistence API Within a Visual Web JSF Application Netbeans Tutorial (http://testwww.netbeans.org/kb/60/web/web-jpa.html).
    It is uncleard from the instruction in step 3, section Creating a Java Persistence Entity Class Representing the Users Database Table - "The Entity Classes dialog dispalys. The IDE displays the database table name Users, and suggests a class name of Users. (Double click this class name to change it.)", but did not provide detail on what class name should it be changed to.
    I have tried building both TestModelApp (SE) and TestWebApp (Visual Web JSF) on JDK 1.6.13, Netbeans 6.5, Glassfish v2r2 and v3 (Prelude) on Windows XP platform without success.
    Any assistance would be greatly appreciated.
    Thanks,
    Jack

    Well, in real world the average professional Java EE / JSF developer doesn't use Netbeans nor Woodstock. Those are really for low-entry developers with zero technical knowledge who on its turn are often incapable of answering problems of your kind. Your question is also too non-technical and visualized and targeted on the wizards of Netbeans. After all your question is simply Netbeans specific, not JSF specific. If you try to ask it the more technical way (thus, at real source code level), you may have more chance on help.
    With regard to JPA specific issues, it unfortunately doesn't have a dedicated subforum yet here at forums.sun.com. You could try the [EJB forum|http://forums.sun.com/forum.jspa?forumID=13] or the [Java EE SDK|http://forums.sun.com/forum.jspa?forumID=136] forum.

  • Best way to combine Java Persistence API (JPA)  with Visual Web Pack (VWP)?

    I like the JPA/Hibernate development approach to create the database elements from JAVA classes.
    This way one gets rid of the need to keep JAVA code and the database in sync.
    However I have not yet found a good way on how to use JPA from the netbeans VWP.
    Note that I have found the tutorial on how to use the IDE with hibernate and it works without problems.
    However I think this tutorial does not really implement a good Model/View/Controller approach as it is done in the enterprise pack.
    Here you have a controller session bean that deals with all the persistence logic and that exposes properties through a DataModel to the application.
    There is no need to encapsulate logic in inherited classes of the ObjectListDataProvider.
    Maybe an example makes it more clear:
    If we stay with the hibernate tutorial that we have "Animals" and "Pavillion" entities.
    How would one efficiently design a "Table" component that shows a list of all Animals and their Pavillions.
    With the VWP approach it is quite clear: you create a RowSet with the inner/left join between Animals and Pavillions.
    But how would you do it with JPA?

    You said:
    "If we stay with the hibernate tutorial that we have "Animals" and "Pavillion" entities.
    How would one efficiently design a "Table" component that shows a list of all Animals and their Pavillions.
    With the VWP approach it is quite clear: you create a RowSet with the inner/left join between Animals and Pavillions.
    But how would you do it with JPA?"
    I have the exact same question. Have you found the answer on how to "join" entities and display them on visual web table component?

  • Need example for using query string parameters in Web Dynpro

    Hello,
    Is it possible to transfer a Web DynPro application parameters at the query string (URL)?
    Can someone please show me an example of how to pass it and how to retreive it using code inside an application?
    Thank you in advance

    Hi,
    when launching WD apps in the Portal you have to define a WD iView in the Portal. This can be started using the NavigationTarget parameter.
    Parameters (ie. Business Parameters) that should be passed to the WebDynpro application can be defined in the iView itself - the iView attribute is called "Application Parameters". Here you can also define variable expressions like "emailaddr=<User.email>" so that the value of the email address is evaluated on runtime.
    This way you don't have to care about URL encodings at all
    The following user expressions can be used:
    <User.displayname>
    <User.uniquename>
    <User.firstname>
    <User.lastname>
    <User.salutation>
    <User.jobtitle>
    <User.department>
    <User.email>
    <User.telephone>
    <User.mobile>
    <User.fax>
    <User.streetaddress>
    <User.city>
    <User.zip>
    <User.country>
    <User.state>
    <User.timezone>
    udo

  • How do you create monthly/ weekly calendars in Visual web pack?

    Would anyone have suggestions on how you would create monthly/ weekly/ daily calendars as in the example below, and populate them with data from a database.
    http://coba.usf.edu/departments/isds/faculty/agrawal/projects/java/cal.gif
    This example is from Airset.
    Thanks
    Manish

    You might find the following blog entry useful:
    http://blogs.sun.com/divas/entry/calendar_components_in_visual_web

  • Netbeans visual web pack for 6.0.1?

    Hi guys im really new to programming and i decided to do a tutorial on the netbeans website to make an app using google maps api
    to do this though i need to install the netbeans visual webpack and also the blueprint ajax components library.
    The problem is that apparently its only for netbeans 5.5... but i use 6.0.1. The one i have is newer so shouldnt those libraries still be availabe? How do I get around this??
    here is the site the tutorial is on http://www.netbeans.org/kb/55/vwp-ajaxmapviewer.html

    These forums support the Java language, not NetBeans (or any other IDE). If you can't find a matching addon, change to the 5.5 version - or ask this question at the NB site.

  • Problem: deploy war generated by netbeans 5.5(visual web pack)

    I develop web application with netbeans 5.5,
    deploy to sun app server 9.0 and work correct.
    i deploy jsf1.2 libarary to server, and add weblogic.xml to
    application that consist librery-ref='jsf1.2'.
    i deploy this war file to weblogic 10.
    when i request a page from this application that consist
    netbeans jsf component, throw exception not found setId(valueExpression) in for example: PageTag.class.
    if jsf page only consist standard component, or netbeans component do not include id attribute then page render correct.
    please help me.
    thanks.

    These forums support the Java language, not NetBeans (or any other IDE). If you can't find a matching addon, change to the 5.5 version - or ask this question at the NB site.

  • Netbeans Visual Web Pack

    Is anyone having this problem?
    In a nutshell a dataprovider associated to any database other than the default derby database will return null on dataprovider.canappend();
    I have tried it with MySQL, MS SQL and I know the permissions are right, I even had my root account get this error. However, try the same connector in JSC and the canappend() function returns true.
    Anyways, I was curious to know if any one out there is experiencing this issue.
    Cheers!

    peppertech,
    Hey thanks for the tip and the reply! First of all you are right, there is no canappend(), I was just being lazy and on capitalizing the function correctly or even referencing the correct function name.
    Good news! I figured out what the problem was... Since the connector is declared in my nb55 ide I assumed it was going to associated correctly with my development Java app servers. I knew that for production servers I would have to make the jar available to classpath of the server. In a nutshell that is the problem, a broken reference to the jdbc jar file.
    The solution is to include it in the libraries in your project's properties.... Once you deploy and run the DataProvider.canAppendRow() function you get 'true' value returned!
    Again, thanks for the reply!
    B.

  • Problem in running WAR file developed through NetBeans Visual Web

    hi all,
    actually i developed a web application in JSF using IDE NetBeans Visual Web.
    application is having a table which is connected to database ( MySQL ).... i dragged my database table on visual web's table and all the connections were automatically created. i m using tomcat as a web server.
    application runs fine through Netbeans but wen i deployed its war file in tomcat and tried to run.....browser showed me the table but the data was not there.....infact i m getting "No items in the table" written, in my table on browser.
    plz help.....thnx in advance
    Pranay

    Ramchow --
    One suggestion is to use JDeveloper to do the deployment.
    Create a connection in JDeveloper to the OC4J instance you wish to deploy to, then create a new deployment profile for your application and let JDeveloper perform the deploymnent for you.
    Once it's working, you can then go and look at the OC4J configuration files and see the tags looks like to perform the deployment correctly.
    Note that JDeveloper will deploy the WAR file by first wrappering it in an EAR file.
    -steve-

  • Visual Web - How to 'setObject' for an SQL query with an IN  ? clause

    Hello, I am relatively new to visual web pack. I am stuck at writing the java code for passing parameters to the SQL query. In a normal scenario, where we need to check if some variable is present in a column (= ?), we would pass the parameter as :
    setObject(1, whatevervalue);
    How do we pass parameters if we need to check for more than one variable? The query editor in VWP has the option IN, which allows us to check for more than one match in a column. The IN clause is supposed to allow the format ('ex1', 'ex2' ...). I tried using an array as a parameter, like, setObject(1, somearray). It gives me a null exception. I even tried sending a variable in ('ex1', 'ex2' ...) format; doesn't like it either.
    Any help is greatly appreciated.

    Check the following docs:
    http://www.netbeans.org/kb/60/web/databoundcomponents.html
    http://www.netbeans.org/kb/60/web/inserts-updates-deletes.html
    See also:
    http://developers.sun.com/jscreator/reference/techart/2/query-editor.html

  • NetBeans Visual Web + instances of users

    hi i have some problem with menages of users, maybe...;)
    so i'm creating new project in netbeans > visual web application,
    next 2 new pages,
    on first i have 1 text field (textField1) and 1 button (button1) and some action:
    public String button1_action() {
            // TODO: Process the action. Return value is a navigation
            // case name where null will return to the same page.
            String temp="";
            temp=textField1.getText().toString();
            getRequestBean1().setRValue(temp);
            getSessionBean1().setSValue(temp);
            getApplicationBean1().setAValue(temp);
            return "ok";
        }after this, we are going to next page and there, we have 1 buttom (button2)
    and 3 static texts (staticText1,staticText2,staticText3) and:
    public String button2_action() {
            // TODO: Process the action. Return value is a navigation
            // case name where null will return to the same page.
           staticText1.setText(" req: "+getRequestBean1().getRValue());
           staticText2.setText(" ses: "+getSessionBean1().getSValue());
           staticText3.setText(" app: "+getApplicationBean1().getAValue())
            return null;
    /code]
    run project> on first page im giving lets say "first person" >click button1
    on second page click button2 and i have results on staticText1..3:
    req: null
    ses: first person
    app: first person
    im opening another browser going to my project web and giving "next person">click button1 on second page click button2 and results:
    req: null
    ses: next person
    app: next person
    backing to first browser click button2 and i have the same results like in the secodn browser (but i dont wonna;))
    req: null
    ses: next person
    app: next person
    how to menage diferent instanses of application? some FacesContext? please help me, some online tutorial? thx:)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    From http://blogs.sun.com/roumen/entry/questions_at_the_sun_booth:
    Q: Does it mean that Java Studio Creator will go away?
    A: Future roadmap of Java Studio Creator is still being discussed, it is possible that it will continue to exist. By using NetBeans + Visual Web Pack you can make sure to have access to the latest and greatest features.

Maybe you are looking for

  • Error while adding new record

    I have created an user defined table for storing city details.When I add record in it,it returns -4002 and the record is not saved.The code is as follows , Private Sub AddCity()         Dim objCity As SAPbobsCOM.UserTable         Dim intCode As Integ

  • Different NX 6800GT Revs. in SLI mode?

    I have an ASUS A8N-SLI Deluxe motherboard and ordered 2 MSI NX6800GT video cards. When they arrived, they looked different. One was mounted on a blue PCB and had a Revision 1 manual, and the second was mounted on a red PCB and came with a revision 2

  • Could not load application module error in EBS 12.0.6 / JDev 10.1.3.3

    Hi, JDeveloper 10.1.3.3.0.3 Oracle EBS 12.0.6 I have extended a seeded VO (added only 1 new column). I am able to run the application successfully from JDev. I can see that the seeded VO is substituted by new VO when I click on "About this Page" - "B

  • DHCP Settings not showing up

    I have an OS X 10.4 server running 10.4.11 that has been running fairly well for some time. I recently had a need to go in and make some changes to the DHCP settings, but they aren't showing up. Trying to add another subnet seems impossible because t

  • Wrong Sales UOM in Article and Billing document

    Hi, We have an issue in Aggregated Sales Idoc Posting. There is an article which is having Base UOM as "EA" . It has "CAR" = 12 EA. So 2 UOMs are there. From POS when the file is posted with 1 CAR , in SAP Billing and Article documents created only w