Can anyone explain this behavior and tell me how to fix it?

Using NetBeans 6.5 on Windows, Glassfish v2.1
I have a JSF application with a page that has a tab set.
On one of the tabs I have a panel with company information.
One of the components on the page is an InputText field with the value bound to a session bean variable.
The tab also has an Add button.
Here is what the JSP looks like for the input text and button components
   <h:inputText binding="#{MainPage.companyNameTF}" id="companyNameTF" readonly="#{SessionBean1.readOnlyFlag}"
   <h:commandButton action="#{MainPage.mainAddBtn_action}" disabled="#{SessionBean1.disableEdit}" id="mainAddBtn"
        style="font-family: Arial,Helvetica,sans-serif; font-size: 14px; font-weight: bold; left: 425px; top: 380px; position: absolute; width: 75px" value="Add"/>
     This is all plain vanilla stuff and I would expect that when the Add button is pushed, the session bean property would be filled with
the value entered in the input text field.
In the java code for the page, I have a method to process the Add button push.
Originally, it just called a method in the session bean to check that a value was entered in the input text field by checking the bound
session bean property.
For some reason, that was not getting filled and I was getting either a null or empty string rather than the value in the text field.
I added some checking in the method that processes the Add button push so I could check the values in the debugger.
Here is a sample of that code:
    public String mainAddBtn_action() {
        String s = sb1.getCompanyName();
        s = (String)this.companyNameTF.getValue();
        s = (String)this.companyNameTF.getSubmittedValue();I check this in the debugger and NONE of the variants that I have listed have the value that was entered into the text field.
The submittedValue is null and the others are empty strings (that is what they were initalized to).
This is all pertty straight forward stuff and I am at a loss to explain what is happening.
Can anyone expain this behavior, and, most important, how can I force the values to be present when the Add button is pushed.
I have never experienced this problem before, and have no clue what is causing it.
Thanks.

Basically, the component bindings are just being used in plain vanilla get/set modes.
I set them to "" when I do a clear for the fields and they are set to a value via the text field.
No other action other than to read the values via get to insert them into the database.
And, I always use the get/set methods rather than just setting the value directly.
This is what is so strange about this behavior - I have created dozens of database add/update/delete pages using this same model and have not had a problem with them - even in a tab context.
Not a clue why this one is different.
I did notice that I had an error on the page (in IE7, you get a small triangle warning sign when something is not right).
I figured that might be the problem - maybe buggering up the rendering process.
I tracked that down and do not get that anymore (it had to do with the PDF display I was trying to get working a while back), but that did not resolve the problem.
I don't think there are any tab conflicts - none of the components are shared between tabs, but I will see what happens when I move a couple of the components out of the tab context.
I noticed that it seems to skip a cycle. Here is what I can do.
1) Fill in text fields and add a record - works fine the first time.
2) Clear the text fields
3) Enter new data in the text fields and push Add
4) I get an error saying fields are blank from my data check process.
5) Enter new data and push Add - the record is added with the new data.
My work around is to not enter data in step 3 and just accept the error message in step 4, then go ahead and enter the real data in step 5.
Very ugly, but it works every time.

