AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Matthias Kahlau
 There's a use case where I encounter a problem with my solution. When a
 validation error occurs in the process validations phase, all the radio
 buttons shown in the HtmlDataTable aren't rendered when the page is
 redisplayed.

 Why I try to evaluate the HtmlSelectOneRadio components in this
 view state,
 I get a runtime error because the components aren't fully initialized. The
 component values / value classes are of the following type, for example:

 value = [EMAIL PROTECTED]
 value class = org.apache.myfaces.renderkit.RendererUtils$1


Is it possible to solve this problem, or is this a dead end?


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Matthias Kahlau
 Gesendet: Freitag, 10. Februar 2006 22:36
 An: MyFaces Discussion; [EMAIL PROTECTED]
 Betreff: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio
 components inside UIData (programmatically created UI)


 Hi!

 There's a use case where I encounter a problem with my solution. When a
 validation error occurs in the process validations phase, all the radio
 buttons shown in the HtmlDataTable aren't rendered when the page is
 redisplayed.

 Why I try to evaluate the HtmlSelectOneRadio components in this
 view state,
 I get a runtime error because the components aren't fully initialized. The
 component values / value classes are of the following type, for example:

 value = [EMAIL PROTECTED]
 value class = org.apache.myfaces.renderkit.RendererUtils$1


 Do you know how this can be prevented?



 Regards,

 Matthias

  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Auftrag
  von Martin Marinschek
  Gesendet: Freitag, 10. Februar 2006 11:27
  An: MyFaces Discussion
  Betreff: Re: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio
  components inside UIData (programmatically created UI)
 
 
  It's never too late to start ;)
 
  hint-hint ;)
 
  regards,
 
  Martin
 
  On 2/10/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
Wo-ow.
   
interesting solution. I still think writing that patch for MyFaces
would have been the faster way of getting this to run ;)
  
   Maybe for you, but not for me, who has never written a patch or
  extended a
   component or renderer ...
  
  
   Regards,
  
   Matthias
  
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
   
  [mailto:[EMAIL PROTECTED] Auftrag
von Martin Marinschek
Gesendet: Freitag, 10. Februar 2006 10:12
An: MyFaces Discussion
Betreff: Re: AW: Problem with evaluation of Tomahawk
  HtmlSelectOneRadio
components inside UIData (programmatically created UI)
   
   
Wo-ow.
   
interesting solution. I still think writing that patch for MyFaces
would have been the faster way of getting this to run ;)
   
regards,
   
Martin
   
On 2/9/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
 Hi Volker,


 many thanks, it works now. I already tested it with the
HtmlSelectOneRadio
 components outside of UIData, but I got runtime errors because
they hadn't
 been found for the related HtmlRadio components. That's why I
added them as
 children to UIData, what solved the error, but the evaluation
