Thank you Gabriel.
It wasn't exactly what I was hoping for, but at least I know that
will not work as I expected.
Thanks,
John
Gabriel Belingueres wrote:
Because the textfield name is actually firstName, and because you
don't have a setFirstName(String) method in your action, the parameter
Because the textfield name is actually firstName, and because you
don't have a setFirstName(String) method in your action, the parameter
is never set.
Either you have to:
1) write without the s:push, or
2) if you are more comfortable writing the form field names without
all the "formBean.", your a
Hello again. Still having problems with this one. The page displays
the default values, but when I submit, the updated values aren't getting
copied into the session form bean.
If I remove the tag and just reference each field independently
it works ok. But when is added back into the JS
Ok I figured out what is happening with my method="pageForward" > attempt:
If you specify a form action function (example, action="sample!submit") it will supersede your 's method
parameter and the method will not get called.
If I remove the "!submit" and make it action="sample" then the
m
On Sat, Sep 20, 2008 at 4:46 PM, 928572663 <[EMAIL PROTECTED]> wrote:
>
> The Tag Reference doc:
>
> http://struts.apache.org/2.0.11.1/docs/submit.html
>
> doesn't have much detail about what to expect: "Set method attribute." Is
> my pageForward() method supposed to conform to a certain signatu
Dave Newton wrote:
I'll consider writing up a summary of the various ways to accomplish what
you're trying to do and putting it on the wiki, although most of it will be an
aggregation of info that's already there.
Thank you
But I havent' seen anything in the framework yet on how to have a
928572663 I can not disagree more with you.
First we can not have the whole picture of your problem because only
you are in front of your screen and your system, so we just make an
educated guessing, so the more information you supply, the better. You
didn't supply your struts.xml file for example
Moving back to the list.
--- On Sat, 9/20/08, 928572663 <[EMAIL PROTECTED]> wrote:
> If you believe that your suggestions are correct, then please
> modify my samples, test them, and email them back to me.
Sure, if you wash my dishes and break down a bunch of empty boxes and put them
into my sto
1) Again, replace the names of your form fields:
from:
to:
2) SessionAware interface: it is pointless to implement it if you are
not going to save the session Map in an instance variable for future
reference, and if getting the session through Map session =
(Map)ActionContext.getContext().get("s
As was mentioned to you previously, at the very least you shouldn't use
"#session..." as the name; you should just use "session" if you've implemented
a getSession() method. That may be enough; can't test at the moment.
Dave
--- On Fri, 9/19/08, 928572663 <[EMAIL PROTECTED]> wrote:
> I am using
I am using Zero Configuration (annotations), so no struts.xml necessary.
formDetails.jsp
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
Could you post your struts.xml, action and (one of the) JSP?
2008/9/19 928572663 <[EMAIL PROTECTED]>:
> It's still not working - same error.
>
> I tried to revert my JSP back to using the #session.formBean syntax, and
> now at least I am able to see my default values in the form again.
>
> But wh
It's still not working - same error.
I tried to revert my JSP back to using the #session.formBean syntax,
and now at least I am able to see my default values in the form again.
But when I submit the form with changes, the framework calls my
Action's setSession() function, but the data val
You need to instantiate your formBean before the interceptor stack
tries to set the parameters. Common points in your code where you can
accomplish that are: instantiating the object when declared as an
instance variable, inside a constructor of your action, or implement
the Preparable interface an
I tried both suggestions and neither worked.
The first thing I tried was to implement the getter/setters and change
the JSP as you suggested. When I did this I got the following:
Caused by: ognl.OgnlException: formBean [java.lang.NullPointerException]
at ognl.OgnlRuntime.getMethodVal
I've never used a form field name like "#session.formBean.firstName"
before, but if you refactor your code a little:
Make your action implement SessionAware interface and put a formBean
getter/setter in your actions (or some superclass of your wizard
actions), which takes it from the session:
publ
Here are some examples of how I am accessing the session pojo fields on
my form:
and then in my action class (SampleAction):
public String showForm() throws Exception
{
MyFormBean formBean = new MyFormBean();
Map session = (Map)ActionContext.getContext().get("session");
--- On Tue, 9/16/08, John Norvell wrote:
> Is there simple answer to this? I can include some code
> snippets if necessary.
Necessary ;)
There's no way to know what your form is storing its values to w/o seeing the
action and what it's exposing to the JSP.
Dave
-
18 matches
Mail list logo