开发者

JSF - Java - EJB

I am new to J2EE and having problem with EJB. I already have a JSF form that is working fine. I am adding a new field to this form and binding it to the java class (1), adding getter and setter methods to the corresponding java class (2) and trying to send this object to my analyzer class (3) (which analyzes the form objects and uses them for getting queries from the database). 1).jsf

<td>
     <webuijsf:label for="textArea333" text="fee"/>
  </td>
  <td colspan="2">
      <webuijsf:textArea binding="#{user$form.test}" id="textArea333" rows="1" required="true"/>
   </td>

2) .java

    public TextArea test = new TextArea();
    public TextArea getTest(){
        return test;
    }
    public void setTest(TextArea test){
        this.test = test;
    }
 System.out.println("test in java class " + tested); // works fine
 request.addParameter("test", tested); // re开发者_如何学Cquest object is used for sending data to //analyzer class
 System.out.println(request.toString()); // works fine

3) analyzer class: ...

else if (argument.getReportArgument().getName().equals("netcost")) {
                        netcost = (Integer) argument.getValue().getObject();
                        System.out.println("netcost" + cost); // works fine
}else if(argument.getReportArgument().getName().equals("test")){
                        test = (Integer)argument.getValue().getObject();
                        System.out.println("test" + test); // doesn't work.
}

It is working fine until step 3, but I can not reach my test argument from my analyzer class. I can reach other arguments (like the one above - cost argument), but I can not reach my newly-created argument. Should I do extra sth for my analyzer class? Do you have any opinion about what am I missing? As I said I am new to J2EE, I may be skipping one important step..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