Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

overiding value binds at start of session  RSS feed

 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have several forms whose values are bound to feilds of type int in a session bean. Is it possible to negate the synchronization the first time around so the '0' does not apear?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daniel Prene:
I have several forms whose values are bound to feilds of type int in a session bean. Is it possible to negate the synchronization the first time around so the '0' does not apear?


Primatives cannot be serialized and for that reason alone, I always use the primatives Object class in serialized objects. Basically, use Integer instead of int.
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the prompt response... even though it was the one I dreaded. Is there a way to do oneway binding?

Quote from my boss: "it's just starting to feel 'hacky', which means that it's getting complicated and not intuitive." Let's prove him wrong?

Thanks again,
-D.P.
[ August 01, 2005: Message edited by: Daniel Prene ]
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what about overriding the render kit for the javax.faces.Input family and detecting when a value is 0 and returning null respectively? and at that stage can the renderkit diferenciate between state and bound data? Just a thought...


Cheers!
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daniel Prene:
Thank you for the prompt response... even though it was the one I dreaded. Is there a way to do oneway binding?

Quote from my boss: "it's just starting to feel 'hacky', which means that it's getting complicated and not intuitive." Let's prove him wrong?

Thanks again,
-D.P.

[ August 01, 2005: Message edited by: Daniel Prene ]


How is using Integer hacky?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daniel Prene:
what about overriding the render kit for the javax.faces.Input family and detecting when a value is 0 and returning null respectively? and at that stage can the renderkit diferenciate between state and bound data? Just a thought...


Cheers!


And this would be easier than refactoring your int's to Integer?
 
Daniel Prene
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just trying to apeas the boss. I think he's woried about having to grab the int value whenever dealing with the accessor methods outside the forms
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daniel Prene:
Just trying to apeas the boss. I think he's woried about having to grab the int value whenever dealing with the accessor methods outside the forms


Oh no! Not that! :roll:
 
Mauro Castaldo
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daniel Prene:
Just trying to apeas the boss. I think he's woried about having to grab the int value whenever dealing with the accessor methods outside the forms


What do you think about using auto boxing/unboxing feature of J2SE 5?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Mauro Castaldo:


What do you think about using auto boxing/unboxing feature of J2SE 5?


Oooohhhh, good idea. I didn't think of that.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!