hai chad,
thnaks a lot chad now i solve the problem and got the output
sahuly wrote:
>
> hai,
> I am not able to get the auto generated bean class.but i got the
> bean.class.manifest and properties file ..because of this i face the null
> pointer exception while accessing the implementatoin methods using
> interface instance..
>
> I am not able to get the instance of the interface...i am not know the
> exact reason may be the auto generated bean class is missing i think this
> may be a problem but i am not sure about that. i am only begginer to
> beehive so anyone solve this problem
>
>
> The Code is here .........
>
> Hello Implementation class :
>
> package com.beehive.sample.control;
>
> import org.apache.beehive.controls.api.bean.ControlImplementation;
>
> @ControlImplementation(isTransient=true)
> public class HelloImpl
> implements Hello {
>
> public String hello() {
> return "Hello!";
> }
> }
>
>
> Hello Interface :
>
> package com.beehive.sample.control;
>
> import org.apache.beehive.controls.api.bean.ControlInterface;
>
> @ControlInterface
> public interface Hello {
> String hello();
> }
>
> Controller class:
>
> package com.beehive.sample.controller;
>
> import org.apache.beehive.netui.pageflow.annotations.Jpf;
> import org.apache.beehive.netui.pageflow.PageFlowController;
> import org.apache.beehive.netui.pageflow.Forward;
>
> import org.apache.beehive.controls.api.bean.Control;
> import com.beehive.sample.control.Hello
>
> @Jpf.Controller(
> simpleActions={
> @Jpf.SimpleAction(name="begin", path="index.jsp"),
> @Jpf.SimpleAction(name="toPage2", path="page2.jsp")
> }
> )
>
> public class Controller
> extends PageFlowController
> {
> @Control
> private Hello helloI;
>
> @Jpf.Action(
> forwards = {
> @Jpf.Forward(name="success", path="displayData.jsp")
> }
> )
> public Forward processData(ProfileForm form) {
> System.out.println("Name: " + form.getName());
> System.out.println("Age: " + form.getAge());
>
> Forward fwd = new Forward("success");
> fwd.addActionOutput("name", form.getName());
> fwd.addActionOutput("age", form.getAge());
> fwd.addActionOutput("message", helloI.hello());
> ------------------> above line is the problem i got the null pointer
> exception here
> return fwd;
> }
> }
>
>
>
> Thanks in advance
> sahuly
>
>
>
--
View this message in context:
http://www.nabble.com/Null-pointer-exception-tf2913523.html#a8191245
Sent from the Beehive - User mailing list archive at Nabble.com.