Thanks Robert for your inputs.
Well I'm sure that Struts does initialize all null objects along the object
chain if they are null, because for 90% of the time, this works. I do not
explicitly initialize objects along the object chain in my code. For most of
the time, Struts detects that it is null
Say Jon schrieb:
public void prepare() throws Exception {
super.prepare();
BaseEntity model = null;
if (getId() != null) {
model = (BaseEntity) session.get(getEmbeddedModelKey() + getId());
if (model == null) model = service.retrieve(modelClass, getId());
}
if (model == null && !(this inst
Hi Robert,
Thanks for the reply. I'm heartened that Struts 2 have a live community that
can help with issues. Firstly, yes you are right that I'm using a
ModelDriven.
I have a super class ModelDrivenAction which my other action classes extend
from.
public void prepare() throws Exception {
super.
Even though you are pretty vague in what you write below, i have a few
pointers for you:
1) Check (and tell us) if you designed your action implements the
ModelDriven interface (guessed from you talking about getModel() below)
2) Maybe your getModel() returns an improperly initialized instance
Hi all,
I have been using Struts 2 for a while now and I am pulling my hair over the
following issue. At times, when my parameter name contains a period, the
Parameterinterceptor doesn't seem to be applied properly. For example I have
a parameter "userAddress.country.id" which points to
getModel().
5 matches
Mail list logo