The easiest thing to do in this case is have Hello extend ThrowawayBean2.
Then your Hello class is itself your bean--all its setters will be set with
any form parameters, and its getters will be the methods your view uses.

The simplest case would probably be something like:

public class Hello extends ThrowawayBean2 {
    private String message = "Hello World!";

    public String getMessage() {
        return message;
    }

    public void setMessage(String msg) {
        this.message = msg;
    }
}

Also, if you are planning on using xsl transforms, you probably want to set
your view type to domify (see the opt-domify package and friendbook-domify).

--jim

----- Original Message -----
From: "Charles N. Harvey III" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 21, 2002 10:55 AM
Subject: [Mav-user] still not getting it


> I have been playing with Maverick for about a week and I love it.
> I took apart the friendbook example and have made my own app using
> its pieces and it is very well designed.  The thing that I'm still
> not getting though is a basic 'hello world' example.
>
> I would like to have something like this in my mav.xml file:
>
>
> <command name="hello">
> <controller class="Hello"/>
> <view>
> <transform path="hello.xsl"/>
> <transform path="outside.xsl"/>
> </view>
> </command>
>
> Whether its XSLT, Velocity or JSP doesn't really concern me, just
> the concept.
>
> Then I have WEB-INF/classes/Hello.java.
>
> What does this class have to implement?  Should it look like the
> FormBeanUser.java file and implement ControllerSingleton?  All I
> want to do is put text like "Hello Maverick" in a bean and then print
> it out in my view layer.  I have done this by using the friendbook
> example but can't seem to do it from scratch.
>
> Any help with this would be great.  I really want to get this.
>
> Thanks.
>
> Charlie
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by: OSDN - Tired of that same old
> cell phone?  Get a new here for FREE!
> https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
> _______________________________________________
> Mav-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/mav-user
> Archives are available at http://www.mail-archive.com/



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Mav-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mav-user
Archives are available at http://www.mail-archive.com/

Reply via email to