Bug Tracker

Opened 10 years ago

Closed 9 years ago

Last modified 8 years ago

#5359 closed enhancement (invalid)

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)]+)$/

Change History (5)

comment:1 Changed 10 years ago by dmethvin

Can you provide a url for the portlets standard?

comment:2 Changed 10 years ago by ivan_ra

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

comment:3 Changed 10 years ago by ivan_ra

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

comment:4 Changed 9 years ago by Rick Waldron

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

comment:5 Changed 9 years ago by snover

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.

Note: See TracTickets for help on using tickets.