Compiler says defined constructor is NOT defined

I'm sure I've used something very much like this before. I don't get it. The constructor IS defined. Why does it say it is not defined?
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import java.awt.event.*;
import java.awt.*;
public class Sample extends JFrame
  implements WindowListener, ActionListener {
  static private Sample              parentFrame;
  public void windowClosing(WindowEvent e) { };
  public void windowClosed(WindowEvent e) { };
  public void windowOpened(WindowEvent e) { };
  public void windowIconified(WindowEvent e) { };
  public void windowDeiconified(WindowEvent e) { };
  public void windowActivated(WindowEvent e) { };
  public void windowDeactivated(WindowEvent e) { };
  public void windowGainedFocus(WindowEvent e) { };
  public void windowLostFocus(WindowEvent e) { };
  public void windowStateChanged(WindowEvent e) { };
  public void actionPerformed(ActionEvent e) { };
  public Sample() {
    // ... constructor
  private static void createAndShowGUI() {
  //Create and set up the window.
    parentFrame = new Sample("Alert!");
    parentFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    //Display the window.
    parentFrame.pack();
    parentFrame.setSize(450,200);
    parentFrame.setVisible(true);
  public static void main(String[] args) {
    //Schedule a job for the event-dispatching thread:
    //creating and showing this application's GUI.
    javax.swing.SwingUtilities.invokeLater(new Runnable() {
        public void run() {
            createAndShowGUI();
}Error:
Sample.java:33: cannot resolve symbol
symbol  : constructor Sample (java.lang.String)
location: class Sample
    parentFrame = new Sample("Alert!");
                  ^
1 error

I'm beginning to understand what the real problem is. It's not immediately obvious to a beginner, but Java is clearly a very powerful language. The real problem is that the documentation was written BY experts FOR experts. Being experts, those who use the documentation daily don't even realize that that same documentation they find so helpful is utterly incomprehensible to a beginner.
Try this experiment: Find an experienced programmer with expertise in at least two or three languages, but who has never used Java, and has never used PHP. How give them a random page from the Java documentation and a random page from the PHP documentation. What you will discover is that this experienced programmer will immediately understand the PHP page, learn from it, and be able to apply it immediately. Given the Java page, however, that same experienced programmer will NOT understand the documentation , will NOT be able to apply it immediately, and will learn nothing from it.
What Sun needs to do is get a group of newbies to look at their documentation and instead of slinging insults at the newbies, look closely at WHY their documentation is so opaque to all but Java experts, and see what steps can be taken to make it more usable.
The reason is that with languages like PHP an experienced programmer can start doing meaningful programming in the very first hour they are introduced to the language, but the way the Java documentation is structured the experienced programmer has to devote many weeks to learning vast amounts of background material before being able to do any meaningful programming.
In my own particular situation, I am called upon to write code in four or five different languages. A typical project lasts only a week or two. I have no intention of devoting months to learning a language I only use occasionally, (I last used Java 11 months ago, and probably wont use it again for a year or two) especially since the other languages I use occasionally have documentation I can learn from directly, without having to invest that huge amount of time prior to actual coding.
For the person who devotes themselves to Java, and specializes in Java, and codes exclusively, or primarily in Java, the documentation and learning curve is fine. For someone who uses Java only occasionally, the documentation is worthless. And that is not an indictment of Java as a language, but of the documentation, because with so many other languages the occasional user CAN pick up the bits and pieces needed for a small project directly from the documentation. (Take a look, for example, at this PHP function which is relatively complex. I'll bet that even if you've never used php, after looking at this page you could use this function in your own code IMMEDIATELY. http://www.php.net/manual/en/function.preg-match.php )
My frustration is that I have 30+ years of programming experience and Java documentation makes me feel like an ignorant moron. No other programming language has ever done that to me. I just don't like being made to feel that way.
So why, you might ask, doesn't my company hire someone experienced in Java for those projects? The fact is, Java projects come up very rarely, and I'm the only programmer on the staff who will even attempt the Java projects. All the other coders run screaming at the mere mention of Java. It is a universally hated language in this shop, not because of the language, but because everyone here hates documentation that seems to deliberately make them feel like morons.

Similar Messages

  • Compiler says that package does not exist...why??

    I have a directory called myutil, and inside that, a class "PrintTeste". Out of package, one class called "Teste"...
    See the code:
    public class Teste {   
        /** Creates a new instance of Teste */
        public Teste(){
            myutil.PrintTeste.mPrint();
        public static void main(String []args){
            Teste teste = new Teste();
    inside package myutil:
    package myutil;
    public class PrintTeste { 
        public static void mPrint(){
            System.out.print("teste ");
    }using javac myutil/PrintTeste.java.... it's ok
    But, when I try compile using javac Teste.java I receive the following message:
    Teste.java:8: package myutil does not exist
    myutil.PrintTeste.mPrint();
    ^
    Using Netbeans 5.5, this error does not occur.
    My environment variables CLASSPATH, JAVA_HOME AND PATH were right setted...I'm using Windows XP, jsdk 1.5.0_07
    So, what could be happening?
    Thank for yout help!
    Eliselbert

    Fortunatly, the compile process ocurres well using:
    javac -classpath . myutil/TestePrint.java
    and
    javac -classpath . Teste.java
    but when I try run the class Teste, another error:
    java Teste
    Exception in trhead "main" java.lang.NoClassDefFoundError: Teste/class

  • Multiple constructor definitions found. Constructor may not be defined in Script/ code.

    I copied from one folder to another folder my course. I am making a Spanish versio
    n and want to keep everything spereated. All goes well but I am getting over 100
    errors -> Multiple constructor definitions found. Constructor may not be defined in <Script/> code. Doesn't effect the program but it does
    get anoying. I first thought it was the linking so I went in and im
    ported from the current folder the images so it was pointing right... no go still does it.
    Created a brand new fla and copied all my frames into it... no go still
    does it. Does anyone have any thoughts on this problem?
    THANKS

    Found out nothing was wrong with my coding. Sometimes when watching the AIR app playing in Flash I go back to my code to make a fix then that is when all the errors appear. Read the adl.exe is not releasing and is causing the problem?

  • [svn] 2716: SDK-15848 - Conditional compilation constants defined in flex-config. xml are never used if a single constant is specified on the command line

    Revision: 2716
    Author: [email protected]
    Date: 2008-08-04 01:18:12 -0700 (Mon, 04 Aug 2008)
    Log Message:
    SDK-15848 - Conditional compilation constants defined in flex-config.xml are never used if a single constant is specified on the command line
    * There's a possibility this will break a conditional complication test which disallows overwriting an existing definition -- I don't know if that will break the build, but the test should be removed either way.
    * Using append syntax ("-define+=" on the command line or ant tasks, or append="true" in flex-config) and redefining a value works now if you use an already-defined namespace and name.
    * So your flex-config may have -define=CONFIG::debug,false, and you may want -define+=CONFIG::debug,true from the commandline build, or FB build.
    * Made the ASC ConfigVar fields final as a sanity check since overwriting is now allowed. It would be harder to track changes and subtle bugs if they were mutable. This means that you must build a new ConfigVar object if you need to make changes.
    Bugs: SDK-15848
    QA: Yes. Please read the updated javadocs in CompilerConfiguration. Tests need to be added to validate that overwriting is allowed, and happens correctly in different situations: I believe the order should be that flex-config is overwritten by a custom config (can we have more than one user config? is the order deterministic? I forget...), is overwritten by commandline or OEM. Did I miss any? (I didn't write code which changes this, it works however the existing configuration system allows overwriting and appending; if we have tests for that, maybe we don't need them duplicated for this feature.)
    Doc: Yes. Please read the updated javadocs in CompilerConfiguration.
    Reviewer: Pete
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-15848
    http://bugs.adobe.com/jira/browse/SDK-15848
    Modified Paths:
    flex/sdk/trunk/modules/asc/src/java/macromedia/asc/embedding/ConfigVar.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/CompilerConfiguration.java
    flex/sdk/trunk/modules/compiler/src/java/flex2/tools/oem/internal/OEMConfiguration.java

    Please note: I AM USING:
    JkOptions ForwardKeySize ForwardURICompat -ForwardDirectories
    And that's what's supposed to fix this problem in the first place, right??

  • Anyone familiar in Hibernate?please help me?Say its persistence or not?

    Actually rightnow i am doing some module in hibernate.In hibernate i want to add the object into the database then retrieve the values from database.object means like Vector.I wrote the code and execute.but i dont know my POJO class is persistent or not because i referred lot of tutorials.From that all were saying POJO class defines a default constructor or copy constructor(only one argument).But i am used three arguments for POJO class.i have attached the code if anyone know the answer please see my code then say its correct or not?that means its persistence or not?
    Java Class
    SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();               
            Session session = sessionFactory.openSession();   
            Transaction tx = session.beginTransaction();
            Vector v=new Vector();
            v.add(0,(new User1("Partha","Thiyagu","[email protected]")));
            v.add(1,(new User1("Ajis","Abdul","[email protected]")));
            session.save(v.elementAt(0));
            session.saveOrUpdate(v.elementAt(1));
            tx.commit();
            session.close();
    POJO class
    public class User1{
            /** identifier field */
            private Long id;
            /** persistent fields */           
            private String userName;
            private String userPassword;
            private String userEmail;
            /** constructor */
             public User1(String string, String string2, String string3) {
                   this.userName=string;
                   this.userPassword=string2;
                   this.userEmail=string3;
              public User1() {
                   // TODO Auto-generated constructor stub
              public Long getId() {
                return this.id;
            public void setId(Long id) {
                this.id = id;
            public String getUserName() {
                return this.userName;
            public void setUserName(String userName) {
                this.userName = userName;
            public String getUserPassword() {
                return this.userPassword;
            public void setUserPassword(String userPassword) {
                this.userPassword = userPassword;
            public String getUserEmail() {
                return this.userEmail;
            public void setUserEmail(String userEmail) {
                this.userEmail = userEmail;
    hbm file
    <hibernate-mapping>
      <class name="User1" table="user1">
        <id name="id" column="USER_ID" type="long">
            <generator class="increment"/>
        </id>
    <property name="userName" column="USER_NAME" type="java.lang.String"/>
    <property name="userPassword" column="USER_PASSWORD" type="java.lang.String"/>
    <property name="userEmail" column="USER_EMAIL" type="java.lang.String"/>
    </class>
    </hibernate-mapping>
    hibernate.config.xml
    <hibernate-configuration>
    <session-factory>
    <!-- Database connection settings -->
    <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
    <property name="hibernate.connection.url">jdbc:oracle:thin:@192.168.100.2:1521:touch</property>
    <property name="hibernate.connection.username">system</property>
    <property name="hibernate.connection.password">tpsindia</property>
    <property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <!-- Mapping files -->
    <mapping resource="User1.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Welcome.partha wrote:
    Actually rightnow i am doing some module in hibernate.In hibernate i want to add the object into the database then retrieve the values from database.object means like Vector.I wrote the code and execute.but i dont know my POJO class is persistent or not because i referred lot of tutorials.From that all were saying POJO class defines a default constructor or copy constructor(only one argument).But i am used three arguments for POJO class.i have attached the code if anyone know the answer please see my code then say its correct or not?that means its persistence or not?
    If I were writing this, I'd have a constructor in User that would initialize all four fields. I'd have the default constructor call that constructor with appropriate default values.
    Did you try this? If so, did it work? If not, what behavior did you observe?
    Looks like you're doing fine to me. Why bother coming to a forum like this and ask when Hibernate and your database will give you even better feedback than we will?
    PS - I'd set the DDL auto flag to create the first time I ran this, then comment it out.

  • Will 1.5 compiler tag default constructor as synthetic?

    Hi,
    This is a question about the synthetic attribute for the default constructor. This attribute has been added at the moment the inner classes have been introduced in the language. I think its purpose is to distinguish methods added by the compiler (like the access methods) to handle the inner classes.
    Synthetic basically means something that has been added by the compiler and that has no corresponding source code.
    Following this, the default constructor (added when the class has no constructor) should also be tagged with a synthetic attribute, shouldn't it?
    Javac 1.4.2 doesn't add this attribute for the default constructor and I was wondering if the version 1.5 would do it.
    Thanks,
    Olivier

    As far as I tested the jdk 1.5 compiler, I found that
    it already tags default constructors with isSynthetic
    attribute. Default constructors are compiler generated
    and I am not sure how it affects the api, if they are
    tagged isSynthetic.No, the 1.50 beta 31 compiler does not tag default constructors with Synthetic attributes.

  • My iPhone wont let me download some apps that i have payed for on on my account; it says my iPhone is not authorized for this computer, but it is.

    My iPhone wont let me download some apps that i have payed for on on my account; it says my iPhone is not authorized for this computer, but it is.

    No, iTunes never says an iPhone is not authorized.
    This is occurring on a computer, correct?
    Is the computer authorized for the account the media or apps were acquired with?

  • When I am writing an email, I get an alert message that says "The message could not be copied or moved to the drafts folder. Writing to the folder failed. To ga

    When I am writing an email, I get an alert message that says “The message could not be copied or moved to the drafts folder. Writing to the folder failed. To gain disc space, choose Empty Deleted and choose Compact Folders and try again.”
    If I do that, I get a message saying “There was an error copying to the Sent folder,, retry?”
    If I retry it sends the uncompleted email. All I can do is keep deleting the message and carry on. Then the whole business might repeat itself.
    Help!
    Frank

    Because the location for each song in your library is on your hard drive.  If the hard drive isn't there, how can iTunes play it?
    You'll have to move/copy the music from your hard drive to your computer's hard drive.
    Basically, EASIEST way to do all this, if you don't care about your play counts, etc...
    -Delete EVERYTHING from iTunes, so that your library is now empty.
    -Go to "Advanced" inside of the "Preferences" window, found in the "Edit" drop-down.  You can also access Preferences by pressing Ctrl+, (Press Ctrl and the comma key)
    -Change your iTunes Media Folder Location to something simple, but on your computer. I use C:/iTunes.  Make sure "Keep iTunes Media Folder Organized" and "Copy files to...." are both checked.  You can close Preferences now.
    -Now, drag and drop your music from your hard drive into your iTunes library.  iTunes will automatically add the music to your library, as you would expect, and also creates a copy of each file to place into that iTunes Media Folder you just created.
    Shouldn't have any more problems...

  • Why do i keep getting an Alert message saying "The URL is not valid and cannot be loaded "?

    Why do i keep getting an Alert message saying "The URL is not valid and cannot be loaded "?
    This happens a lot regardless of the web page. I continually have to restart FF and it persists still

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]
    * [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")

  • Does anyone know how to fix an error in cc photoshop on Win8 that says puppet warp could not complete request due to program error?

    Does anyone know how to fix an error in cc photoshop on Win8 that says puppet warp could not complete request due to program error?

    Questions on using a specific program should go in that program forum
    This forum is about the Cloud as a delivery process, not about using individual programs
    If you start at the Forums Index https://forums.adobe.com/welcome
    You will be able to select a forum for the specific Adobe product(s) you use
    Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll

  • I can not buy the gem in the "clash of clans" game, It says "My purchase could not be completed". How I can solved this problem?

    I can not buy the gem in the "clash of clans" game, It says "My purchase could not be completed". How I can solved this problem?

    If you are also getting a message to contact iTunes Support then you can do so via this link and ask them for help (we are fellow users here on these forums, we won't know why the message is appearing) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Purchases, Billing & Redemption

  • Value  set in constructor is not getting saved in button  Action method

    Hi All,
    I am not understanding why the value set ( On Condition )in constructor is not hold in the button actoin method.
    Could any body explain me on that
    for this I will try to explain with sample example
    I have taken a button and add a integer property in session bean.
    now if session bean's property is even then I am trying to set the button value to bidNow other wise Accept Invitation.
    Till this opstion everything is OK
    but once I click on Button,
    Constructor is doing the right job only. But I do not understand why in button action I am getting the First Value only.
    public Page1() {
            // <editor-fold defaultstate="collapsed" desc="Creator-managed Component Initialization">
            try {
                if (getSessionBean1().getIntValue()%2==0)
                    button1.setValue("BidNow");
                else
                    button1.setValue("Accept Invitation");
                getSessionBean1().setIntValue(getSessionBean1().getIntValue()+1);
                log("In Constructor Button Value : "+button1.getValue());
            } catch (Exception e) {
                log("Page1 Initialization Failure", e);
                throw e instanceof javax.faces.FacesException ? (FacesException) e: new FacesException(e);
            // </editor-fold>
            // Additional user provided initialization code
        public String button1_action() {
            // TODO Replace with your code
            log("In Action Button Value : "+button1.getValue());
            return null;
        }and here is the log
    [#|2005-07-19T11:55:17.859+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : BidNow|#]
    [#|2005-07-19T11:55:17.859+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:18.359+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : Accept Invitation|#]
    [#|2005-07-19T11:55:18.359+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:18.843+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : BidNow|#]
    [#|2005-07-19T11:55:18.843+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:19.312+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : Accept Invitation|#]
    [#|2005-07-19T11:55:19.312+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:19.828+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : BidNow|#]
    [#|2005-07-19T11:55:19.828+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:20.234+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : Accept Invitation|#]
    [#|2005-07-19T11:55:20.250+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:20.828+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : BidNow|#]
    [#|2005-07-19T11:55:20.828+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:21.328+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : Accept Invitation|#]
    [#|2005-07-19T11:55:21.328+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:35.437+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : BidNow|#]
    [#|2005-07-19T11:55:35.437+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:35.906+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : Accept Invitation|#]
    [#|2005-07-19T11:55:35.921+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:36.265+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : BidNow|#]
    [#|2005-07-19T11:55:36.265+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:36.890+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : Accept Invitation|#]
    [#|2005-07-19T11:55:36.890+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:37.171+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : BidNow|#]
    [#|2005-07-19T11:55:37.171+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]
    [#|2005-07-19T11:55:37.468+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Constructor Button Value : Accept Invitation|#]
    [#|2005-07-19T11:55:37.468+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise.system.container.web|_ThreadID=14;|WebModule[/webapplication12]In Action Button Value : BidNow|#]As per this log every time I am getting Bid Now only in action, though the value is changed in Construtcor
    Can u explain the reason for this

    Hi Sudhakar,
    Please try the following and you will get an idea as to what is happening:
    1. Drag and drop a button, 2 outputText components
    2. Add a property to the session bean called intValue of type int. Customize it to set it's initial value to 0
    3. Add the following lines of code to the constructor
    outputText1.setValue("" + getSessionBean1().getIntValue());
    getSessionBean1().setIntValue(getSessionBean1().getIntValue()+1);
    4. Double click on the button component to go to the button action method.
    5. Add the following line of code
    outputText2.setValue("" + etSessionBean1().getIntValue());
    6. Save and run the application
    7. Watch the values of outputText1 and outputText2 with each click of the button
    Also, try the application with the following code block in the button action method:
    if(getSessionBean1().getIntValue()%2==0){
    button1.setValue("Bid Now");
    } else{
    button1.setValue("Accept Invitation");
    getSessionBean1().setIntValue(getSessionBean1().getIntValue()+1);
    outputText1.setValue(button1.getValue());
    outputText2.setValue("" + getSessionBean1().getIntValue());
    When the above code block is in the button action method the values set to button are as expected.
    Hope that helps
    Cheers
    Giri :-)

  • I'm having trouble updating my iphone 4 since i updated to 4.3.3 i can't update it anymore. right now when i connect it to my itunes, itunes freezes for about 5 minutes then says something like "could not load sync service" any ideas on what i shud do?

    I'm having trouble updating my iphone 4 since i updated to 4.3.3 i can't update it anymore. initially itunes would let me go so far as downloadin the new software then an error poped up as soon as the download finished, and now when i connect it to my itunes, itunes freezes for about 5 minutes then says something like "could not load sync service, reconnect or try again later" any ideas on what i shud do?

    Did you try to connect in recovery mode? iPhone and iPod touch: Unable to restore

  • No new add ons are installing, they say installed but do not show up in add ons

    i installed adblock plus, block site, and something to open a new tab to homepage. they all SAY they are installed and restart firefox at the end of the installation. yet this has no effects, i see add ons, have no way to use block site at all, and my new tabs still dont open to homepage. so i went to tools>add-ons and none of the add ons installed even show up. just what was already there
    i dont know if this has something to do with conduit. i worked like 2 hours to get rid of it, deleting it from hkey registry, running a full scan with eset smart security 6, deleting all my cookies, my history, clearing everything in about:config many many times. still when i open a new tab it is in search:conduit even after disabling every single add on many of which have absolutely nothing to do with conduit. yet when i run firefox with ad ons disabled it goes away and new tabs open to the rectangles where you can pick google, yahoo etc. my preference would be for the rectangles to appear. but if i must i will use open new tab to home page add on. just the problem is that i cant install it.
    now when i search for conduit in about:config conduit came back yet again. guess i couldnt get rid of it after all! this is so frustrating. i really need someone who knows their stuff and i would greatly appreciate help. all previous posts i read on how to get rid of it all proved useless. why is there no solution to this problem?!
    right now i just want add ons to work because it seems that, at least for now, when i type something in to the url bar it searches in google, so if i can get new tabs to open in anything but conduit i guess i can ignore the fact that it is really annoying that conduit is still located in about:config. (oh and yes i did delete everything from add/remove programs realted to toolbars and conduit or whatever similar)

    oops my bad. first paragraph meant to say "i see ads". not ad ons

  • I am trying to burn some cds from my playlist on itunes, but my playlist shows many of my songs in light print and says that it will not burn because it is not a file, these are all songs I have purchased quite a while ago, how do i get them to files?

    I am trying to burn some cds from my playlist on itunes, but my playlist shows many of my songs in light print and says that it will not burn because it is not a file, these are all songs I have purchased quite a while ago, how do i get them to files?

    If they were songs you purchased from itunes, try redownloading them from your purchases...
    if that doednt work, make sure the optuon to copy files to itunes media folder is checked in settings, then find and download from the net. and re-add them to your library

Maybe you are looking for

  • What is iMovie talking about with this error message?

    I have an iMovie 4 project that has been output to iDVD successfully some time ago from my G4 (Tiger 10.4.8). I recently copied it onto my iBook (600MHz - 10.4.8). When I try to insert an extra Title before a new footage clip I get the message - "You

  • Satellite Pro 6070 Slim Select Bay Drive won't regonize CDs

    I have a problem with my Slim Select Bay DVD drive. The disc motor is running and the laser unit is moving, but it won't recognize any disc until I flip the whole notebook on the right side. Then after a few attempts with opening and closing the driv

  • Organizing by "time" from two different cameras?

    In LR I know one can take say 1000 images that were shot by two different photographers and then adjust or set it to arrange all the images by time taken- thus not file name. Is there a way to do this in Aperture 3?

  • Restore RAC database from non-RAC source - EBS R12.1.1

    We have restored (PIT) a RAC database from a non-RAC (but ASM) source and I was wondering if that was a reasonable thing to do. The reason I ask is that I seem to remember that in the upgrade to R12.1.1 the upgrade driver had a different list of jobs

  • SHARPENING TOOLS

    I read a mid-year article in Photoshop News that in ACR 4.1 "A hidden preview of each new control is available in 4.1. On Mac, hold the Option key while adjusting a slider". I can't seem to make this work on ACR 4.2 (which is what I have installed)?