didn't work.

 Using the HtmlSelectOneRadio components outside of UIData
  and specifying
 absolute IDs in the for attribute did the trick... Now I
  can use a table
 with table headers for each column, what hadn't been possible with
 HtmlPanelGrid.


 Regards,

 Matthias

  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED]
 
   
  [mailto:[EMAIL PROTECTED] Auftrag
  von Volker Weber
  Gesendet: Donnerstag, 9. Februar 2006 11:18
  An: MyFaces Discussion
  Betreff: Re: AW: Problem with evaluation of Tomahawk
HtmlSelectOneRadio
  components inside UIData (programmatically created UI)
 
 
  Hi Matthias,
 
  just an idea, may work or not, but worth a try imho:
 
  put the HtmlSelectOneRadio component(s) somewhere out of
  the uidata
  (e.g. as child of viewRoot) and set a id, also set a id
  to all parent
  namingcontainers.
 
  in the for attribute of the HtmlRadio components use a
absolute id (e.g.
  :[id_of_viewRoot]:[id_of_HtmlSelectOneRadio], if
HtmlSelectOneRadio is
  on top level).
 
  Not sure if this will work, but after a short look into
  HtmlRadioRenderer.java and implementation of
  findComponent() i think
  this could work.
 
  Regards,
Volker
 
  Matthias Kahlau wrote:
  For UIData, not a thousand components represent thousand rows,
  but only one.
  
  
   But I didn't use only one HtmlSelectOneRadio component
  for all rows.
   Instead, I use many HtmlSelectOneRadio components, one
component for one
   row.
  
   Using one HtmlSelectOneRadio component for all

Re: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Volker Weber
Hi Matthias,

i created a small test page (see attached files), but i can't reproduce
your problem. All works as expected, also when validation fails.

Please provide more info about what you are doing and your tree structure.

Regards,
  Volker

Matthias Kahlau wrote:
There's a use case where I encounter a problem with my solution. When a
validation error occurs in the process validations phase, all the radio
buttons shown in the HtmlDataTable aren't rendered when the page is
redisplayed.

Why I try to evaluate the HtmlSelectOneRadio components in this
view state,
I get a runtime error because the components aren't fully initialized. The
component values / value classes are of the following type, for example:

value = [EMAIL PROTECTED]
value class = org.apache.myfaces.renderkit.RendererUtils$1
 
 
 
 Is it possible to solve this problem, or is this a dead end?
 
 
 Regards,
 
 Matthias
 
 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.
%@ page session=false contentType=text/html;charset=utf-8%
%@ taglib uri=http://java.sun.com/jsf/html; prefix=h%
%@ taglib uri=http://java.sun.com/jsf/core; prefix=f%
%@ taglib uri=http://myfaces.apache.org/tomahawk; prefix=t%
html

!--
/*
 * Copyright 2004 The Apache Software Foundation.
 * 
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *  http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
//--

[EMAIL PROTECTED] file=inc/head.inc %

body

!--
managed beans used:
countryList
--

f:view

  h:form id=form
f:loadBundle 
basename=org.apache.myfaces.examples.resource.example_messages 
var=example_messages/

t:selectOneRadio id=select value=#{testBean.value} layout=spread 
validator=#{testBean.validateInput}
  f:selectItems value=#{testBean.items} /
/t:selectOneRadio

t:dataTable id=data
var=row
value=#{testBean.values}
rowIndexVar=rowIndex
preserveDataModel=true 
   h:column
   f:facet name=header
  h:outputText value=header 1 /
   /f:facet
   h:outputText value=#{row} /
   /h:column

   h:column
   f:facet name=header
  h:outputText value=header 2 /
   /f:facet
   t:radio for=:form:select index=#{rowIndex}/
   /h:column

/t:dataTable

  p/
  h:outputText value=aktuell ist #{testBean.value}/
  p/
  h:commandButton value=submit/

  h:messages /

  /h:form
/f:view

/body

/htmlpackage org.apache.myfaces.examples.test;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import javax.faces.model.SelectItem;
import javax.faces.context.FacesContext;
import javax.faces.component.UIComponent;
import javax.faces.application.FacesMessage;
import java.util.List;
import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: weber
 * Date: 12.02.2006
 * Time: 21:11:09
 * To change this template use File | Settings | File Templates.
 */
public class TestBean {

  private static final Log LOG = LogFactory.getLog(TestBean.class);

  List values ;
  SelectItem[] items;

  Object value;

  public TestBean() {
values = new ArrayList();

values.add(eins);
values.add(zwei);
values.add(drei);
values.add(vier);

items = new SelectItem[values.size()];

for (int i = 0; i items.length; i++) {
  items[i] = new SelectItem(values.get(i), values.get(i).toString().toUpperCase());
}
  }

  public void validateInput(FacesContext facesContext, UIComponent component, Object testValue) {

LOG.info(testValue = \ + testValue + \);

if (values.get(values.size() - 1).equals(testValue)) {
  facesContext.addMessage(null, new FacesMessage(don't select last row!));
  facesContext.renderResponse();
}

  }

  public List getValues() {
return values;
  }

  public void setValues(List values) {
this.values = values;
  }

  public SelectItem[] getItems() {
return items;
  }

  public void setItems(SelectItem[] items) {
this.items = items;
  }

  public Object getValue() {
return value;
  }

  public void setValue(Object value) {
this.value = value;
  }
}


AW: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Matthias Kahlau
Hi Volker!

Thanks for your support. I'm not sure, but maybe you should try throwing a
javax.faces.validator.ValidatorException in your validation method when your
validation fails.

I don't use a validation method. I use required=true, and when nothing is
entered, a standard validation error occurs displaying the same view again.

My tree structure depends on the survey that is shown to the user. In my
example where the error occurred, there have been two data tables with some
rows of radio buttons and other components for other question types, e. g. 2
HtmlSelectOneMenu, 4 HtmlSelectManyCheckbox, some HtmlInputText and
HtmlInputTextarea. The components are all children of the one form used in
the view.

All works fine, except when a validation error had occured, so please try
with a standard validation error.


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Sonntag, 12. Februar 2006 23:46
 An: MyFaces Discussion
 Betreff: Re: AW: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio components inside UIData (programmatically created
 UI)


 Hi Matthias,

 i created a small test page (see attached files), but i can't reproduce
 your problem. All works as expected, also when validation fails.

 Please provide more info about what you are doing and your tree structure.

 Regards,
   Volker

 Matthias Kahlau wrote:
 There's a use case where I encounter a problem with my solution. When a
 validation error occurs in the process validations phase, all the radio
 buttons shown in the HtmlDataTable aren't rendered when the page is
 redisplayed.
 
 Why I try to evaluate the HtmlSelectOneRadio components in this
 view state,
 I get a runtime error because the components aren't fully
 initialized. The
 component values / value classes are of the following type, for example:
 
 value = [EMAIL PROTECTED]
 value class = org.apache.myfaces.renderkit.RendererUtils$1
 
 
 
  Is it possible to solve this problem, or is this a dead end?
 
 
  Regards,
 
  Matthias
 
 

 --
 Don't answer to From: address!
 Mail to this account are droped if not recieved via mailinglist.
 To contact me direct create the mail address by
 concatenating my forename to my senders domain.




Re: AW: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Volker Weber
Hi,

Matthias Kahlau wrote:
 Hi Volker!
 
 Thanks for your support. I'm not sure, but maybe you should try throwing a
 javax.faces.validator.ValidatorException in your validation method when your
 validation fails.
 
 I don't use a validation method. I use required=true, and when nothing is
 entered, a standard validation error occurs displaying the same view again.

same with required=true instead of validation method here.


 
 My tree structure depends on the survey that is shown to the user. In my
 example where the error occurred, there have been two data tables with some
 rows of radio buttons and other components for other question types, e. g. 2
 HtmlSelectOneMenu, 4 HtmlSelectManyCheckbox, some HtmlInputText and
 HtmlInputTextarea. The components are all children of the one form used in
 the view.
 
 All works fine, except when a validation error had occured, so please try
 with a standard validation error.
 
 
 Regards,
 
 Matthias
 
 
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Auftrag
von Volker Weber
Gesendet: Sonntag, 12. Februar 2006 23:46
An: MyFaces Discussion
Betreff: Re: AW: AW: Problem with evaluation of Tomahawk
HtmlSelectOneRadio components inside UIData (programmatically created
UI)


Hi Matthias,

i created a small test page (see attached files), but i can't reproduce
your problem. All works as expected, also when validation fails.

Please provide more info about what you are doing and your tree structure.

Regards,
  Volker

Matthias Kahlau wrote:

There's a use case where I encounter a problem with my solution. When a
validation error occurs in the process validations phase, all the radio
buttons shown in the HtmlDataTable aren't rendered when the page is
redisplayed.

Why I try to evaluate the HtmlSelectOneRadio components in this
view state,
I get a runtime error because the components aren't fully

initialized. The

component values / value classes are of the following type, for example:

value = [EMAIL PROTECTED]
value class = org.apache.myfaces.renderkit.RendererUtils$1



Is it possible to solve this problem, or is this a dead end?


Regards,

Matthias



--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.

 
 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


Re: AW: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Volker Weber


Volker Weber wrote:
 Hi,
 
 Matthias Kahlau wrote:
 
Hi Volker!

Thanks for your support. I'm not sure, but maybe you should try throwing a
javax.faces.validator.ValidatorException in your validation method when your
validation fails.

I don't use a validation method. I use required=true, and when nothing is
entered, a standard validation error occurs displaying the same view again.
 
 
 same with required=true instead of validation method here.

I would say all works as expected when required=true

 
 
 
My tree structure depends on the survey that is shown to the user. In my
example where the error occurred, there have been two data tables with some
rows of radio buttons and other components for other question types, e. g. 2
HtmlSelectOneMenu, 4 HtmlSelectManyCheckbox, some HtmlInputText and
HtmlInputTextarea. The components are all children of the one form used in
the view.

All works fine, except when a validation error had occured, so please try
with a standard validation error.


Regards,

Matthias



-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Auftrag
von Volker Weber
Gesendet: Sonntag, 12. Februar 2006 23:46
An: MyFaces Discussion
Betreff: Re: AW: AW: Problem with evaluation of Tomahawk
HtmlSelectOneRadio components inside UIData (programmatically created
UI)


Hi Matthias,

i created a small test page (see attached files), but i can't reproduce
your problem. All works as expected, also when validation fails.

Please provide more info about what you are doing and your tree structure.

Regards,
 Volker

Matthias Kahlau wrote:


There's a use case where I encounter a problem with my solution. When a
validation error occurs in the process validations phase, all the radio
buttons shown in the HtmlDataTable aren't rendered when the page is
redisplayed.

Why I try to evaluate the HtmlSelectOneRadio components in this
view state,
I get a runtime error because the components aren't fully

initialized. The


component values / value classes are of the following type, for example:

value = [EMAIL PROTECTED]
value class = org.apache.myfaces.renderkit.RendererUtils$1



Is it possible to solve this problem, or is this a dead end?


Regards,

Matthias



--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.



 

-- 
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.


AW: AW: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Matthias Kahlau
Hi!

You're using JSP. I don't know if this makes a difference. What else should
I describe?

Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Montag, 13. Februar 2006 00:44
 An: MyFaces Discussion
 Betreff: Re: AW: AW: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio components inside UIData (programmatically created
 UI)




 Volker Weber wrote:
  Hi,
 
  Matthias Kahlau wrote:
 
 Hi Volker!
 
 Thanks for your support. I'm not sure, but maybe you should try
 throwing a
 javax.faces.validator.ValidatorException in your validation
 method when your
 validation fails.
 
 I don't use a validation method. I use required=true, and
 when nothing is
 entered, a standard validation error occurs displaying the same
 view again.
 
 
  same with required=true instead of validation method here.

 I would say all works as expected when required=true

 
 
 
 My tree structure depends on the survey that is shown to the user. In my
 example where the error occurred, there have been two data
 tables with some
 rows of radio buttons and other components for other question
 types, e. g. 2
 HtmlSelectOneMenu, 4 HtmlSelectManyCheckbox, some HtmlInputText and
 HtmlInputTextarea. The components are all children of the one
 form used in
 the view.
 
 All works fine, except when a validation error had occured, so
 please try
 with a standard validation error.
 
 
 Regards,
 
 Matthias
 
 
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Sonntag, 12. Februar 2006 23:46
 An: MyFaces Discussion
 Betreff: Re: AW: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio components inside UIData (programmatically created
 UI)
 
 
 Hi Matthias,
 
 i created a small test page (see attached files), but i can't reproduce
 your problem. All works as expected, also when validation fails.
 
 Please provide more info about what you are doing and your
 tree structure.
 
 Regards,
  Volker
 
 Matthias Kahlau wrote:
 
 
 There's a use case where I encounter a problem with my
 solution. When a
 validation error occurs in the process validations phase,
 all the radio
 buttons shown in the HtmlDataTable aren't rendered when the page is
 redisplayed.
 
 Why I try to evaluate the HtmlSelectOneRadio components in this
 view state,
 I get a runtime error because the components aren't fully
 
 initialized. The
 
 
 component values / value classes are of the following type,
 for example:
 
 value = [EMAIL PROTECTED]
 value class = org.apache.myfaces.renderkit.RendererUtils$1
 
 
 
 Is it possible to solve this problem, or is this a dead end?
 
 
 Regards,
 
 Matthias
 
 
 
 --
 Don't answer to From: address!
 Mail to this account are droped if not recieved via mailinglist.
 To contact me direct create the mail address by
 concatenating my forename to my senders domain.
 
 
 
 

 --
 Don't answer to From: address!
 Mail to this account are droped if not recieved via mailinglist.
 To contact me direct create the mail address by
 concatenating my forename to my senders domain.



AW: AW: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Matthias Kahlau


Hallo Herr Prof. Dr. Schiefer,
  same with required=true instead of validation method here.

 I would say all works as expected when required=true

BTW: I use required=true in an inpuText, not with the
HtmlSelectOneRadios...


Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Montag, 13. Februar 2006 00:44
 An: MyFaces Discussion
 Betreff: Re: AW: AW: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio components inside UIData (programmatically created
 UI)




 Volker Weber wrote:
  Hi,
 
  Matthias Kahlau wrote:
 
 Hi Volker!
 
 Thanks for your support. I'm not sure, but maybe you should try
 throwing a
 javax.faces.validator.ValidatorException in your validation
 method when your
 validation fails.
 
 I don't use a validation method. I use required=true, and
 when nothing is
 entered, a standard validation error occurs displaying the same
 view again.
 
 
  same with required=true instead of validation method here.

 I would say all works as expected when required=true

 
 
 
 My tree structure depends on the survey that is shown to the user. In my
 example where the error occurred, there have been two data
 tables with some
 rows of radio buttons and other components for other question
 types, e. g. 2
 HtmlSelectOneMenu, 4 HtmlSelectManyCheckbox, some HtmlInputText and
 HtmlInputTextarea. The components are all children of the one
 form used in
 the view.
 
 All works fine, except when a validation error had occured, so
 please try
 with a standard validation error.
 
 
 Regards,
 
 Matthias
 
 
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Sonntag, 12. Februar 2006 23:46
 An: MyFaces Discussion
 Betreff: Re: AW: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio components inside UIData (programmatically created
 UI)
 
 
 Hi Matthias,
 
 i created a small test page (see attached files), but i can't reproduce
 your problem. All works as expected, also when validation fails.
 
 Please provide more info about what you are doing and your
 tree structure.
 
 Regards,
  Volker
 
 Matthias Kahlau wrote:
 
 
 There's a use case where I encounter a problem with my
 solution. When a
 validation error occurs in the process validations phase,
 all the radio
 buttons shown in the HtmlDataTable aren't rendered when the page is
 redisplayed.
 
 Why I try to evaluate the HtmlSelectOneRadio components in this
 view state,
 I get a runtime error because the components aren't fully
 
 initialized. The
 
 
 component values / value classes are of the following type,
 for example:
 
 value = [EMAIL PROTECTED]
 value class = org.apache.myfaces.renderkit.RendererUtils$1
 
 
 
 Is it possible to solve this problem, or is this a dead end?
 
 
 Regards,
 
 Matthias
 
 
 
 --
 Don't answer to From: address!
 Mail to this account are droped if not recieved via mailinglist.
 To contact me direct create the mail address by
 concatenating my forename to my senders domain.
 
 
 
 

 --
 Don't answer to From: address!
 Mail to this account are droped if not recieved via mailinglist.
 To contact me direct create the mail address by
 concatenating my forename to my senders domain.



AW: AW: AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-12 Thread Matthias Kahlau
von Martin Marinschek
Gesendet: Mittwoch, 8. Februar 2006 23:05
the findComponent will deliver a component which is not properly
initialized (it will return the stamp, but not the actual
  initialized
component for this row...)

So what you're really looking for is the functionality I
  implemented a
few weeks ago for findComponent, to return a properly
initialized
component for this row.

This sounds a bit like the problem I encounter, but I have no problem when I
explicitely use the findComponent() method. The problem occurs when JSF
processes the request when a validation error occurs.


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: Matthias Kahlau [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 13. Februar 2006 01:08
 An: MyFaces Discussion
 Betreff: AW: AW: AW: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio components inside UIData (programmatically created
 UI)




 Hallo Herr Prof. Dr. Schiefer,
   same with required=true instead of validation method here.
 
  I would say all works as expected when required=true

 BTW: I use required=true in an inpuText, not with the
 HtmlSelectOneRadios...


 Matthias

  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] Auftrag
  von Volker Weber
  Gesendet: Montag, 13. Februar 2006 00:44
  An: MyFaces Discussion
  Betreff: Re: AW: AW: AW: Problem with evaluation of Tomahawk
  HtmlSelectOneRadio components inside UIData (programmatically created
  UI)
 
 
 
 
  Volker Weber wrote:
   Hi,
  
   Matthias Kahlau wrote:
  
  Hi Volker!
  
  Thanks for your support. I'm not sure, but maybe you should try
  throwing a
  javax.faces.validator.ValidatorException in your validation
  method when your
  validation fails.
  
  I don't use a validation method. I use required=true, and
  when nothing is
  entered, a standard validation error occurs displaying the same
  view again.
  
  
   same with required=true instead of validation method here.
 
  I would say all works as expected when required=true
 
  
  
  
  My tree structure depends on the survey that is shown to the
 user. In my
  example where the error occurred, there have been two data
  tables with some
  rows of radio buttons and other components for other question
  types, e. g. 2
  HtmlSelectOneMenu, 4 HtmlSelectManyCheckbox, some HtmlInputText and
  HtmlInputTextarea. The components are all children of the one
  form used in
  the view.
  
  All works fine, except when a validation error had occured, so
  please try
  with a standard validation error.
  
  
  Regards,
  
  Matthias
  
  
  
  -Ursprüngliche Nachricht-
  Von: [EMAIL PROTECTED]
 
 [mailto:[EMAIL PROTECTED] Auftrag
  von Volker Weber
  Gesendet: Sonntag, 12. Februar 2006 23:46
  An: MyFaces Discussion
  Betreff: Re: AW: AW: Problem with evaluation of Tomahawk
  HtmlSelectOneRadio components inside UIData (programmatically created
  UI)
  
  
  Hi Matthias,
  
  i created a small test page (see attached files), but i
 can't reproduce
  your problem. All works as expected, also when validation fails.
  
  Please provide more info about what you are doing and your
  tree structure.
  
  Regards,
   Volker
  
  Matthias Kahlau wrote:
  
  
  There's a use case where I encounter a problem with my
  solution. When a
  validation error occurs in the process validations phase,
  all the radio
  buttons shown in the HtmlDataTable aren't rendered when the page is
  redisplayed.
  
  Why I try to evaluate the HtmlSelectOneRadio components in this
  view state,
  I get a runtime error because the components aren't fully
  
  initialized. The
  
  
  component values / value classes are of the following type,
  for example:
  
  value = [EMAIL PROTECTED]
  value class = org.apache.myfaces.renderkit.RendererUtils$1
  
  
  
  Is it possible to solve this problem, or is this a dead end?
  
  
  Regards,
  
  Matthias
  
  
  
  --
  Don't answer to From: address!
  Mail to this account are droped if not recieved via mailinglist.
  To contact me direct create the mail address by
  concatenating my forename to my senders domain.
  
  
  
  
 
  --
  Don't answer to From: address!
  Mail to this account are droped if not recieved via mailinglist.
  To contact me direct create the mail address by
  concatenating my forename to my senders domain.



AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-10 Thread Matthias Kahlau
 Wo-ow.

 interesting solution. I still think writing that patch for MyFaces
 would have been the faster way of getting this to run ;)

Maybe for you, but not for me, who has never written a patch or extended a
component or renderer ...


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Martin Marinschek
 Gesendet: Freitag, 10. Februar 2006 10:12
 An: MyFaces Discussion
 Betreff: Re: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio
 components inside UIData (programmatically created UI)


 Wo-ow.

 interesting solution. I still think writing that patch for MyFaces
 would have been the faster way of getting this to run ;)

 regards,

 Martin

 On 2/9/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
  Hi Volker,
 
 
  many thanks, it works now. I already tested it with the
 HtmlSelectOneRadio
  components outside of UIData, but I got runtime errors because
 they hadn't
  been found for the related HtmlRadio components. That's why I
 added them as
  children to UIData, what solved the error, but the evaluation
 didn't work.
 
  Using the HtmlSelectOneRadio components outside of UIData and specifying
  absolute IDs in the for attribute did the trick... Now I can use a table
  with table headers for each column, what hadn't been possible with
  HtmlPanelGrid.
 
 
  Regards,
 
  Matthias
 
   -Ursprüngliche Nachricht-
   Von: [EMAIL PROTECTED]
  
 [mailto:[EMAIL PROTECTED] Auftrag
   von Volker Weber
   Gesendet: Donnerstag, 9. Februar 2006 11:18
   An: MyFaces Discussion
   Betreff: Re: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio
   components inside UIData (programmatically created UI)
  
  
   Hi Matthias,
  
   just an idea, may work or not, but worth a try imho:
  
   put the HtmlSelectOneRadio component(s) somewhere out of the uidata
   (e.g. as child of viewRoot) and set a id, also set a id to all parent
   namingcontainers.
  
   in the for attribute of the HtmlRadio components use a
 absolute id (e.g.
   :[id_of_viewRoot]:[id_of_HtmlSelectOneRadio], if
 HtmlSelectOneRadio is
   on top level).
  
   Not sure if this will work, but after a short look into
   HtmlRadioRenderer.java and implementation of findComponent() i think
   this could work.
  
   Regards,
 Volker
  
   Matthias Kahlau wrote:
   For UIData, not a thousand components represent thousand rows,
   but only one.
   
   
But I didn't use only one HtmlSelectOneRadio component for all rows.
Instead, I use many HtmlSelectOneRadio components, one
 component for one
row.
   
Using one HtmlSelectOneRadio component for all rows had only been a
potential solution. Your explanation kills this idea for the
   moment, but I
think it doesn't explain why my current solution doesn't work...
   
   
Regards,
   
Matthias
   
   
   -Ursprüngliche Nachricht-
   Von: [EMAIL PROTECTED]
  
 [mailto:[EMAIL PROTECTED] Auftrag
   von Martin Marinschek
   Gesendet: Mittwoch, 8. Februar 2006 23:24
   An: Matthias Kahlau
   Cc: MyFaces Discussion
   Betreff: Re: Problem with evaluation of Tomahawk HtmlSelectOneRadio
   components inside UIData (programmatically created UI)
   
   
   Yes, it has somehting to do with UIData.
   
   For UIData, not a thousand components represent thousand rows,
   but only one.
   
   Much like in Swing... So it's a little different there...
   
   regards,
   
   Martin
   
   On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
   
   Thanks Martin,
   
   but do you know, why I might get components that aren't properly
   initialized?
   
   I wonder about that, because processing the user input after
   
   locating the
   
   components by using findComponent works for all the other
   
   question types I
   
   use (without UIData), e. g. by using
   
   - only one HtmlSelectOneRadio component and some HtmlRadio
 components,
   - only one HtmlSelectManyCheckbox component and some HtmlCheckbox
   components,
   - only one HtmlInputText or HtmlInputTextarea
   
   Has this sth. to do with UIData?
   
   
   Regards,
   
   Matthias
   
   
   -Ursprüngliche Nachricht-
   Von: [EMAIL PROTECTED]
   
   
  
 [mailto:[EMAIL PROTECTED] Auftrag
   
   von Martin Marinschek
   Gesendet: Mittwoch, 8. Februar 2006 23:05
   An: MyFaces Discussion
   Betreff: Re: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio
   components inside UIData (programmatically created UI)
   
   
   Ok,
   
   I do think I know now what your problem is:
   
   the findComponent will deliver a component which is not properly
   initialized (it will return the stamp, but not the actual
 initialized
   component for this row...)
   
   So what you're really looking for is the functionality I
 implemented a
   few weeks ago for findComponent, to return a properly initialized
   component for this row.
   
   But: I can't help you out with fixing this in the
 radio-renderer right
   now, sorry. And you're

AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-10 Thread Matthias Kahlau
Hi!

There's a use case where I encounter a problem with my solution. When a
validation error occurs in the process validations phase, all the radio
buttons shown in the HtmlDataTable aren't rendered when the page is
redisplayed.

Why I try to evaluate the HtmlSelectOneRadio components in this view state,
I get a runtime error because the components aren't fully initialized. The
component values / value classes are of the following type, for example:

value = [EMAIL PROTECTED]
value class = org.apache.myfaces.renderkit.RendererUtils$1


Do you know how this can be prevented?



Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Martin Marinschek
 Gesendet: Freitag, 10. Februar 2006 11:27
 An: MyFaces Discussion
 Betreff: Re: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio
 components inside UIData (programmatically created UI)


 It's never too late to start ;)

 hint-hint ;)

 regards,

 Martin

 On 2/10/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
   Wo-ow.
  
   interesting solution. I still think writing that patch for MyFaces
   would have been the faster way of getting this to run ;)
 
  Maybe for you, but not for me, who has never written a patch or
 extended a
  component or renderer ...
 
 
  Regards,
 
  Matthias
 
   -Ursprüngliche Nachricht-
   Von: [EMAIL PROTECTED]
  
 [mailto:[EMAIL PROTECTED] Auftrag
   von Martin Marinschek
   Gesendet: Freitag, 10. Februar 2006 10:12
   An: MyFaces Discussion
   Betreff: Re: AW: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio
   components inside UIData (programmatically created UI)
  
  
   Wo-ow.
  
   interesting solution. I still think writing that patch for MyFaces
   would have been the faster way of getting this to run ;)
  
   regards,
  
   Martin
  
   On 2/9/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
Hi Volker,
   
   
many thanks, it works now. I already tested it with the
   HtmlSelectOneRadio
components outside of UIData, but I got runtime errors because
   they hadn't
been found for the related HtmlRadio components. That's why I
   added them as
children to UIData, what solved the error, but the evaluation
   didn't work.
   
Using the HtmlSelectOneRadio components outside of UIData
 and specifying
absolute IDs in the for attribute did the trick... Now I
 can use a table
with table headers for each column, what hadn't been possible with
HtmlPanelGrid.
   
   
Regards,
   
Matthias
   
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]

  
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Donnerstag, 9. Februar 2006 11:18
 An: MyFaces Discussion
 Betreff: Re: AW: Problem with evaluation of Tomahawk
   HtmlSelectOneRadio
 components inside UIData (programmatically created UI)


 Hi Matthias,

 just an idea, may work or not, but worth a try imho:

 put the HtmlSelectOneRadio component(s) somewhere out of
 the uidata
 (e.g. as child of viewRoot) and set a id, also set a id
 to all parent
 namingcontainers.

 in the for attribute of the HtmlRadio components use a
   absolute id (e.g.
 :[id_of_viewRoot]:[id_of_HtmlSelectOneRadio], if
   HtmlSelectOneRadio is
 on top level).

 Not sure if this will work, but after a short look into
 HtmlRadioRenderer.java and implementation of
 findComponent() i think
 this could work.

 Regards,
   Volker

 Matthias Kahlau wrote:
 For UIData, not a thousand components represent thousand rows,
 but only one.
 
 
  But I didn't use only one HtmlSelectOneRadio component
 for all rows.
  Instead, I use many HtmlSelectOneRadio components, one
   component for one
  row.
 
  Using one HtmlSelectOneRadio component for all rows had
 only been a
  potential solution. Your explanation kills this idea for the
 moment, but I
  think it doesn't explain why my current solution doesn't work...
 
 
  Regards,
 
  Matthias
 
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]

  
 [mailto:[EMAIL PROTECTED] Auftrag
 von Martin Marinschek
 Gesendet: Mittwoch, 8. Februar 2006 23:24
 An: Matthias Kahlau
 Cc: MyFaces Discussion
 Betreff: Re: Problem with evaluation of Tomahawk
 HtmlSelectOneRadio
 components inside UIData (programmatically created UI)
 
 
 Yes, it has somehting to do with UIData.
 
 For UIData, not a thousand components represent thousand rows,
 but only one.
 
 Much like in Swing... So it's a little different there...
 
 regards,
 
 Martin
 
 On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
 
 Thanks Martin,
 
 but do you know, why I might get components that
 aren't properly
 initialized?
 
 I wonder about that, because processing

AW: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio components inside UIData (programmatically created UI)

2006-02-09 Thread Matthias Kahlau
Hi Volker,


many thanks, it works now. I already tested it with the HtmlSelectOneRadio
components outside of UIData, but I got runtime errors because they hadn't
been found for the related HtmlRadio components. That's why I added them as
children to UIData, what solved the error, but the evaluation didn't work.

Using the HtmlSelectOneRadio components outside of UIData and specifying
absolute IDs in the for attribute did the trick... Now I can use a table
with table headers for each column, what hadn't been possible with
HtmlPanelGrid.


Regards,

Matthias

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Volker Weber
 Gesendet: Donnerstag, 9. Februar 2006 11:18
 An: MyFaces Discussion
 Betreff: Re: AW: Problem with evaluation of Tomahawk HtmlSelectOneRadio
 components inside UIData (programmatically created UI)


 Hi Matthias,

 just an idea, may work or not, but worth a try imho:

 put the HtmlSelectOneRadio component(s) somewhere out of the uidata
 (e.g. as child of viewRoot) and set a id, also set a id to all parent
 namingcontainers.

 in the for attribute of the HtmlRadio components use a absolute id (e.g.
 :[id_of_viewRoot]:[id_of_HtmlSelectOneRadio], if HtmlSelectOneRadio is
 on top level).

 Not sure if this will work, but after a short look into
 HtmlRadioRenderer.java and implementation of findComponent() i think
 this could work.

 Regards,
   Volker

 Matthias Kahlau wrote:
 For UIData, not a thousand components represent thousand rows,
 but only one.
 
 
  But I didn't use only one HtmlSelectOneRadio component for all rows.
  Instead, I use many HtmlSelectOneRadio components, one component for one
  row.
 
  Using one HtmlSelectOneRadio component for all rows had only been a
  potential solution. Your explanation kills this idea for the
 moment, but I
  think it doesn't explain why my current solution doesn't work...
 
 
  Regards,
 
  Matthias
 
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] Auftrag
 von Martin Marinschek
 Gesendet: Mittwoch, 8. Februar 2006 23:24
 An: Matthias Kahlau
 Cc: MyFaces Discussion
 Betreff: Re: Problem with evaluation of Tomahawk HtmlSelectOneRadio
 components inside UIData (programmatically created UI)
 
 
 Yes, it has somehting to do with UIData.
 
 For UIData, not a thousand components represent thousand rows,
 but only one.
 
 Much like in Swing... So it's a little different there...
 
 regards,
 
 Martin
 
 On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
 
 Thanks Martin,
 
 but do you know, why I might get components that aren't properly
 initialized?
 
 I wonder about that, because processing the user input after
 
 locating the
 
 components by using findComponent works for all the other
 
 question types I
 
 use (without UIData), e. g. by using
 
 - only one HtmlSelectOneRadio component and some HtmlRadio components,
 - only one HtmlSelectManyCheckbox component and some HtmlCheckbox
 components,
 - only one HtmlInputText or HtmlInputTextarea
 
 Has this sth. to do with UIData?
 
 
 Regards,
 
 Matthias
 
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 
 
 [mailto:[EMAIL PROTECTED] Auftrag
 
 von Martin Marinschek
 Gesendet: Mittwoch, 8. Februar 2006 23:05
 An: MyFaces Discussion
 Betreff: Re: Problem with evaluation of Tomahawk HtmlSelectOneRadio
 components inside UIData (programmatically created UI)
 
 
 Ok,
 
 I do think I know now what your problem is:
 
 the findComponent will deliver a component which is not properly
 initialized (it will return the stamp, but not the actual initialized
 component for this row...)
 
 So what you're really looking for is the functionality I implemented a
 few weeks ago for findComponent, to return a properly initialized
 component for this row.
 
 But: I can't help you out with fixing this in the radio-renderer right
 now, sorry. And you're in stress, too, to get your thesis finished,
 right? So I really don't know how to fix this. no clue.
 
 Anyone else able to help?
 
 regards,
 
 Martin
 
 On 2/8/06, Matthias Kahlau [EMAIL PROTECTED] wrote:
 
 Hi Martin!
 
 If you can't imagine the cause of the problem, maybe you can
 
 give me a hint
 
 to a workable solution using HtmlDataTable ...
 
 
 Regards,
 
 Matthias
 
 
 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 
 
 [mailto:[EMAIL PROTECTED] Auftrag
 
 von Matthias Kahlau
 Gesendet: Mittwoch, 8. Februar 2006 20:45
 An: MyFaces Discussion; [EMAIL PROTECTED]
 Betreff: AW: Problem with evaluation of Tomahawk
 
 HtmlSelectOneRadio
 
 components inside UIData (programmatically created UI)
 
 
 I didn't use JSP, the UI is programmatically created.
 
 This is a part of the method which adds HtmlSelectOneRadio
 components to the
 HtmlDataTable:
 
 HtmlDataTable table = new HtmlDataTable();
 this.form.getChildren().add(table);
 table.setId(this.viewRoot.createUniqueId());
 table.setVar(row);
 table.setBorder(1