Re: How to persist null values with JSF2?

2011-01-10 Thread Marsman

I've also set this context parameter to true, but entity properties are not
set to null. I got empty strings and 0 again. After that, I've downloaded a
small JSF 2 example and deployed it. I got the same problem again. With
MyFaces 2.0.3 and Tomcat 6.0.29. What am I doing wrong? :-(

Titus




Jakob Korherr wrote:
 
 Hi,
 
 As for JSF 2.0, setting
 javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL to true
 should do the trick.
 
 I just tested it with MyFaces 2.0.3 and it worked fine (for both
 String and Integer properties).
 
 Regards,
 Jakob
 
 2011/1/8 Marsman mars@gmx.de:

 Hi!

 Since migrated my application to JSF 2 I'm no able to persist an empty to
 null converted value in the database. The values passed in
 managedBean.setModel(model) are empty strings for example again. I'm
 looking
 for a reason of this behaviour for a few days now and would be happy, if
 anybody can help me. Here are some snippets of my code:

  ...

 Titus


 --
 View this message in context:
 http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30622750.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.


 
 
 
 -- 
 Jakob Korherr
 
 blog: http://www.jakobk.com
 twitter: http://twitter.com/jakobkorherr
 work: http://www.irian.at
 
 

-- 
View this message in context: 
http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30632274.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: How to persist null values with JSF2?

2011-01-10 Thread Mark Struberg
Did you do your debugging in your backing bean action or do you only look at 
the database? If JPA is involved, then the jpa provider may replace null with 
empty strings (known issue on oracle).

LieGrue,
strub

--- On Mon, 1/10/11, Marsman mars@gmx.de wrote:

 From: Marsman mars@gmx.de
 Subject: Re: How to persist null values with JSF2?
 To: users@myfaces.apache.org
 Date: Monday, January 10, 2011, 9:48 AM
 
 I've also set this context parameter to true, but entity
 properties are not
 set to null. I got empty strings and 0 again. After that,
 I've downloaded a
 small JSF 2 example and deployed it. I got the same problem
 again. With
 MyFaces 2.0.3 and Tomcat 6.0.29. What am I doing wrong?
 :-(
 
 Titus
 
 
 
 
 Jakob Korherr wrote:
  
  Hi,
  
  As for JSF 2.0, setting
 
 javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
 to true
  should do the trick.
  
  I just tested it with MyFaces 2.0.3 and it worked fine
 (for both
  String and Integer properties).
  
  Regards,
  Jakob
  
  2011/1/8 Marsman mars@gmx.de:
 
  Hi!
 
  Since migrated my application to JSF 2 I'm no able
 to persist an empty to
  null converted value in the database. The values
 passed in
  managedBean.setModel(model) are empty strings for
 example again. I'm
  looking
  for a reason of this behaviour for a few days now
 and would be happy, if
  anybody can help me. Here are some snippets of my
 code:
 
   ...
 
  Titus
 
 
  --
  View this message in context:
  http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30622750.html
  Sent from the MyFaces - Users mailing list archive
 at Nabble.com.
 
 
  
  
  
  -- 
  Jakob Korherr
  
  blog: http://www.jakobk.com
  twitter: http://twitter.com/jakobkorherr
  work: http://www.irian.at
  
  
 
 -- 
 View this message in context: 
 http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30632274.html
 Sent from the MyFaces - Users mailing list archive at
 Nabble.com.
 
 





Re: [Trinidad] Roadmap

2011-01-10 Thread Matthias Wessendorf
Hello Walter,

Trinidad 1.0.x will have one last release (see current vote result on dev@).
After that there is most likely no new release of Trinidad 1.0.x
(optimized for JSF 1.1)

Trinidad 1.2.x will have a very few releases, basically for maintenance reasons.

Trinidad 2.0.x (for JSF2) is the most 'active' development, and
releases are planed.

Once we (Trinidad's pom file) move to the new nexus/release
infrastructure, releases are
cheap and easy to do. Actually I am currently looking into this.

HTH,
Matthias

2011/1/8 Walter Mourão walter.mou...@gmail.com:
 Hi Folks,
 is there a Trinidad 2.0 road map anywhere ?

 Thanks,

 Walter Mourão
 http://waltermourao.com.br
 http://arcadian.com.br
 http://oriens.com.br




-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf


[Trinidad] Beta release of Trinidad 2.0.0

2011-01-10 Thread Matthias Wessendorf
Hi,

there were some questions regarding the state of Trinidad 2.0;
We will have a beta1 release within January.

Currently we are voting on the plugins:
http://markmail.org/message/tzkhsmzq3owmy6dp

Once that is done, we can vote on the framework/components.
By end of this week I do expect a vote for Trinidad 2.0-beta1.

Sorry for the delay, please stay tuned.

-Matthias

-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf


Re: How to persist null values with JSF2?

2011-01-10 Thread Marsman


The action on the commandButton calls a save()-Method in my backing bean. At
this point, I got the empty fields instead of null. You can see this in my
initial post. I'm using JPA with Hibernate.

Titus



struberg wrote:
 
 Did you do your debugging in your backing bean action or do you only look
 at the database? If JPA is involved, then the jpa provider may replace
 null with empty strings (known issue on oracle).
 
 LieGrue,
 strub
 
 --- On Mon, 1/10/11, Marsman mars@gmx.de wrote:
 
 From: Marsman mars@gmx.de
 Subject: Re: How to persist null values with JSF2?
 To: users@myfaces.apache.org
 Date: Monday, January 10, 2011, 9:48 AM
 
 I've also set this context parameter to true, but entity
 properties are not
 set to null. I got empty strings and 0 again. After that,
 I've downloaded a
 small JSF 2 example and deployed it. I got the same problem
 again. With
 MyFaces 2.0.3 and Tomcat 6.0.29. What am I doing wrong?
 :-(
 
 Titus
 
 
 
 
 Jakob Korherr wrote:
  
  Hi,
  
  As for JSF 2.0, setting
 
 javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
 to true
  should do the trick.
  
  I just tested it with MyFaces 2.0.3 and it worked fine
 (for both
  String and Integer properties).
  
  Regards,
  Jakob
  
  2011/1/8 Marsman mars@gmx.de:
 
  Hi!
 
  Since migrated my application to JSF 2 I'm no able
 to persist an empty to
  null converted value in the database. The values
 passed in
  managedBean.setModel(model) are empty strings for
 example again. I'm
  looking
  for a reason of this behaviour for a few days now
 and would be happy, if
  anybody can help me. Here are some snippets of my
 code:
 
   ...
 
  Titus
 
 
  --
  View this message in context:
 
 http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30622750.html
  Sent from the MyFaces - Users mailing list archive
 at Nabble.com.
 
 
  
  
  
  -- 
  Jakob Korherr
  
  blog: http://www.jakobk.com
  twitter: http://twitter.com/jakobkorherr
  work: http://www.irian.at
  
  
 
 -- 
 View this message in context:
 http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30632274.html
 Sent from the MyFaces - Users mailing list archive at
 Nabble.com.
 
 
 
 
 
 
 

-- 
View this message in context: 
http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30633911.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: How to persist null values with JSF2?

2011-01-10 Thread Mark Struberg
Hmm, works perfectly over here when adding the following to web.xml:
context-param

param-namejavax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL/param-name
param-valuetrue/param-value
/context-param

as Jakob already suggested.

LieGrue,
strub

--- On Mon, 1/10/11, Marsman mars@gmx.de wrote:

 From: Marsman mars@gmx.de
 Subject: Re: How to persist null values with JSF2?
 To: users@myfaces.apache.org
 Date: Monday, January 10, 2011, 1:52 PM
 
 
 The action on the commandButton calls a save()-Method in my
 backing bean. At
 this point, I got the empty fields instead of null. You can
 see this in my
 initial post. I'm using JPA with Hibernate.
 
 Titus
 
 
 
 struberg wrote:
  
  Did you do your debugging in your backing bean action
 or do you only look
  at the database? If JPA is involved, then the jpa
 provider may replace
  null with empty strings (known issue on oracle).
  
  LieGrue,
  strub
  
  --- On Mon, 1/10/11, Marsman mars@gmx.de
 wrote:
  
  From: Marsman mars@gmx.de
  Subject: Re: How to persist null values with
 JSF2?
  To: users@myfaces.apache.org
  Date: Monday, January 10, 2011, 9:48 AM
  
  I've also set this context parameter to true, but
 entity
  properties are not
  set to null. I got empty strings and 0 again.
 After that,
  I've downloaded a
  small JSF 2 example and deployed it. I got the
 same problem
  again. With
  MyFaces 2.0.3 and Tomcat 6.0.29. What am I doing
 wrong?
  :-(
  
  Titus
  
  
  
  
  Jakob Korherr wrote:
   
   Hi,
   
   As for JSF 2.0, setting
  
 
 javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL
  to true
   should do the trick.
   
   I just tested it with MyFaces 2.0.3 and it
 worked fine
  (for both
   String and Integer properties).
   
   Regards,
   Jakob
   
   2011/1/8 Marsman mars@gmx.de:
  
   Hi!
  
   Since migrated my application to JSF 2
 I'm no able
  to persist an empty to
   null converted value in the database. The
 values
  passed in
   managedBean.setModel(model) are empty
 strings for
  example again. I'm
   looking
   for a reason of this behaviour for a few
 days now
  and would be happy, if
   anybody can help me. Here are some
 snippets of my
  code:
  
    ...
  
   Titus
  
  
   --
   View this message in context:
  
  http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30622750.html
   Sent from the MyFaces - Users mailing
 list archive
  at Nabble.com.
  
  
   
   
   
   -- 
   Jakob Korherr
   
   blog: http://www.jakobk.com
   twitter: http://twitter.com/jakobkorherr
   work: http://www.irian.at
   
   
  
  -- 
  View this message in context:
  http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30632274.html
  Sent from the MyFaces - Users mailing list archive
 at
  Nabble.com.
  
  
  
  
  
  
  
 
 -- 
 View this message in context: 
 http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30633911.html
 Sent from the MyFaces - Users mailing list archive at
 Nabble.com.
 
 





Re: How to persist null values with JSF2?

2011-01-10 Thread Marsman

After googling another 2 hours I found the solution: Since tomcat 6.0.16 we
have to add the org.apache.el.parser.COERCE_TO_ZERO=false VM argument.
@Strub: Did you have set this VM argument too?

For more infos: 
http://balusc.blogspot.com/2008/07/dao-tutorial-use-in-jsf.html#EmptyToNullConverter
EmptyToNullConverter 



struberg wrote:
 
 Hmm, works perfectly over here when adding the following to web.xml:
 context-param

 param-namejavax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL/param-name
 param-valuetrue/param-value
 /context-param
 
 as Jakob already suggested.
 
 LieGrue,
 strub
 
 --- On Mon, 1/10/11, Marsman mars@gmx.de wrote:
 
 From: Marsman mars@gmx.de
 Subject: Re: How to persist null values with JSF2?
 To: users@myfaces.apache.org
 Date: Monday, January 10, 2011, 1:52 PM
 
 
 The action on the commandButton calls a save()-Method in my
 backing bean. At
 this point, I got the empty fields instead of null. You can
 see this in my
 initial post. I'm using JPA with Hibernate.
 
 Titus
 
 
 
 struberg wrote:
  
  Did you do your debugging in your backing bean action
 or do you only look
  at the database? If JPA is involved, then the jpa
 provider may replace
  null with empty strings (known issue on oracle).
  
  LieGrue,
  strub
  
  --- On Mon, 1/10/11, Marsman mars@gmx.de
 wrote:
  
 
 

-- 
View this message in context: 
http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30634470.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: How to persist null values with JSF2?

2011-01-10 Thread Mark Struberg
nope, I found the tomcat 7 EL to be buggy back when I did need it (should 
re-evaluate it soon) and use juel now [1]

LieGrue,
strub

[1] https://github.com/struberg/juel

--- On Mon, 1/10/11, Marsman mars@gmx.de wrote:

 From: Marsman mars@gmx.de
 Subject: Re: How to persist null values with JSF2?
 To: users@myfaces.apache.org
 Date: Monday, January 10, 2011, 2:59 PM
 
 After googling another 2 hours I found the solution: Since
 tomcat 6.0.16 we
 have to add the org.apache.el.parser.COERCE_TO_ZERO=false
 VM argument.
 @Strub: Did you have set this VM argument too?
 
 For more infos: 
 http://balusc.blogspot.com/2008/07/dao-tutorial-use-in-jsf.html#EmptyToNullConverter
 EmptyToNullConverter 
 
 
 
 struberg wrote:
  
  Hmm, works perfectly over here when adding the
 following to web.xml:
      context-param
         
 
 param-namejavax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL/param-name
      
    param-valuetrue/param-value
      /context-param
  
  as Jakob already suggested.
  
  LieGrue,
  strub
  
  --- On Mon, 1/10/11, Marsman mars@gmx.de
 wrote:
  
  From: Marsman mars@gmx.de
  Subject: Re: How to persist null values with
 JSF2?
  To: users@myfaces.apache.org
  Date: Monday, January 10, 2011, 1:52 PM
  
  
  The action on the commandButton calls a
 save()-Method in my
  backing bean. At
  this point, I got the empty fields instead of
 null. You can
  see this in my
  initial post. I'm using JPA with Hibernate.
  
  Titus
  
  
  
  struberg wrote:
   
   Did you do your debugging in your backing
 bean action
  or do you only look
   at the database? If JPA is involved, then the
 jpa
  provider may replace
   null with empty strings (known issue on
 oracle).
   
   LieGrue,
   strub
   
   --- On Mon, 1/10/11, Marsman mars@gmx.de
  wrote:
   
  
  
 
 -- 
 View this message in context: 
 http://old.nabble.com/How-to-persist-null-values-with-JSF2--tp30622750p30634470.html
 Sent from the MyFaces - Users mailing list archive at
 Nabble.com.
 
 





global validation of all input fields in order to remove forbidden chars?

2011-01-10 Thread Michael Heinen

 Hi,

My app does not work correctly if a user enters an ISO control character 
(e.g. 'START OF HEADING' (U+0001) or ALT+01) in an input field.
I get a xml parsing error on client side if the illegal char is inside 
an attribute (here the value attribute of an input field).

This happens with richfaces in combination with the neko parser.

There seems to be only one solution: Do not allow these special chars 
during input!


Question:
What is the best approach for validating all input fields in a generic way?
Note that the illegal chars must be removed from the value attribute of 
the input field otherwise the rerendering of the errornous input field 
fails again.


Thanks,
Michael