You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Kent Tong (JIRA)" <ji...@apache.org> on 2010/04/10 16:05:44 UTC

[jira] Commented: (WICKET-2832) Output wicket attributes even in ajax response

    [ https://issues.apache.org/jira/browse/WICKET-2832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12855571#action_12855571 ] 

Kent Tong commented on WICKET-2832:
-----------------------------------

I've created a custom locator for Selenium to locate elements generated by wicket components easily. For example, wicket=//myform[2]//name will locate the 3rd element with wicket:id="myform" and then locate an element with wicket:id="name". The code is working fine.

However, due to Wicket-1174, once the element is refreshed by ajax, it will lose the wicket:id and thus the locator will no longer work.

An easy solution is to separate the concept of "strip wicket attributes" from "strip wicket tags". This way the wicket:id can remain without confusing firefox. This can be done easily in the renderComponentTag() method.

> Output wicket attributes even in ajax response
> ----------------------------------------------
>
>                 Key: WICKET-2832
>                 URL: https://issues.apache.org/jira/browse/WICKET-2832
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.4.7
>            Reporter: Kent Tong
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> I am working on a special locator in selenium for Wicket generated pages. For example, one can like wicket:id in a xpath-like locator: //myform//username, which means locating the first element whose wicket:id is "myform" and then locating the first element whose wicket:id is "username".
> The code is working. However, due to WICKET-1174, stripWicketTags in renderComponentTag() is now set to true as long as it is an ajax request. So, if an element is refreshed in an ajax request, it will lose the wicket:id and the locator won't find it.
> To solve the problem, I'd suggest the splitting the concept of "strip wicket attributes" from "strip wicket tags". This way, you can still trip the wicket tags without affecting the wicket:id.

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