myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renzo Tomaselli <>
Subject Re: [Trinidad] js error on PPR after client-side validation error
Date Mon, 05 Nov 2007 08:23:16 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Matthias, here's a page chunk:<br>
&lt;tr:panelGroupLayout partialTriggers="add remove update"&gt;<br>
&nbsp;&nbsp;&nbsp; &lt;tr:panelHorizontalLayout id="prop" partialTriggers="ptype"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:selectOneChoice id="ptype"
simple="true" autoSubmit="true"&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
&lt;f:selectItems value="#{bean.propTypes}"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/tr:selectOneChoice&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:inputText id="intValue"
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:selectBooleanCheckbox
id="boolValue" simple="true"
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:commandButton id="update"
action="#{bean.update}" partialSubmit="true"/&gt;<br>
Here selecting a type by "ptype" refreshes the panel, thus rendering a
different input field.<br>
But in the meantime I discovered that if I use distinct ids for
involved input fields - then the problem disappears. In this example,
if&nbsp; "intValue" and "boolValue" would be the same string, we would get
the reported problem. This shouldn't be necessary since they are
mutually exclusive, but it seems that the involved js retains a
validator id no matter if the underlying data type was changed by a PPR.<br>
-- Renzo<br>
Matthias Wessendorf wrote:
  <pre wrap="">Can you post a simple page-code sniplet for that ?


On 11/2/07, Renzo Tomaselli <a class="moz-txt-link-rfc2396E" href="">&lt;;</a>
  <blockquote type="cite">
    <pre wrap="">Hi, while using Trinidad v. 1.0.3, I forced a client-side validation
error by entering an invalid short number.
At the next PPR, I got a js error on Firebug:

"e.getFacesMessage() is not a function"

at line 6199 in Common1_0_3.js (in function _multiValidate). The
involved line appears to be in a catch such as:

   catch (e)
    converterError = true;
    // Populate the failureMap with the current error
    inputFailures[inputFailures.length] = e.getFacesMessage();

where "e" contains "a0.indexOf is not a function".

-- Renzo

  <pre wrap=""><!---->


View raw message