myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Renzo Tomaselli <renzo.tomase...@tecnotp.it>
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">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Matthias, here's a page chunk:<br>
<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"
value="#{bean.prop.type}"
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"
simple="true"
value="#{bean.prop.integerValue}"
rendered="#{bean.prop.integerType}"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:selectBooleanCheckbox
id="boolValue" simple="true"
value="#{bean.prop.booleanValue}"
rendered="#{bean.prop.booleanType}"/&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;tr:commandButton id="update"
text="#{msg['doc.update']}"
action="#{bean.update}" partialSubmit="true"/&gt;<br>
...<br>
<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>
<br>
-- Renzo<br>
<br>
Matthias Wessendorf wrote:
<blockquote
 cite="mid:71235db40711030610h532626d2mc2f0acee30fabac6@mail.gmail.com"
 type="cite">
  <pre wrap="">Can you post a simple page-code sniplet for that ?

-M

On 11/2/07, Renzo Tomaselli <a class="moz-txt-link-rfc2396E" href="mailto:renzo.tomaselli@tecnotp.it">&lt;renzo.tomaselli@tecnotp.it&gt;</a>
wrote:
  </pre>
  <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>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
</body>
</html>

Mime
View raw message