Does this mean you solved it? As for your answers....
1. I agree. Sleep is even more important if you are writing a mean
letter to an idiot because if you wait for the next morning and re-read
the letter it sometimes scares you what you wrote the night before
because if you had sent it, you'd have made HUGE fool of yourself. I've
done that a few times out of anger -- bit mistake each time.
2. In the stripes tag you would use the name associated with the get
method. So if your action has a getUser() method your stripes text tag
would be <stripes:text name="user" />. You would only add value="...."
If you wanted a default value. Personally I would recommend you put
that in your ActionBean's no argument constructor instead of using
value="..." tags. See the quickstart guide:
http://stripesframework.org/display/stripes/Quick+Start+Guide
In the html the EL rules apply: the ${actionBean} object is your current
requests actionBean instance so your ${actionBean.result} calls your
actionBean's public getResult() method.
3. The UserBean user = .... well that is a problem. I have a LOT of
issues with your BaseAction.java. It implements the ActionBean
interface so when do you initialize this:
@Override
void init() throws IOException {
baseProcessor = new BaseProcessor(getContext().getRequest(),
getContext().getResponse());
}
ActionBean interface doesn't have an init() method so I have no idea
when it get called. As a result is baseProcessor ever initialized?
Could this be the source of your problems? Have you tried putting an
@After(LifecycleStage.ActionBeanResolution) so it is invoked after the
ActionBean is created via it's null arg constructor? Or am I simply
missing the place in your code that this is initialized? If it is null
your getUserBean method, since you extending your Base class, should not
work. Or am I just working too long and need a rest?
4. Not render, put it inside of a c:if tag. Ugly compared to the simple
JSF attribute. However most of JSF is a bit ugly in my personal opinion
so I guess you can see why I prefer Stripes? Maybe this is a good idea
for a JIRA request? Any comments from the list?
5. CachedResultSet? Not my thing. Anyone use that?
Regards,
-David
Farouk Alhassan wrote:
Well. My first lesson was banging a problem 12hrs straight is as
Stupid as saving a pasword on ur desktop in a file password.txt ....lol
but my stupidity has taught me a few lessons which i will like to
share.(I even read most of the src....lol).
1.A good sleep is good
2. Getting a property in a <stripes:text name="result"
value="${actionBean.result}"/> never returned a value. when i used
${actionBean.result} in the html
mark up directly as in the Calculator xample i goty values. why?
3. For some reason, UserBean user = (UserBean)
getContext().getRequest().getSession().getAttribute("userBean");
doesnt work all the time although i dont know under which conditions
it works
4. Is there a way to make a stipes-component not rendered. like in jsf
you can make render=false; if not why not?
5. There is currently no framework that allows using a CachedRowSet
straight in the front end even if you have all the data available.
stripes makes it easy by providing the
<stripes:Select /> which takes a list. But you still have to pass ur
Crs to a list. Can CachedRowset be allowed as well since a lot of data
is in tabular format and CRs dont require connection after its populated.
My views
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Register now and save $200. Hurry, offer ends at 11:59 p.m.,
Monday, April 7! Use priority code J8TLD2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users