myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeanne Waldman <jeanne.wald...@oracle.com>
Subject Re: [jira] Updated: (TRINIDAD-1547) @agent in skinning should allow for a range of agent versions
Date Tue, 29 Dec 2009 23:08:06 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I tried to apply the patch to 1.2.12.2-branch and I get an error. Have
you tried the patch yourself?<br>
It get an error I've never seen. I'll try googling it. "The chunk size
did not match the number of added/removed lines."<br>
<br>
Jeanne<br>
<br>
Blake Sullivan (JIRA) wrote, On 12/28/2009 4:48 PM PT:
<blockquote
 cite="mid:1707051525.1262047709402.JavaMail.jira@brutus.apache.org"
 type="cite">
  <pre wrap="">     [ <a class="moz-txt-link-freetext" href="https://issues.apache.org/jira/browse/TRINIDAD-1547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel">https://issues.apache.org/jira/browse/TRINIDAD-1547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel</a>
]

Blake Sullivan updated TRINIDAD-1547:
-------------------------------------

    Attachment: JIRA_1547_1_2_2_12_2_doc.patch

Update of original patch with skinning.xml doc fixes and an alias of mozilla to gecko for
@agent rules

  </pre>
  <blockquote type="cite">
    <pre wrap="">@agent in skinning should allow for a range of agent versions
-------------------------------------------------------------

                Key: TRINIDAD-1547
                URL: <a class="moz-txt-link-freetext" href="https://issues.apache.org/jira/browse/TRINIDAD-1547">https://issues.apache.org/jira/browse/TRINIDAD-1547</a>
            Project: MyFaces Trinidad
         Issue Type: New Feature
           Reporter: Jeanne Waldman
        Attachments: JIRA_1547_1_2_2_12_2_doc.patch


related to <a class="moz-txt-link-freetext" href="https://issues.apache.org/jira/browse/TRINIDAD-799">https://issues.apache.org/jira/browse/TRINIDAD-799</a>
Add agent version support in skinning
We currently have @agent support, @agent ie and (version:5)
We need to add version ranges - the min-version and max-version.
See thread from April, 2008:
<a class="moz-txt-link-freetext" href="http://www.mail-archive.com/dev@myfaces.apache.org/msg31841.html">http://www.mail-archive.com/dev@myfaces.apache.org/msg31841.html</a>
-- from thread --
max- means less-than-or-equal-to:max-version:8 means
version &lt;= 8.0 == true
--
option 5)  the version feature is a String that matches the native "major.minor.whatever"
format of the browser's engine.  If the browser's engine uses non "." for separating versions,
"." is used instead.
For matches, the "*" character is allowed in any version section.
For comparisons, the "*"  is always a valid match regardless of &lt;, &gt;, or = 
comparison
For comparisons where the comparison side contains fewer version sections than the actual
browser version, the comparison side is padded with * version sections and the comparison
occurs as above.
For comparisons where the comparison side contains more version sections than the actual browser
version, the browser version is padded with 0 version sections and the comparison occurs as
above.
// user wants to match IE 5, actual browser version ie 5.5
@agent ie and (version:5)
matches because version:5 expands to version 5.* and 5.* matches 5.5
@agent ie and (min-version:5)
matches because version:5 expands to version 5.* and 5.*  &lt; 5.5 = true
@agent ie and (max-version:5)
matches because version:5 expands to version 5.* and 5.* &gt; 5.5 = true
// actual browser version gecko 1.9
@agent gecko and (min-version:1.9.2)
does not match because the browser version 1.9 expands to 1.9.0 and 1.9.2 is &gt; than
1.9.0
// actual browser version gecko 1.9
@agent gecko and (min-version:1.9.*)
matches because the browser version 1.9 expands to 1.9.0 and 1.9.* == 1.9.0 
--
I have implemented and attached a Version class with the desired behavior and tested that
the following works as expected
   System.out.println("toString:" + new Version("5.0.3", "*"));
   System.out.println("hashCode:" + new Version("5.0.3", "*").hashCode());
   System.out.println("not equals:" + new Version("5.0.3", "*").equals(new Version("5", "*")));
   System.out.println("compareTo == 0:" + new Version("5.0.3", "*").compareTo(new Version("5",
"*")));
   System.out.println("compareTo == +:" + new Version("5.0.3", "*").compareTo(new Version("5",
"0")));
   System.out.println("compareTo == -:" + new Version("5.0.3", "*").compareTo(new Version("5.0.4",
"*")));
Given the way that compareTo works, I changed the wildcard behavior from what is listed before
to make the wildcard behavior only affect compareTo() results of 0.  However, this still has
the desired effect because min- and max- comparisons are &lt;= and &gt;= respectively.
 Anway, I believe looking at the code in compareTo() will give everyone a better idea of what
I intend. 
    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>

Mime
View raw message