« Return to Thread: [jira] Created: (TRINIDAD-1109) Support non-standard user agents

[jira] Commented: (TRINIDAD-1109) Support non-standard user agents

by My Faces - Dev mailing list :: Rate this Message:

Reply to Author | View in Thread


    [ https://issues.apache.org/jira/browse/TRINIDAD-1109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615376#action_12615376 ]

Andrew Robinson commented on TRINIDAD-1109:
-------------------------------------------

The use case for @agent unknown IMO would be much like the HTML <NOFRAMES> or <NOSCRIPT> tags. It gives the ability for web developers to be able to catch the use case of notifying the user that they are not supported.

For example:

I write and application that only support FF3 because I am an open source geek.

Now, to be "friendly" to users, I create a page to let non FF3 users know that their browser stinks and is not secure.

In that page, I can either (1) use a bunch of custom CSS style classes to style the page in the Trinidad skin, (2) use inlineStyle on the page or (3) use @agent to target the browser.

Of the 3 options, #3 is the most maintainable and extentable. By this I mean that I can (1) create more error pages or unsupported pages than one without having to re-skin them, (2) I don't have to maintain possibly large numbers of CSS classes for unsupported browsers, the components are skinned correctly and (3) I have one place to make changes to these pages if I want to completely redo them.

I don't think that the use case would be very frequent, but in the same regard that NOFRAMES and NOSCRIPT have a place, I think a notion of an unsupported or unknown @agent has a place as well.

Well that is my 2 cents.



> Support non-standard user agents
> --------------------------------
>
>                 Key: TRINIDAD-1109
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1109
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>          Components: Skinning
>    Affects Versions:  1.0.8-core,  1.2.8-core
>         Environment: User agent string: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.9 (like Gecko)
>            Reporter: Alexey Stukalov
>
> Trinidad should be able to render the request for non-supported user agents.
> Since 1.x.9 version, user agent's version is mandatory.
> If user agent is not recognized and its version is not set, exceptions are thrown:
>   1) on initial request - "version must be non-null" NPE in org.apache.myfaces.trinidad.context.Version._checkNonEmptyString(Version.java:197)
>   2) on subsequent requests - NPE in org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache$Key.hashCode(FileSystemStyleCache.java:1131)
> The proposed policy is to provide "default" rendering for those agent's that are not recognized/partially recognized (agent type or platform identified, but not version etc).

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

 « Return to Thread: [jira] Created: (TRINIDAD-1109) Support non-standard user agents

LightInTheBox - Buy quality products at wholesale price!