Rendered attribute of commandButton preventing action method from executing

When I add a rendered tag to my commandButton it'll only execute the method intermittantly. After a lot of testing, I've narrowed down the problem so I now know when it does and does not work properly.
If rendered="true" it always works fine
If rendered="#{issue.update}" and isUpdate() is simply "return true;" it'll always work correctly
If rendered="#{issue.update}" and isUpdate() is simply "return this.getId() != 0;" it will not execute the action specifiied, however the page does refresh.
It's also interesting to note that on the rendered page, the button is always shown only when it should be. So when the action fails to execute, the button is shown on the screen.
In the case that doesn't work, I debugged through and noticed that isUpdate() is called six times for a single page refresh. By printing a stacktrace for each call, I discovered that it's called once in the ApplyRequestValues stage of the lifecycle and the other five times are from RenderResponse (I have the stacktraces, let me know if they'd be worth posting). This method is only referenced once and only on the jsf page, never in the java code... but I'll go back and try to understand why it's calling it so many times later.
The first time isUpdate() is called, it will retrun false because the value for id has not yet been assigned, which makes sense. This causes a "false" to be returned from isUpdate() and this is what is causing the action to not be executed. If I debug through and change the return value to be true here (only the first time) the action is updated. So my question is, what's going on here? I don't understand why is isUpdate() called so many times, why is it called so early in the lifecycle, and why the call in the apply request values stage determines whether or not it executes the action?
Now, as a workaround, I put a binding on the id, and tried to use that value. That exposed another problem with my page which requires some explanation... Here are the relevent sections of the page and backing bean...
issue.jsp
<h:outputText value="#{issue.init}" />
there's a datatable here which displays all issues and has a commandLink to edit the issues (immediate="true"). It posts back to this page and passes an ID on the URL.
<h:inputHidden id="id" value="#{issue.id}" binding="#{issue.idBinding}" />
<h:inputText id="name" value="#{issue.name}" required="true" />
<h:commandButton id="updateIssue" value="Update" action="#{issue.updateIssue}" rendered="#{issue.update}" />
Issue.java
getInit() will get the id from the FacesContext (specifically, the URL) and load the data from the database.
On the rendered page in my web browser:
After clicking on an edit link, the page is loaded and the name is filled in, the update button is on the screen, and everything looks good.
When I view source, I see that the hidden input for id is set to zero. I'm still trying to figure out why this is the case since all the other parameters are set properly. I stepped through getInit() and it is, indeed setting the id property properly.
So when I added the binding to get the value from there instead of via the local values, I found that it always got zero (presumedly because that's what is rendered in the HTML code). This means that isUpdate() still returns false on the first call, and my attempt at a workaround fails! So, just as a test, I used some "javascript on the URL" trickory to set the id field to "10". That worked just fine. So the root of the problem is that issue.id is not loading. I put code in the getId() method to always look at the binding and then faces context and put the id into this.id if it found a non-null and non-zero value. It now returns the correct value all of the time but the HTML produced still says the value is zero.
I've spent about 4 hours on this issue and I'm to the point where I need advice from someone who is more educated on how JSF works. I know the inputHidden get the vaule for the HTML tag it produces from getId() because when I hard code that to always return 10, it works. But when I leave it to return the proper value, the debug statements say it's returning the proper value, but the HTML always says it's zero. This isn't an acceptable solution anyway because I use getId() in the datatable to display the IDs of each of the issues; I just wanted to see if it'd work and it didn't.
Here's my latest getInit() method (which returns the value from the URL when called from the datatable, but not when called from the inputHidden.
    public int getId() {
        if(getIdBinding() != null && !getIdBinding().isLocalValueSet()) {
            if(getIdBinding().getSubmittedValue() != null) {
                int temp = Integer.parseInt((String)getIdBinding().getSubmittedValue());
                if(temp != 0) {
                    this.id = temp;
                    log.info("Got binding value of "+this.id);
        FacesContext ctx = FacesContext.getCurrentInstance();
        if(ctx != null) {
            Map<String, String> map = ctx.getExternalContext().getRequestParameterMap();
                if(map != null) {
                String given_id = map.get("id");
                if(given_id != null) {
                    // if given an ID and no action, we load the data
                    try {
                        log.info("Got value from FacesContext of "+given_id);
                        int temp = Integer.parseInt(given_id);
                        if(temp != 0)
                            this.id = temp;
                    } catch(NumberFormatException e) {
                        // if what's passed in isn't an integer, we leave everything at default values
        return this.id;
    }Thanks in advance,
Adam

I'm clicking a link which will load data into a form. In the form there is a field called "id" which has a value of something other than zero. I press the update button (which is only rendered when the id is non-zero), it submits the form. When the restore view happens, the id is the default value of 0 because it has not yet applied the values from the form to the backing bean. Therefore the rendered attribute of update button (isUpdate()) will return false, and the update() method does not get queued.
When I switch my backing bean to session level, the restore view already has the id loaded, even before the values from the form are applied, so everything works as expected. The problem was that I needed to have the correct return values before any values have been loaded into the member variables.
As a solution to this, I made some private boolean variables called isNew and isUpdate. Both of them are true by default. This makes sure that the isNew() and isUpdate() methods (attached to the render attribute of my command buttons) return true in the restore view phase. When I read in the id from the URL or hidden input, it'll update the boolean values accordingly, which makes sure the buttons are rendered properly. This allowed me to set the backing bean back to the request scope, which make me happy. <img class="emoticon" src="images/emoticons/grin.gif" border="0" alt="" />
Thank you Mr. De Campo. You gave me exactly what I was looking for... a better understanding of how thigns work, and (indirectly) a clean solution to my problem.

Similar Messages

  • Prevent action method from executing

    Hi,
    Is it possible to somehow jump over some action methods in the definition of a service? For instance, this is the definition of the COLLECTION_INFO service, with two extra additions (prepareCustomRedirect and dummyMethod). In prepareCustomRedirect method I would like to force the service to jump over the execution of the rest of the action methods and go directly to the last one, dummyMethod, which does nothing, hence the services completes its execution. After the execution of the service, a redirect is desired, which is set in prepareCustomRedirect.
    <tr>
         <td>COLLECTION_INFO</td>
         <td>DocService
              33
              COLLECTION_INFO
              null
              null<br>
              !csCollectionUnableToInfoCollection</td>
         <td>3:prepareCustomRedirect:IdcService=COLLECTION_DISPLAY&hasCollectionID=true&dCollectionID=<$dCollectionID$>:0:null
              3:doSubService:LOAD_DOC_ENVIRONMENT:0:null
              3:canReadInCollection:::null
              3:loadUserConfig:::null
              3:loadCollectionPermissions:::null
              3:getCollectionMeta:::null
              3:loadSpecificCollectionMeta:::null
              3:loadPathForCollection:::null
    3:dummyMethod::0:null</td>
    </tr>
    Is this possible, either in this way or any other?
    Thanks,
    V

    You can do it like this:
    <tr>
    <td>COLLECTION_INFO</td>
    <td>DocService
    33
    COLLECTION_INFO
    null
    null
    !csCollectionUnableToInfoCollection</td>
    <td>3:dummyMethod::0:null</td>
    </tr>
    <tr>
    <td>COLLECTION_INFO_ORIG</td>
    <td>DocService
    33
    COLLECTION_INFO
    null
    null
    !csCollectionUnableToInfoCollection</td>
    <td>3:prepareCustomRedirect:IdcService=COLLECTION_DISPLAY&hasCollectionID=true&dCollectionID=<$dCollectionID$>:0:null
    3:doSubService:LOAD_DOC_ENVIRONMENT:0:null
    3:canReadInCollection:::null
    3:loadUserConfig:::null
    3:loadCollectionPermissions:::null
    3:getCollectionMeta:::null
    3:loadSpecificCollectionMeta:::null
    3:loadPathForCollection:::null
    </td>
    </tr>
    Within your dummyMethod you can perform your test and either execute the other service, or your code.
    Alternatively, take a look at Java filter events. If you find one that suits, you may put your code into the filter, and stop executing the rest of the service, if necessary.

  • How to prevent the browser from executing the old version of js file...

    Dear sirs,
    I have a JSP page that includes a javascript file as given below,
    <script type="text/javascript" src="../scripts/validation.js"></script>
    Some times modification is needed in this included script file. After the modification, when I load the JSP page in the browser,
    the old copy of the script file, which was not modified is getting executed. by the browser.
    I would like to know whether any options are availabe in javascript to prevent the browser from executing the old copy that has already downloaded to the temperary interner folder(from caching)and use the modified version available with the new response...
    Thank you,
    Sudheesh K S

    Dear sir,
    Thakyou very much for your comment.
    I tried this, By doing thisThe .html page of the response will be deleted. But the javascript file will not be removed. It will be remail there.
    This lead me to the idea to think about javascript. I heard that some commands are there in javascript like cache ="NO" but not sure. I searched in the net but no favourable result found...
    Thank you,
    Sudheesh....

  • CommandButton's Action method doesn't  work

    Hi all
    My English isn't very good
    I use jdeveloper 11.1.1.3.0
    I have SelectOneRadio with two options. When I select each option two PanelGroupLayouts' visible should change:
    <af:selectOneRadio id="sor1" layout="horizontal"
    binding="#{Bean1.sor_Value}"
    valueChangeListener="#{Bean1.chg_sor}"
    autoSubmit="true">
    <af:selectItem label="1" value="1" id="si1"/>
    <af:selectItem label="2" value="2" id="si2"/>
    </af:selectOneRadio>
    public void chg_sor(ValueChangeEvent valueChangeEvent) {       
    if (sor_Value.getValue().toString().equals("1")) {
    pgl_1.setVisible(true);
    pgl_2.setVisible(false);
    } else {
    pgl_1.setVisible(false);
    pgl_2.setVisible(true);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pgl_1);
    AdfFacesContext.getCurrentInstance().addPartialTarget(pgl_2);
    In each pgl I have a commandButton with a method related to theirs' action property. but When I click each button nothing happen and their related method don't run.
    but when I use rendered instead of visible in method: "chg_sor" , buttons' action method work well but in this case another error occurs because I can't ppr components that are not rendered.
    I don't know how solve this problem?
    Habib

    Thanks Frank
    In each pgl I have inputText with required=True. and if required field is null and pgl become invisible(visible = false) so the button's Action method on the other pgl(visible = true) doesn't run.
    why this happen?
    Habib
    Edited by: Habib Eslami on Feb 19, 2013 10:00 PM

  • How to invoke action method from mail contained link

    Hello,
    my application needs to send mails to users that include links for the user to click on. Something like www.mysite.com/displayData.jsp&id=123. My question is now how I make JSF invoke the respective method in the backed bean to display the data with the id 123 when the user clicks on the link int the mail.
    I wonder whether there is some kind of "catch-all action" that checks whether the user is logged in and authorized whenever any JSP page is invoked. I'm a bit tired of first checking the authorization of some user before processing the remaining part od the backed bean's action method.
    Thanks for any hints,
    Oliver Plohmann

    my application needs to send mails to users that
    include links for the user to click on. Something
    like www.mysite.com/displayData.jsp&id=123. My
    question is now how I make JSF invoke the respective
    method in the backed bean to display the data with
    the id 123 when the user clicks on the link int the
    mail.I dont think there is a way to submit to an action on click of a link. Only possible solution is to invoke the method from the constructor of your Backing Bean and populate the bean fields displayed on your page.
    I wonder whether there is some kind of "catch-all
    action" that checks whether the user is logged in and
    authorized whenever any JSP page is invoked. I'm a
    bit tired of first checking the authorization of some
    user before processing the remaining part od the
    backed bean's action method. You can try out a Servlet filter for doing this.

  • Pass a variable number into an Action method from an array of buttons

    Hello,
    I have created an array of buttons like so:
                       private javax.swing.JButton[] barray = new JButton[8];
    javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(K8055_Card_Control.JavaElectrodeSwitches1App.class).getContext().getActionMap(JavaElectrodeSwitches1View.class, this);
                 for (int i=0;i<8;i++)    // Create Output Check Boxes
              barray[i] = new JButton();
                            barray.setAction(actionMap.get("ButtonPressed"));
              barray[i].setName("Outbox"+ String.valueOf(i+1));
              barray[i].setText("Electrode " + String.valueOf(i+1));
    BoxLayout layout = new BoxLayout(jPanel1,BoxLayout.PAGE_AXIS);
    barray[i].setAlignmentX(JCheckBox.CENTER_ALIGNMENT) ;
    jPanel1.setLayout(layout);
    jPanel1.add(barray[i]);
    When a button is pressed it calls the method ButtonPressed()@Action
    public void ButtonPressed()
    // button pressed code here
    My problem is that once the button has been pressed I don't know how to find out which button called the method. Each button operates a different switch.
    I tried testing barray.isSelected(); however the ButtonPressed() method is only called once the button has released and is no longer selected.
    Any ideas?
    Thanks,

    Actually the answer to both of these questions is ActionEvent
    do for instance:
    JButton b = new JButton("test");
    JButon b2 = new JButton("test2");
    ActionListener al = new ActionListener() {
    public void actionPerformed(ActionEvent ae) {
      Object src = ae.getSource();
      String cmd = ae.getActionCommand();
      if (src == b) { //won't work unless you make b final
      //or
      if ("test".equals(cmd)) {
    b.addActionListener(al);
    b2.addActionListener(al);

  • Not able to call action method from the javascript

    I am using weblogic 10.3.2 portal.
    My requirement is to call a action in controller throuhg java script when user selects a different option in a dropdown.
    When try it we are not able to call it is returning null as a elementId. Below is the snippet of my code.
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
    <netui:html generateIdScope="true">
    <head>
    <netui:base/>
    </head>
    <script language="JavaScript" type="text/JavaScript">
    function SelectBANSubmit(id)
         var scope = document.getElementById("scopeOneSpan");
         alert("value====arv" + scope);
         //var form = document.getElementById(lookupIdByTagId(form,scope));
         //alert("value====arv" + form);
         var knoVal = document.getElementById(lookupIdByTagId(id,scope));
    alert("in method" + knoVal);
         </script>
    <netui:body>
    <span id="scopeOneSpan">
         <netui:form action="getBillDetails" >
         <netui:select dataSource="actionForm.selection" tagId="arvind" optionsDataSource="${actionForm.resDTO.kno}" onChange="SelectBANSubmit('arvind')"/>
              </netui:form>
         </span>
         </netui:body>
    </netui:html>
    Any help would be appreciated.

    Below is my code
    JS Code
    function fundemo(id)
    alert("so currently we are in fundemo function ");
         var scope = document.getElementById("scopeOneSpan");
    alert(scope);
         var check = document.getElementById(lookupIdByTagId('textbox1',scope));
    alert("check id is " + check.id + " and its value is "+ check.value);
    JSP Code
    <%@ page language="java" contentType="text/html;charset=UTF-8"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-html-1.0" prefix="netui"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-databinding-1.0" prefix="netui-data"%>
    <%@taglib uri="http://beehive.apache.org/netui/tags-template-1.0" prefix="netui-template"%>
    <netui:html generateIdScope="true">
    <head>
    <netui:base/>
    </head>
    <script type="text/JavaScript" src="D:/testWS/testWebProject/WebContent/WEB-INF/js/test.js"> </script>
    <script language="JavaScript" type="text/JavaScript">
    function SelectBANSubmit(id)
    alert("In JS Method of the JSP File ");
    fundemo(id);
    </script>
    <netui:body>
    <span id="scopeOneSpan">
    <netui:form action="getBillDetails">
    <td >
    <netui:textBox dataSource="actionForm.selection" tagId="textbox1" />
    </td>
    <td>
    <netui:button type="button" onClick="javascript:fundemo('textbox1')" value="Test click"/>
    </td>
    </netui:form>
    </span>
    </netui:body>
    </netui:html>

  • Stop a method from executing until another class does its bit

    Hi all,
    For my app I have a login screen where to get login success the user must first register. I therefore have two class LoginDialog and Register which is a dialog.
    In LoginDialog if the user clicks on Register it brings up a new instance of the Register dialog but continues to process the calling method (which happens to return to another class processing the login). What I require is that when I create a new Register object, the creating method does nothing until the Registration form is completed. I'm not at all au fait with threads so was wondering if there is an easy way to do it.
    I have thought of passing the LoginDialog as an argument in the Register constructor and having an empty while loop running in the invoking method (i.e. while (false) do nothing) and creating public access to that boolean variable so that at completion of the registration it sets the boolean variable to true in LoginDialog so it should break out of the while loop and continue. Is that a satisfactory way of pausing and restarting a method?
    Cheers,
    Chris

    Hi,
    I have a MainFrame class which calls processLogin which creates a new LoginDialog which houses the Register button. When I click on the register button it opens a new Registration screen but LoginDialog returns to MainFrame in the background and says that no user has logged in. What I require is that when the Register object is created after clicking the Register button that LoginDialog waits until the Registration is complete.
    Maybie the code will help (sorry if it is a bit lengthy).
    Snippet of LoginDialog
    public void actionPerformed(ActionEvent event)
            if(event.getSource() == ok) {
                 _username = user.getText();
                   _password = new String(password.getPassword());
                   _server = server.getText();
                   //ensure port number is an integer
                   try{
                        _port = Integer.parseInt(port.getText());
                   catch(NumberFormatException e){
                        JOptionPane.showMessageDialog(this,
                        "Please use an integer value only for the port number","Error",
                        JOptionPane.WARNING_MESSAGE);
                   //checks username and password length
                   if((_username.length()==0) || (_password.length() == 0)){
                        JOptionPane.showMessageDialog(this,
                             "Please enter a valid username and password","Error",
                                  JOptionPane.WARNING_MESSAGE);
                        return;
                   //checks server length
                   if(_server.length()== 0){
                        JOptionPane.showMessageDialog(this,
                             "Invalid server host","Error",
                                  JOptionPane.WARNING_MESSAGE);
                        return;
                   try{
                        db = new DatabaseConnection();
                        boolean exists = db.doesUserExist(_username, _password);
                        db.close();
                        if(exists){
                             //System.out.println("User exists on database");
                             this.dispose(); //get rid of login screen now user is confirmed
                        if(!exists){
                                  _username = null;
                                  _password = null;
                                  this.dispose();
                   catch(java.sql.SQLException e){
                        JOptionPane.showMessageDialog(this,
                             "Unable to connect to database. Please try again.","Error",
                                  JOptionPane.WARNING_MESSAGE);
              else if(event.getSource() == cancel) {
                   //NOTHING
              else if(event.getSource() == register){
                   Register register = new Register();
                   //while (processRegistration){
              this.setVisible(false);
         }and Register
    //import classes
    import java.io.*;
    import java.net.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.util.*;
    public class Register extends JFrame implements ActionListener {
         //declare components
         JLabel lblHeading;
         JLabel lblUserName;
         JLabel lblUserPwd;
         JLabel lblCnfUserPwd;
         JLabel lblFirstName;
         JLabel lblLastName;
         JLabel lblAge;
         JLabel lblEmpId;
         JLabel lblEmail;
         JLabel lblSex;
         String userName;
         char[] userPwd;
         char[] cnfPwd;
         String strUserPwd;
         String strCnfUserPwd;
         String firstName;
         String lastName;
         String age;
         String empid;
         String email;
         String sexStr;
         Socket toServer;
         ObjectInputStream streamFromServer;
         PrintStream streamToServer;
         JComboBox comboSex;
         JTextField txtUserName;
         JPasswordField txtUserPwd;
         JPasswordField txtCnfUserPwd;
         JTextField txtFirstName;
         JTextField txtLastName;
         JTextField txtAge;
         JTextField txtEmpId;
         JTextField txtEmail;
         Font f;
         Color r;
         JButton btnSubmit;
         JButton btnCancel;
         DatabaseConnection db;
         boolean exists, entrySuccess;
         public Register() {
              this.setTitle("Register");
            JPanel panel=new JPanel();
              //apply the layout
               panel.setLayout(new GridBagLayout());
               GridBagConstraints gbCons=new GridBagConstraints();
              //place the components
              gbCons.gridx=0;
              gbCons.gridy=0;
              lblHeading=new JLabel("Registration Info");
               Font f = new Font("Monospaced" , Font.BOLD , 12);
              lblHeading.setFont(f);
              Color c=new Color(0,200,0);
              lblHeading.setForeground(new Color(131,25,38));
              lblHeading.setVerticalAlignment(SwingConstants.TOP);
              gbCons.anchor=GridBagConstraints.EAST;
              panel.add(lblHeading, gbCons);
              gbCons.gridx = 0;
              gbCons.gridy = 1;
              lblUserName = new JLabel("Enter Username");
              gbCons.anchor=GridBagConstraints.WEST;
              panel.add(lblUserName, gbCons);
              gbCons.gridx=1;
              gbCons.gridy=1;
              txtUserName=new JTextField(15);
              panel.add(txtUserName, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=2;
              lblUserPwd=new JLabel("Enter Password ");
              panel.add(lblUserPwd, gbCons);
              gbCons.gridx = 1;
              gbCons.gridy = 2;
              txtUserPwd = new JPasswordField(15);
              panel.add(txtUserPwd, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=3;
              lblCnfUserPwd=new JLabel("Confirm Password ");
              panel.add(lblCnfUserPwd, gbCons);
              gbCons.gridx=1;
              gbCons.gridy=3;
              txtCnfUserPwd=new JPasswordField(15);
              panel.add(txtCnfUserPwd, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=4;
              lblEmpId=new JLabel("Employee ID");
              panel.add(lblEmpId, gbCons);
              gbCons.gridx=1;
              gbCons.gridy=4;
              txtEmpId=new JTextField(15);
              panel.add(txtEmpId, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=5;
              lblFirstName=new JLabel("First Name");
              panel.add(lblFirstName, gbCons);
              gbCons.gridx=1;
              gbCons.gridy=5;
              txtFirstName=new JTextField(15);
              panel.add(txtFirstName, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=6;
              lblLastName=new JLabel("Last Name");
              panel.add(lblLastName, gbCons);
              gbCons.gridx = 1;
              gbCons.gridy = 6;
              txtLastName=new JTextField(15);
              panel.add(txtLastName, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=7;
              lblAge=new JLabel("Age");
              panel.add(lblAge, gbCons);
              gbCons.gridx=1;
              gbCons.gridy=7;
              txtAge=new JTextField(3);
              panel.add(txtAge, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=8;
              lblEmail=new JLabel("Email");
              panel.add(lblEmail, gbCons);
              gbCons.gridx=1;
              gbCons.gridy=8;
              txtEmail=new JTextField(20);
              panel.add(txtEmail, gbCons);
              gbCons.gridx=0;
              gbCons.gridy=9;
              lblSex=new JLabel("Sex");
              panel.add(lblSex, gbCons);
              gbCons.gridx = 1;
              gbCons.gridy=9;
              String [] sexArr = {"Male", "Female"};
              comboSex = new JComboBox(sexArr);
              comboSex.setSelectedIndex(0);
              panel.add(comboSex, gbCons);
              JPanel btnPanel=new JPanel();
              btnSubmit=new JButton("Submit");
              btnPanel.add(btnSubmit);
              btnSubmit.addActionListener(this); //add listener to the Submit button
              btnCancel=new JButton("Cancel");
              btnPanel.add(btnCancel);
              btnCancel.addActionListener(this); //add listener to the Cancel button
              gbCons.gridx=0;
              gbCons.gridy=10;
              gbCons.anchor=GridBagConstraints.EAST;
              panel.add(btnPanel, gbCons);
              getContentPane().add(panel);
            setDefaultCloseOperation(DISPOSE_ON_CLOSE);
              setVisible(true);
              setSize(450,400);
         }//end or Register()
         public void actionPerformed(ActionEvent ae) {
              Object o = ae.getSource(); //get the source of the event
              if(o == btnCancel)
                   this.dispose();
              if(o == btnSubmit){
                   userName = txtUserName.getText();
                   userPwd = txtUserPwd.getPassword();
                   strUserPwd = new String(userPwd);
                   cnfPwd = txtCnfUserPwd.getPassword();
                   strCnfUserPwd = new String(cnfPwd);
                   firstName = txtFirstName.getText();
                   lastName = txtLastName.getText();
                   age = txtAge.getText();
                   empid = txtEmpId.getText();
                   email = txtEmail.getText();
                   sexStr = (String)comboSex.getItemAt(0);
                   db = new DatabaseConnection();
                   //Now check to see if username and password combination have been
                   //taken
                   try{
                        exists = db.doesUserExist(userName.trim(), strUserPwd.trim());
                   catch (java.sql.SQLException e){
                        System.out.println(e);
                   //Checks that each field has been filled in.
                   if(userName.length() == 0 ||  strUserPwd.length() == 0 ||
                   strCnfUserPwd.length() == 0 || firstName.length() == 0 ||
                   lastName.length() == 0 || age.length() == 0 || empid.length() == 0
                   || email.length() == 0){
                        JOptionPane.showMessageDialog(this,
                        "One or more entry has not been filled in. Please go back and try again",
                        "Message", JOptionPane.ERROR_MESSAGE);     
                   //Ensures that passwords match
                   if(!strUserPwd.equals(strCnfUserPwd)){
                        JOptionPane.showMessageDialog(this,
                        "Passwords do not match. Please go back and try again",
                        "Message", JOptionPane.ERROR_MESSAGE);
                   if(exists){
                        JOptionPane.showMessageDialog(this,
                        "Username and password combination already exists. Please go back and try again",
                        "Message", JOptionPane.ERROR_MESSAGE);
                   if(!exists) {
                        String userDetails = (userName.trim() + " " + strUserPwd.trim()
                        + " "  + firstName.trim() + " "
                        + lastName.trim() + " " + age.trim() + " " + empid.trim() + " "
                        + email.trim() + " " + sexStr.trim());
                        //System.out.println(userDetails);
                        //Try to connect to the database and insert the user details.
                        //If successful then user will be alerted and the registration page
                        //should be disposed automatically. If for some reason the insert
                        //was not successful then user is prompted to try again.
                        try{
                             entrySuccess = db.registerUser(userDetails);
                             if(entrySuccess){
                                  JOptionPane.showMessageDialog(this,
                                  "Congratulations, you have successfully registered for the Instant Messenger service!",
                                  "Message", JOptionPane.INFORMATION_MESSAGE);
                                  this.dispose();     
                             if(!entrySuccess){
                                  JOptionPane.showMessageDialog(this,
                                  "There was a problem entering your details. Please try again.",
                                  "Message", JOptionPane.ERROR_MESSAGE);
                        catch(java.sql.SQLException e){
              }//end of else
              db.close();
         }//end of actionPerformed()
    }//end of classCheers,
    Chris

  • Prevent process triggers from executing based on a specific condition.

    We are using OIM 9.1 and have a rather odd problem. We have PSFT HR as our trusted source with AD and Exchange as two of our target systems.
    The sAMAccountName in AD is generated based on a combination of the last name and first name of the user. Also french characters in the name are converted to english characters before the sAMAccountName is generated. For example è would be converted to e.
    When someone gets married and changes their last name it is updated in OIM and thus the sAMAccountName changes also. The last name change is made in the OIM webapp and then all of the process tasks run based on the Lookup.USR_PROCESS_TRIGGERS lookup table. i.e. when USR_LAST_NAME changes then there are several process tasks that run for both AD and Exchange.
    What I need to be able to do is when the sAMAccountName is the same before and after the change (remember that french characters are converted) I don't want the process tasks to run. Here's a scenario:
    1. User is provision with a sAMAccountName "berube" - notice that there are no accents in the name
    2. User last name is changed to "bèrubè" - notice the accents
    After running both names through our conversion (a Java method) they are both the same "berube = berube (converted french characters)". If this situation occures then I don't want the process tasks associated with the USR_LAST_NAME change to run. Is there a way to do this?
    Another way of stating this is "Can I make the process tasks listed in the Lookup.USR_PROCESS_TRIGGERS table conditional?"
    Thanks in advance for your help.

    If you don't want something to run when the value is the same, i suggest you always update the process form containing the values, and then let the Updated task run to update in the target. If your value is the same twice, and you try to update the field with the same value twice, it would only trigger the first time because there won't be a change on the second.
    -Kevin

  • CommandButton action method invoked multiple times in standalone OC4J

    Hi,
    We've developed an application in JDeveloper 10.1.3.3.0 (ADF Business Components version 10.1.3.41.57). In one page we have a commandButton with an action method:
    <af:commandButton action="#{MyBean.myActionMethod}"
    blocking="false"
    textAndAccessKey="#{nls['MY_LABEL']}"
    id="myButtonId" >
    <f:actionListener type="oracle.jheadstart.controller.jsf.listener.ResetBreadcrumbStackActionListener"/>
    </af:commandButton>
    This method is defined in a managed bean:
    public String myActionMethod() {
    /* some code */
    return "indexPage";
    There is a navigation-rule for outcome "indexPage". When we run our application in the JDeveloper embedded OC4J instance and click on the commandButton, the action method is invoked once and then the .jspx in the navigation-rule is navigated to.
    We deployed our application to a standalone OC4J instance. Both embedded and standalone OC4J have version: Oracle Containers for J2EE 10g (10.1.3.3.0) (build 070610.1800.23513)
    When we run our application in the standalone OC4J and click on the commandButton, the action method is repeatedly invoked in a seemingly infinite loop.
    We'd appreciate it if someone could shed some light on the matter. Please note that we cannot use <redirect /> in our navigation-rule for "indexPage" because in production we have an Oracle webcache server upstream of our OC4J. Users can only submit HTTPS requests to the webcache, which in turn forwards these requests as HTTP requests.
    Kind regards,
    Ibrahim

    Dear All,
    We'd really appreciate it if somebody would suggest some possible causes even if these might seem fare-fetched. Perhaps compare certain .jar files or something to that effect.
    Anything ????
    Thanks and regards,
    Ibrahim

  • Action method not being called

    Using jdev 10.1.3.4 with jsf/adf bc. I have two af:table components on a jsf page. I'll call them table A and table B. In table B, I have an input text with autosubmit=true and hooked up to a valuechangelistener. One of the columns in table B is a command button. Initially, I was having problems when the user changed the input value in table B and then immediately clicked the button in table B. Sometimes when the button was clicked, the backing bean method associated with it was not executing. Thanks to Didier's advice in this forum (Re: PPR and submit I was able to get this functionality working consistently.
    I still have a problem though. Table A has a command LINK as one of the columns, which executes a method in the backing bean when clicked. However, as in the scenario above, if the user changes a value in the input text in table B and in this case immediately clicks the LINK in table A, it seems that the action method behind the button in table A executes the first time but if user repeats steps (changes value of input in table B and immediately clicks LINK in table A) the action method is not called after the first time. For testing, there is no real code in the backing bean method. The only code in the action method is an sop so I can tell if the method was executed. Likewise, the value change listener method, for testing purposes, has a sop so I can tell if/when it is executed and the thread.sleep(400) code needed per Didier's workaround. I'll include the code from jspx:
    In the jspx -
    <afh:body firstClickPassed="true">
    <h:form>
    <!-- table A -->
    <af:table value="#{bindings.Summary.collectionModel}" var="row"
    rows="#{bindings.Summary.rangeSize}"
    first="#{bindings.Summary.rangeStart}">
    <af:column headerText="#{bindings.Summary.labels.PositionNbr}">
    <af:inputText value="#{row.PositionNbr}"/>
    </af:column>
    <af:column>
    <af:commandLink text="Click" action="#{backing_levelone_untitled2.buttonClicked}"/>
    </af:column>
    </af:table>
    <!-- Table B -->
    <af:table value="#{bindings.BdCommentsView.collectionModel}" var="row"
    rows="#{bindings.BdCommentsView.rangeSize}"
    first="#{bindings.BdCommentsView.rangeStart}">
    <af:column headerText="#{bindings.BdCommentsView.labels.CommentId}">
    <af:inputText value="#{row.CommentId}"
    required="false" />
    </af:column>
    <af:column headerText="#{bindings.BdCommentsView.labels.Comments}">
    <af:inputText value="#{row.Comments}"
    required="false" autoSubmit="true" valueChangeListener="#{backing_levelone_untitled2.isValid}"/>
    </af:column>
    <af:column>
    <af:commandButton text="Click" action="#{backing_levelone_untitled2.buttonClicked}"/>
    </af:column>
    </af:table>
    </h:form>
    </afh:body>
    I need the backing bean method behind the LINK in table A to be fired consistently, every time user makes a change to input of table B and immediately clicks LINK in table A. It works the first time, but all subsequent attempts will not result in the action method being executed. Hope someone can help.
    Edited by: user12341229 on Dec 11, 2009 3:24 PM

    I'm not sure if this is considered a bug, but I found that if I use a commandLink in table A, my code doesn't work as expected. However, I found that by using a commandButton in table A the functionality works as expected. I still would like to hear some feedback on this if anyone is interested in recreating the scenario. Thanks.

  • Calling a method from a UICommand Object

    How do I call an action method from a UICommand object?
    I create a HtmlCommandLink in my backing bean, and I think I should be setting the action, but with what? The method takes a MethodBinding but I can't find much detail on how to get that. I just want to call a method like linkAction1_action() in the example below, but you cannot pass a method.
    public class Page1 extends AbstractPageBean {
      private HtmlPanelGroup panel = new HtmlPanelGroup();
      public HtmlPanelGroup getPanel() {
        return panel;
      public void setPanel(HtmlPanelGroup panel) {
        this.panel = panel;
      public Page1() {
        HtmlCommandLink link = new HtmlCommandLink();
        link.setAction(/* what do I put here */);
        this.panel.getChildren().add(link);
      public String linkAction1_action() {
        return "GoBack";
    }

    OK. A couple days later and I am able to answer my
    own question. Anyway, I will lay it out there for
    anyone interested. This worked for me...
    public class Page1 extends AbstractPageBean {
    private HtmlPanelGroup panel = new HtmlPanelGroup();
    public HtmlPanelGroup getPanel() {
    return panel;
    public void setPanel(HtmlPanelGroup panel) {
    this.panel = panel;
    public Page1() {
    HtmlCommandLink link = new HtmlCommandLink();
    link.setAction(
    FacesContext.getCurrentInstance()
    .getApplication()
    .createMethodBinding("#{Page1.linkAction1_action}",
    new Class[0]));
    this.panel.getChildren().add(link);
    public String linkAction1_action() {
    return "GoBack";
    Since you're setting the action from within the Page1 object, why don't you create a method binding manually? This will be much more performant that using the application to create and EL-based binding.
    Try:
    link.setAction(new MethodBinding()
          public Object invoke(FacesContext facesContext, Object[] objects) throws EvaluationException, MethodNotFoundException
            return linkAction1_action();
          public Class getType(FacesContext facesContext) throws MethodNotFoundException
            return String.class;
    });Note that you also avoid any naming convention - you do not require your Page1 object to be configured as a managed bean "Page1".

  • Action method calls when refreshing the JSF page

    I have a test application which contains a JSF page. The page contains a command button. Button's action attribute is mapped with action method in managed bean.Inside action method I am not doing anything and just redirecting to the same page using navigation-rule configured in faces-config.xml. I deployed the application and tested the page.
    This is what I observed.
    scenario 1:
    ===========
    1) Run the page.
    2) Refresh the page.
    Observation:
    Action method not called.
    scenario 2:
    ===========
    1) Run the page.
    2) Click the command button.
    2) Refresh the page any number of times.
    Observation:
    For each and every time the page is refreshed Action method is called.
    Can anybody tell me why it is happening?

    sk_java wrote:
    I have a test application which contains a JSF page. The page contains a command button. Button's action attribute is mapped with action method in managed bean.Inside action method I am not doing anything and just redirecting to the same page using navigation-rule configured in faces-config.xml. I deployed the application and tested the page.
    This is what I observed.
    scenario 1:
    ===========
    1) Run the page.
    2) Refresh the page.
    Observation:
    Action method not called.
    You get the page using a http get so no action is "configured" to fire...
    scenario 2:
    ===========
    1) Run the page.
    2) Click the command button.
    2) Refresh the page any number of times.
    Observation:
    For each and every time the page is refreshed Action method is called.
    Can anybody tell me why it is happening?Using the command button (the first time) you obtain the view as postback so refreshing the page the browser will redo the last POST that fire again the Action...

  • Issue with JSF action method and Popup

    All,
    I have command Button, which has an action method. And my onclick function opens new popup. Once I close the popup, it has to return some values to the parent page and then my action method has to be executed.
    Issue is if I close the popup, nothing is happening in parent page.
    In my JavaScript if I return true, popup is opening and my action method is executing. But my expected behavior is after closing popup then only my action has to be executed.
    Thanks,
    Dhana

    Hi all,
    I came back to this today (after almost 2 years)... the current version of facestrace doesn't require a taglib at all: http://code.google.com/p/primefaces/downloads/list
    Just drop it in WEB-INF/lib, add *.jsf to the url mappings for the faces servlet. Then whenever you add trace=true to your URL, you get a nice dump of information there.
    Best,
    John

  • CommandButton's rendered attribute doesn't work inside dataTable

    Hi,
    I don't know if anyone could help me...
    I need to access a list of "alarms" in my jsp file (which is rendered by "alarmHandler.sortedGenericDataModel"). For each "alarm" of the list, I test the "alarm.alarmStatus" and I want to create the desired button depending on the it. I'm trying to use the "rendered" attribute to manage the fact the button will be created or not. Note that when I use the "disabled" attribute, everything works fine, but I don't want to use the disabling option, I prefer to don't show the button at all.
    I have a NullPointerException when I run this code (the stack trace of this exception is show at the buttom of this message):
    <h:dataTable value="#{alarmHandler.sortedGenericDataModel}" var="alarm"
    rows="#{alarmHandler.noOfRows}"
    first="#{alarmHandler.firstRowIndex}"
    styleClass="tablebg" rowClasses="oddRow, evenRow"
    columnClasses="left, left, left, right, left" width="100%">
         <h:column>
    <f:facet name="header">
    <h:outputText value="#{labels['alarm.label.action']}" />
    </f:facet>
              <h:commandButton value="#{labels['alarm.label.toActivate']}"
              rendered="#{alarm.alarmStatus != '3'}"
              action="#{alarmHandler.activate}" immediate="true" />
              <h:commandButton value="#{labels['alarm.label.toAcknowledge']}"
              disabled="#{alarm.alarmStatus != '1'}"
              action="#{alarmHandler.acknowledge}" immediate="true" />
              <h:commandButton value="#{labels['alarm.label.toClose']}"
                   disabled="#{alarm.alarmStatus != '2'}"
                   action="#{alarmHandler.close}" immediate="true" />          
    </h:column>
    </h:dataTable>
    *** Here is the stack trace of the error:
    2004-08-30 11:33:13,902 13307343 ERROR [org.jboss.web.localhost.Engine] (http-0.0.0.0-8643-Processor5:) ApplicationDispatcher[abox] Servlet.service() for servlet jsp threw exception
    javax.faces.el.EvaluationException: java.lang.NullPointerException
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
         at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:307)
         at javax.faces.webapp.UIComponentTag.isSuppressed(UIComponentTag.java:838)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:470)
         at com.sun.faces.taglib.html_basic.CommandButtonTag.doStartTag(CommandButtonTag.java:469)
         at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_commandButton_0(viewAlarmsTemplate_jsp.java:588)
         at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_column_1(viewAlarmsTemplate_jsp.java:505)
         at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_dataTable_1(viewAlarmsTemplate_jsp.java:445)
         at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspx_meth_h_form_0(viewAlarmsTemplate_jsp.java:202)
         at org.apache.jsp.JSP.alarm.viewAlarmsTemplate_jsp._jspService(viewAlarmsTemplate_jsp.java:125)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
         at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
         at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
         at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
         at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
         at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_tiles_insert_3(template_jsp.java:382)
         at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_f_subview_3(template_jsp.java:346)
         at org.apache.jsp.JSP.generic.template_jsp._jspx_meth_f_view_0(template_jsp.java:146)
         at org.apache.jsp.JSP.generic.template_jsp._jspService(template_jsp.java:80)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:589)
         at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
         at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966)
         at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581)
         at org.apache.struts.tiles.TilesUtilImpl.doInclude(TilesUtilImpl.java:137)
         at org.apache.struts.tiles.TilesUtil.doInclude(TilesUtil.java:177)
         at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:756)
         at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:881)
         at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:473)
         at org.apache.jsp.JSP.alarm.viewAlarmsLayout_jsp._jspx_meth_tiles_insert_0(viewAlarmsLayout_jsp.java:100)
         at org.apache.jsp.JSP.alarm.viewAlarmsLayout_jsp._jspService(viewAlarmsLayout_jsp.java:74)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:147)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
         at org.apache.struts.faces.application.FacesTilesRequestProcessor.doForward(FacesTilesRequestProcessor.java:144)
         at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
         at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)
         at org.apache.struts.faces.application.FacesTilesRequestProcessor.processForwardConfig(FacesTilesRequestProcessor.java:260)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at com.thevco.abox.web.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:166)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:72)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:275)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:595)
    Caused by: java.lang.NullPointerException
         at org.apache.struts.faces.application.PropertyResolverImpl.getValue(PropertyResolverImpl.java:146)
         at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
         at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
         at com.sun.faces.el.impl.BinaryOperatorExpression.evaluate(BinaryOperatorExpression.java:165)
         at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
         at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)

    mleblanc77:
    Thanks for your interest.
    I've modified one of our internal demos to try to reproduce your problem
    and cannot do so. Here is the operative JSP:
    <!-- ... -->
    <h:dataTable binding="#{UIDataBean.data}"
    value="#{list}"
    var="customer">
    <h:column>
         <h:commandButton id="press"
                   action="#{UIDataBean.press}"
                   rendered="#{customer.accountId != '123456'}"
                   immediate="true"
                   value="#{UIDataBean.pressLabel}"
                   type="SUBMIT"/>
    </h:column>
    </h:dataTable>
    <!-- ... -->
    Here's the customer bean
    public class CustomerBean implements Serializable {
    public CustomerBean() {
    this(null, null, null, 0.0);
    public CustomerBean(String accountId, String name,
    String symbol, double totalSales) {
    System.out.println("Created CustomerBean");
    this.accountId = accountId;
    this.name = name;
    this.symbol = symbol;
    this.totalSales = totalSales;
    private String accountId = null;
    public String getAccountId() {
    return (this.accountId);
    This seems to work fine. Can you try the latest weekly build from
    https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList
    Thanks,
    Ed (JSF Co-spec lead)

Maybe you are looking for

  • Ac travel adapter

    Hello, Ive been searching all over the place, but cant find a direct answer for this. I have bought about 1,5 years ago the slim ac charger. Everything went well, untill last night. For some reason my mp3 player which i charged over usb died. Most li

  • Form problem, Please Help

    I have a Form that contains multiple texxt boxes from a table, i also have a LOV on one various text boxes that queries other tables to give back a value. On the choosing of a value the ID that represents that value populates the text box. As this re

  • Personal Information produces a Portal Runtime Error

    When we access the portal and click on Employee Self-Service > Overview >  Personal Information > Display Personnel File It displays a Portal runtime error - Exception ID: 05:0#_29/9/10_0080_3746050 Please advice.

  • Internet Explorer is my default browser when I open iCal, how can I change it since it is always crashing?

    I have ical pinned to my task bar, but when it opens, it opens in internet explorer.  This is really annoying since it is always crashing and never loads properly.  I use Chrome mostly, but also Firefox as a backup.  If there is any way to change thi

  • Cannot deactivate previous computer to install CS3, now what?

    I am unable to access a previous computer to deactivate Contribute CS3 in order to complete installation on new computer. Any suggestions?