Similar Messages

  • Can anyone explain this - iSight and fan speed?

    Hello - I pulled out my external iSight camera and hooked it up to my Powermac G4. I have a wind tunnel machine when the firewire was inserted in the iSight, the tower fans all revved down to a dull roar. I unplugged the the firewire and the fans revved up. I haven't used my iSight for quite a while and I recently upgraded to Leopard 10.5. Can anyone explain why the fans would rev up and down when I plug in the iSight??
    Thanks for any response!

    No, it hasn't happened to any external device only the iSight. Weird eh? When I did use the external iSight it has always gotten hot - it hasn't been any hotter than what I remember. But, the fans slowing down when I plug it in is what baffles me.

  • Can anyone explain this error and how to solve it?

    When I create a text table and activate it at last, the system gives me a warning as this:
    Exactly one field LANGUAGE of LANG type: Select as text language
    Message no. DT199
    I don't know what it means. Can anybody explain it?
    Thank you very much

    Hello ZLMARK,
    I think the documentation in this link will help you see the point. If not, please revert back with your exact question.
    http://help.sap.com/saphelp_erp2004/helpdata/en/cf/21ea9e446011d189700000e8322d00/content.htm
    Regards,
    Anand Mandalika.

  • Simple explanation of what is happening with iWeb and Mobile Me. Can anyone explain this simply and if our existing web site can be hosted elsewhere, if so can it still be updated using iWeb. Any advice very welcome

    We have a website that has run successfully using iWeb and Mobile me. We understand Mobile Me is being discontinued from June. From this forum it seems iWeb also is not being supported any more. So can the existing site be hosted successfully with another provider or is it best to start again. If so any advice on options would be very welcome;
    Thanks
    PB

    For the most part if you just get a new webhost you can continue to run with iWeb. Since you are still running Tiger iWeb should work just fine for you. You will simply need to publish your website to a folder or with the built in FTP in iWeb. Apple has simply quit updating iWeb & there will come a day when iWeb quits working in the later OS's whatever kitty comes after Lion.
    Here's a link to who I use for Hosting:
    http://jeffnitschke.com/wordpress/?p=84

  • HT1695 I can't connect to my wifi network not even when it has no security on I get "unable to connect to network "netgear" anyone have this issue and maybe know how to fix it?

    Hi
    When I try to connect to my wifi network I receive message "Unable to join network "Netgear" this starated as of 8/16 before thsn I never had this problem
    connecting to this network previously .I have attempted after manually entry of DNS still nothing a;so did the network reset, and full reset of settings and still
    get nothing I even have my network unsecured at this very moment still nothing changed it does not show the network info ; no DNS address or anything any suggestions

    - Reset the iPod. Nothing will be lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Power off and then back on the router.
    - Reset networks settings: Settings>General>Reset>Reset Network Settings
    - iOS: Troubleshooting Wi-Fi networks and connections
    - iOS: Recommended settings for Wi-Fi routers and access points

  • When i go to my music and play a song it sounds like my headphones are blown but when i play songs on youtube they sound fine, can anyone explain this to me? please and thank you

    when i go to my music and play a song it sounds like my headphones are blown but when i play songs on youtube they sound fine, can anyone explain this to me? please and thank you

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.      

  • TS3988 I have an icloud account and I view my mail with Mail V5.2. I recieve my email but the senders get messages saying the delivery failed. Can anyone explain this or help me.

    I have an icloud account and I view my mail with Mail V5.2. I recieve my email but the senders get messages saying the delivery failed. Can anyone explain this or help me.

    Thank you for replying.    Yes I deleted the old email address..   

  • I went to silence my iPhone 5s and had a box pop up--looked like one of those boxes telling me turning on Location Services would help--telling me I needed to change my password within 60 minutes.....I turned the phone off.  Can anyone explain this to me?

    I went to silence my iPhone 5s and had a box pop up--looked like one of those boxes telling me turning on Location Services would help--telling me I needed to change my password within 60 minutes.....I turned the phone off.  Can anyone explain this to me?

    I went to silence my iPhone 5s and had a box pop up--looked like one of those boxes telling me turning on Location Services would help--telling me I needed to change my password within 60 minutes.....I turned the phone off.  Can anyone explain this to me?

  • HT1430 I downloaded the lateest update and I can't turn off my apps like I did on 6os. The 7os is different and I can't seem to find out if apps turn off now by just closing them. Can anyone explain this to me? Please

    I downloaded the lateest update and I can't turn off my apps like I did on 6os. The 7os is different and I can't seem to find out if apps turn off now by just closing them. Can anyone explain this to me? Please

    Double tap the Home button and swipe the app preview page up
    iOS 7  also allows apps to run while they aren't open.
    You can manage these here:
    Settings > General > Background App Refresh

  • The home button has stopped working on my iphone 5c. Did the same a few months ago and recovered 24hrs later. Can anyone explain this problem. Phone still in warranty. Had steam issue recently but this was after last home button episode.

    Have an iphone 5c 8g. The home button has stopped working. Did the same a few months ago and recovered 24hrs later. Can anyone explain this problem. Phone still in warranty. Had steam issue recently but this was after last home button episode and no evidence of damage.

    If you are playing in hockey arenas a lot or if you are bringing it into bathroom same time as shower it may not seem like much but overtime the steam can acquire and build up in the phones usb dock flex cable swell as the home button flex cable. Bring again into apple store and should be covered under warranty again. could also be a delay in a 8gb 5c software may just be very lag.

  • Can anyone explain this to me, please. It's a static section question.

    Can anyone explain this to me, please. It's a static section question.
    I came across the following style of programming recently and I would like to know what the Static section is actually doing in the class. Thx.
    Here is the code.
    public class ClassA {
         private static Hashtable ClassAList = new Hashtable();
         private ClassB cB;
         private Vector goodLink;
         private Hashtable classCList;
         static
              ClassA cA = new ClassA();
              ClassAList.put("whatever", cA);
         public static ClassA getClassA()
              return (ClassA) ClassAList.get("whatever");

    hi,
    The static section shall be loaded before it's constructor is called. (i.e at the time of loading the class). Therefore making it available for any other objects to call.
    hope this clarifies ur question
    prasanna

  • Can anyone explain this: Numeric or Value Error Line 1

    I have a stored procedure that starts out like so:
    PROCEDURE test_proc(param1 IN VARCHAR2, param2 IN VARCHAR2, param3 OUT
    SYS_REFCURSOR) IS
    v_var varchar2(5);
    BEGIN
    SELECT * FROM. . .
    The procedure tested fine in PL/SQL Developer. When calling from
    ODP.NET like so. . .
    OracleCommand cmd = new OracleCommand("test_proc", <connection>);
    cmd.CommandType = CommandType.StoredProcedure;
    cmd.Parameters.Add("param1", "somevalue");
    cmd.Parameters.Add("param2", "XX");
    cmd.Parameters.Add("param3", OracleDbType.RefCursor,
    ParameterDirection.Output);
    DataSet ds = new DataSet();
    OracleDataAdapter da = new OracleDataAdapter(cmd);
    con.Open();
    da.fill(ds);
    con.Close();
    . . .the procedure executed as expected. If I changed the value of
    param2 to "XXX" or any value three chars long I got the "ORA-06502:
    Numeric or Value Error at Line 1" error.
    After beating my head against the wall for hours, I tried changing the
    size of v_var to 50, and the error disappeared. Mind you, the error
    was being thrown long before v_var was being set further down in the
    proc. Even more interesting is that the possible values of v_var were
    all less than 5 chars wide. Most interesting: the value of p_param2 had nothing whatever to do with v_var.
    Can anyone explain this?

    Hi,
    Is your database 9206 by chance? Re: Error ORA-06502 PL/SQL
    Cheers,
    Greg

  • Can anyone explain this query.?

    Can anyone explain this query.?
    select nvl(s.p_id,q.p_id),nvl(s.p_type,q.p_type),nvl(s.p_line,q.p_line),
    nvl(s.sales2004,0),nvl(s.sales2005,0),nvl(q.quota2004,0),nvl(q.quota2005,0)
    from sales s
    full outer join quota q on(s.p_id = q.p_id and s.p_type=q.p_type and s.p_line=q.p_line)

    from sales s full outer join quota qTable quota is outer joined to table sales , if there are no matching records in table quota then also the query retuns the sales record with null values for the corresponding quota record columns
    NVL() has been used to handle such cases

  • HT3275 Please can anyone explain this to me

    Please can anyone explain this to me - thank you -
    Time Machine couldn't complete the backup to time capsule - The backup disk image “/Volumes/Data-1/Alyson’s iMac.sparsebundle” is already in use.

    The explanation is a long standing bug in Lion and Mountain Lion, but what you might really be asking is how to fix the problem.
    Pull the power cord from the back of the Time Capsule
    Wait a few minutes
    Plug the power cord back in
    If that does not fix the problem you will need to dig deeper.  See #C12 in Pondini's excellent Time Machine - Troubleshooting.
    http://pondini.org/TM/Troubleshooting.html

  • Post Moved Can anyone explain this baffling puzz...

    Post moved to Other BB Queries http://community.bt.com/t5/Other-BB-Queries/Can-anyone-explain-this-baffling-puzzle-with-BT-Total-BB...
    If you want to say thanks for a helpful answer,please click on the Ratings star on the left-hand side If the reply answers your question then please mark as ’Mark as Accepted Solution’

    I tend to think that the comments about MAC address filtering and wireless security are a bit misleading - if these things were the problem then it would not work at all as opposed to working sporadically.
    I must admit, reading your post I had exactly the same problem moving into a new house last year, my desktop PC in my room would get terrible wireless reception with constant erroring and was practically unusable whilst a laptop sat next to it was just fine. I tried a million different things and eventually bought an external wireless antenna like the one here:
    Edimax EA-IO7D 7dBi Indoor Omni-Directional High Gain Antenna with Desktop Stand - 1m Cable
    It solved the problem for me though I am still mystified as to what the problem is - I suspect that there is something in the environment causing interference though I don't know what. My house is of average size and fairly modern with thin walls so I would not anticipate any problems.
    Some things to try are to move the PC right next to the hub (or vice versa, whichever is easier) and see if this improves things or borrow a wireless router from a friend, turn off all encryption and see what signal strength you get there.

Maybe you are looking for