Try setting a breakpoint in:

        public void go(ViewContext vctx)  throws IOException, ServletException
        {
                // Should we put the null in the collection?
                if (vctx.getModel() != null)
                        this.setAttribute(vctx);

                // Call the aggregated view now handles the JSP rendering now that
                // we have set up the bean correctly.
                this.forward.go(vctx);
        }

class: org.infohazard.maverick.view.DocumentView.

Or... one of the other views if you're using it.

Eelco

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Stephan Visser
Sent: donderdag 20 februari 2003 12:28
To: '[EMAIL PROTECTED]'
Subject: RE: [Mav-user] Model doesn't get initialized?


Sorry for the typo there.... It should have read "name", not "test"....

I tried to find out the contents of the model just before leaving the
controller it has been set properly, but from the JSP there is nothing...

Stephan.

-----Original Message-----
From: Eelco Hillenius [mailto:[EMAIL PROTECTED]]
Sent: donderdag 20 februari 2003 12:09
To: [EMAIL PROTECTED]
Subject: RE: [Mav-user] Model doesn't get initialized?


If you want to use property test, TestController should have that property:

public class TestController extends ThrowawayBean2
{
  private String name;
  private String test;

  public String getname() { return this.name; }
  public void setname(String s) { this.name = s; }

  public String Perform()
  {
    test = "blah";
    return "success";
  }

  public String getTest() { return test };
}

or just try <c:out value="${model}" /> to see if your model was set
properly.

Eelco

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Stephan Visser
Sent: donderdag 20 februari 2003 12:02
To: '[EMAIL PROTECTED]'
Subject: [Mav-user] Model doesn't get initialized?


Hi there!

I am trying to create a simple example application, using the friendbook as
an example. The framework seems to work fine, including LOG4J. I do have a
lot of problems when I try to get a controller to work. I have something
like this:

package com.maverick.controllers;
import org.infohazard.maverick.ctl.ThrowawayBean2;

public class TestController extends ThrowawayBean2
{
  private String name;

  public String getname() { return this.name; }
  public void setname(String s) { this.name = s; }

  public String Perform()
  {
    return "success";
  }
}

In the maverick.xml I have something like this:

<command name="submitname">
  <controller class="com.maverick.controllers.TestController" />
  <view name="success" path="testform.jsp"/>
</command>

In my testform.jsp I try to read the value from the model like so:

<c:out value="${model.test}" />

...and now for the weird part (and also my question)....

NOTHING comes out of the model! Am I overseeing something or doing something
wrong?? I spent an entire evening trying to figure out how to get this to
work, no success. I even tried to explicitly fill the model in the
controller using the setModel method.... nothing happens.... I have
absolutely no clue ... can anybody help me?

Thanks in advance!

Stephan.


-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
[INVALID FOOTER]



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
[INVALID FOOTER]


-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
[INVALID FOOTER]



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
[INVALID FOOTER]

Reply via email to