[jboss-user] [JBoss Seam] - Re: Error Rendering View[/home.xhtml]

keeve do-not-reply at jboss.com
Sun Jan 13 22:44:06 EST 2008


Here it is:

@Name("CalcBean")
  | @Scope(ScopeType.CONVERSATION)
  | public class CalculatorController {
  |     
  |     /** Creates a new instance of CalculatorController */
  |    
  |     public CalculatorController() {
  |     }
  |     
  |     private Calculator cal = new Calculator();
  |     private int num1 = 0;
  |     private int result = 0;
  |     private int num2 = 0;
  | 
  |     @Create                                                                           
  |     @Begin(pageflow="CalcBean") 
  | 
  |     public void setCalculator(Calculator aCal){
  | 		this.cal = aCal;
  |     }
  |  
  |   
  | 	public void setnum1(int num_1){
  | 		this.num1 = num_1;
  | 	}
  | 	
  | 	public int getnum1(){
  | 		return num1;
  | 	}
  | 	
  | 	public int getResult(){
  | 		return result;
  | 	}
  | 	public void setnum2(int num_2){
  | 		this.num2 = num_2;
  | 	}
  | 	
  | 	public int getnum2(){
  | 		return num2;
  | 	}
  | 	
  | 	public void add(){
  | 		result = cal.add(num1, num2);
  | 	
  | 	}
  | 	
  | 	public void multiply(){
  | 		result = cal.multiply(num1, num2);
  | 	
  | 	}
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119491#4119491

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119491



More information about the jboss-user mailing list