Re: Hibernate problem with OGNL

2013-03-27 Thread Lukasz Lenart
2013/3/27 Markus Demetz :
> I think I've found the problem.
> I had javassist 3.17.1 (latest) in my project but hibernate 4.2 ships with
> version 3.15.0
> Now it seems to work!

Yeah... this version is buggy :P I have tried update Ognl 3 to it but
no luck ;-)


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Hibernate problem with OGNL

2013-03-27 Thread Markus Demetz

Hi,

I think I've found the problem.
I had javassist 3.17.1 (latest) in my project but hibernate 4.2 ships 
with version 3.15.0

Now it seems to work!

Thank you, and sorry for misplacing my question here!

Regards,
Markus



Am 27.03.2013 17:23, schrieb Steve Higham:

On 27/03/2013 10:42, Markus Demetz wrote:

Hi,


I have situations, where the getId() method of my model class returns 
null

when navigating through OGNL e.g. when
calling .


Have you tried  or 

No luck :-(
I also tried with JSTL now without success.
It's very strange, since sometimes it works and then it reappears again.
I'll ask at the hibernate forum.

Regards,
Markus

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


I've seen this behavior on newly created instances. Hibernate doesn't 
know the ID until the object is persisted to the DB. Hibernate tries 
to delay this as long as possible to minimise DB writes. You would 
have thought a request for the ID would force a DB write but Hibernate 
doesn't seem to implement this behavior. If you want the ID you need 
to force the DB write first.


Steve

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org




-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Hibernate problem with OGNL

2013-03-27 Thread Steve Higham

On 27/03/2013 10:42, Markus Demetz wrote:

Hi,


I have situations, where the getId() method of my model class returns 
null

when navigating through OGNL e.g. when
calling .


Have you tried  or 

No luck :-(
I also tried with JSTL now without success.
It's very strange, since sometimes it works and then it reappears again.
I'll ask at the hibernate forum.

Regards,
Markus

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org


I've seen this behavior on newly created instances. Hibernate doesn't 
know the ID until the object is persisted to the DB. Hibernate tries to 
delay this as long as possible to minimise DB writes. You would have 
thought a request for the ID would force a DB write but Hibernate 
doesn't seem to implement this behavior. If you want the ID you need to 
force the DB write first.


Steve

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: Hibernate problem with OGNL

2013-03-27 Thread Markus Demetz

Hi,


I have situations, where the getId() method of my model class returns null
when navigating through OGNL e.g. when
calling .


Have you tried  or 

No luck :-(
I also tried with JSTL now without success.
It's very strange, since sometimes it works and then it reappears again.
I'll ask at the hibernate forum.

Regards,
Markus

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts2 (2.2.1) adds field error and doesn't return input!!

2013-03-27 Thread Lukasz Lenart
2013/3/27 lucas owen :
> NEVER MIND
>
> it turns out that a co-worker had touched validate() method:
>
> public void validate(){
>  Map> fieldError = new HashedMap();
>  setFieldErrors(fieldError);
> }
>
> what i didn´t know is that (calling "save" action) after validateSave,
> Struts 2 continues executing validate, erasing, in this case, field errors.

Check the docs [1], param alwaysInvokeValidate, you can change that behaviour

[1] http://struts.apache.org/development/2.x/docs/validation-interceptor.html


Regards
-- 
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



Re: struts2 (2.2.1) adds field error and doesn't return input!!

2013-03-27 Thread lucas owen
NEVER MIND

it turns out that a co-worker had touched validate() method:

public void validate(){
 Map> fieldError = new HashedMap();
 setFieldErrors(fieldError);
}

what i didn´t know is that (calling "save" action) after validateSave,
Struts 2 continues executing validate, erasing, in this case, field errors.

I'm so grateful with your support, keep working hard
thanks!!


2013/3/26 Alejandro 

> he used onclick, cancel the click event
>
>
>
> 2013/3/26 Paul Benedict 
>
> > Correct. Return true to submit; false to cancel the event.
> >
> > On Tue, Mar 26, 2013 at 1:10 PM, Maurizio Cucchiara
> > wrote:
> >
> > > I could be wrong, but if you don't return true on submit event, the
> > > form will never get submitted.
> > >
> > > Twitter :http://www.twitter.com/m_cucchiara
> > > G+  :https://plus.google.com/107903711540963855921
> > > Linkedin:http://www.linkedin.com/in/mauriziocucchiara
> > > VisualizeMe:
> http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
> > >
> > > Maurizio Cucchiara
> > >
> > >
> > > On 26 March 2013 18:44, Dave Newton  wrote:
> > > > On Tue, Mar 26, 2013 at 1:42 PM, Alejandro 
> wrote:
> > > >
> > > >>   you don't put validate to true in the form
> > > >>
> > > >
> > > > That's only for client-side validation.
> > > >
> > > > Dave
> > >
> > > -
> > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > For additional commands, e-mail: user-h...@struts.apache.org
> > >
> > >
> >
>