You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Justin McAllister (JIRA)" <ta...@jakarta.apache.org> on 2005/08/31 16:08:05 UTC

[jira] Created: (TAPESTRY-615) ValidationDelegate.renderForFocus() supplies javascript with wrong id

ValidationDelegate.renderForFocus() supplies javascript with wrong id
---------------------------------------------------------------------

         Key: TAPESTRY-615
         URL: http://issues.apache.org/jira/browse/TAPESTRY-615
     Project: Tapestry
        Type: Bug
    Versions: 4.0    
 Reporter: Justin McAllister
    Priority: Minor


The following code will cause javascript issues in firefox
---
<input jwcid="tapestryId@TextField" value="ognl:someValue" id="clientId"/>
<input jwcid="somePalette@CollectivePalette" model="ognl:someModel" selected="ognl:selectedList" />
---

The first line renders:
---
<input type="text" name="tapestryId" value="" id="clientId" "/> 
---

Tapestry will make the js call that will try to set the focus by id tag:
---
Tapestry.set_focus('tapestryId');
---

This makes firefox barf (IE seems fine, I assume that if it can't find an id tag it searches by name)

I suggest that the ValidationDelegate.renderForFocus() method should be:
---
{
  if (priority > _focusPriority)
  {
    if (field.getClientId() != null)
    {
      _focusField = field.getClientId();
    }
    else
    {
      _focusField = field.getName();
    }
    _focusPriority = priority;
  }
}
---

Thanks







-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-615) ValidationDelegate.renderForFocus() supplies javascript with wrong id

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-615?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-615:
-------------------------------------------

    Resolution: Duplicate

> ValidationDelegate.renderForFocus() supplies javascript with wrong id
> ---------------------------------------------------------------------
>
>          Key: TAPESTRY-615
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-615
>      Project: Tapestry
>         Type: Bug
>     Versions: 4.0
>     Reporter: Justin McAllister
>     Priority: Minor

>
> The following code will cause javascript issues in firefox
> ---
> <input jwcid="tapestryId@TextField" value="ognl:someValue" id="clientId"/>
> <input jwcid="somePalette@CollectivePalette" model="ognl:someModel" selected="ognl:selectedList" />
> ---
> The first line renders:
> ---
> <input type="text" name="tapestryId" value="" id="clientId" "/> 
> ---
> Tapestry will make the js call that will try to set the focus by id tag:
> ---
> Tapestry.set_focus('tapestryId');
> ---
> This makes firefox barf (IE seems fine, I assume that if it can't find an id tag it searches by name)
> I suggest that the ValidationDelegate.renderForFocus() method should be:
> ---
> {
>   if (priority > _focusPriority)
>   {
>     if (field.getClientId() != null)
>     {
>       _focusField = field.getClientId();
>     }
>     else
>     {
>       _focusField = field.getName();
>     }
>     _focusPriority = priority;
>   }
> }
> ---
> Thanks

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org