struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From carmi_cd <carmi_...@yahoo.com>
Subject [S2] form not retrieving values in IE
Date Mon, 18 Feb 2008 08:13:19 GMT

I have a form that works find in Firefox but when I tried to run it in
Internet Explorer, all the values
from the form input box are returned null. 

I dont know what should I do to fix this problem in IE, 
here is my form code

<s:form id="adminForm" name="adminForm" theme="ajax">
<s:textfield name="employeeId" id="employeeId" label="Employee ID"
labelposition="left" value="%{edituser.empId}" size="10"/>
<s:textfield name="lastname" id="lastname" label="Lastname"
labelposition="left" value="%{edituser.lastName}" size="30"/>
<s:textfield name="firstname" id="firstname" label="First Name"
labelposition="left" value="%{edituser.firstName}"  size="30"/>
<s:textfield name="middlename" id="middlename" label="Middle Name"
labelposition="left" value="%{edituser.middleName}" size="30"/>
<s:textfield name="position" id="position" label="Position"
labelposition="left" value="%{edituser.position}" size="40"/>
<s:textfield name="username" id="username" label="Username"
labelposition="left" value="%{edituser.userName}" size="15"/>
<s:textfield name="password" id="password" label="Password"
labelposition="left" value="%{edituser.password}" size="15"/>
<s:textfield name="password2" id="password2" label="Confirm Password"
value="%{edituser.password}" labelposition="left" size="15"/>
</s:form>

here is my action class code:
    public String save() {                
        UserBean userBean = new UserBean();
        User newUser = new User();
        System.out.println(getLastname());
        newUser.setLastName(getLastname());
        newUser.setFirstName(getFirstname());
        newUser.setMiddleName(getMiddlename());
        newUser.setPosition(getPosition());
        newUser.setEmpId(getEmployeeId());
        newUser.setUserName(getUsername());
        newUser.setPassword(getPassword());        
        selectedIds =getSelectedIds();         
        if(userid == null || userid.equals("false")){
            userBean.addUser(newUser,selectedIds); 
        }else{            
            newUser.setUserId(userid);
            userBean.updateUser(newUser,selectedIds);   
        }
        userid=null; 
        return SUCCESS;        
    }

    public String getUserid() {
        return userid;
    } 

    public void setUserid(String value) {
        this.userid = value;
    }
    
    public String[] getSelectedGroup() {       
        return selectedGroup;
    }
    
    public void setSelectedGroup(String[] value) {
       this.selectedGroup=value;
    }        

    public String getTask() {
        return task;
    }

    public void setTask(String task) {
        this.task = task;
    }

    public String getLastname() {
        return lastname;
    }

    public void setLastname(String lastname) {
        this.lastname = lastname;
    }

    public String getFirstname() {
        return firstname;
    }

    public void setFirstname(String firstname) {
        this.firstname = firstname;
    }

    public String getMiddlename() {
        return middlename;
    }

    public void setMiddlename(String middlename) {
        this.middlename = middlename;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getEmployeeId() {
        return employeeId;
    }

    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }
    
    public String getPassword2() {
        return password2;
    }

    public void setPassword2(String password2) {
        this.password2 = password2;
    }    


I have getter and setter for every input field in my form, i dont know whats
causing the problem.
when I try to print out lastname, it said it is null.

please help me. this problem only appears in Internet Explorer. Thanks in
advance

-- 
View this message in context: http://www.nabble.com/-S2--form-not-retrieving-values-in-IE-tp15540602p15540602.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message