Skip to main content

Bug Tracker

Side navigation

#5359 closed enhancement (invalid)

Opened October 13, 2009 07:06AM UTC

Closed October 24, 2010 07:44PM UTC

Last modified March 10, 2012 12:14PM UTC

portlet support in selectors

Reported by: ivan_ra Owned by: john
Priority: low Milestone: 1.5
Component: selector Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:
Description

Current version does not support identifiers generated for portlets. Typical element identifier in portlet is:

formId:elementId:...:subelementId

or

formId:elementId:...:x:...:subelementId - for table elements (where x is number).

Current regexp

quickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]+)$/ does not recognise portlet identifiers.

I suggest to add ":" symbol followed by any word in expression:

quickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-(:\\w)]+)$/

Attachments (0)
Change History (5)

Changed October 13, 2009 11:45PM UTC by dmethvin comment:1

Can you provide a url for the portlets standard?

Changed October 22, 2009 07:15PM UTC by ivan_ra comment:2

Sorry, its not relate only to portlets, but to every java server faces application. I did not find specification about naming in JSF, but found reference to it in JavaDoc for Apache MyFaces realization of JSF:

http://myfaces.apache.org/core12/myfaces-api/apidocs/index.html?javax/faces/component/NamingContainer.html

Changed December 09, 2009 08:18AM UTC by ivan_ra comment:3

You can download official JSF specifications (JSR 252) from page http://www.jcp.org/en/jsr/detail?id=252 or search it on https://javaserverfaces-spec-public.dev.java.net or maybe on http://java.sun.com/javaee/javaserverfaces/.

Just download PDF file and search for 'NamingContainer' or simply open section 3.2.3

My changes for quickExpr works more than 2 month in live project. Its rely only for selectors like '#componentId' where componentId can contain ':' character

Changed October 24, 2010 05:18PM UTC by rwaldron comment:4

milestone: 1.41.5
priority: triviallow

http://www.w3.org/TR/html5/elements.html#the-id-attribute

Reproduced and fixed with jQuery ID escaping from FAQ:

http://jsfiddle.net/4EgWe/1/

I think jQuery could benefit from doing this escaping internally.

Have a look at this from the jQuery FAQ: http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_by_an_ID_that_has_characters_used_in_CSS_notation.3F

Changed October 24, 2010 07:44PM UTC by snover comment:5

resolution: → invalid
status: newclosed

Is it not a valid CSS string if you are trying to match ID with an unescaped :. : is a reserved character in CSS meaning “pseudo-selector”. #foo:bar:baz:qoox is a selector for an element with the id foo and the pseudo-selectors bar, baz, and qoox.