You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Matt Cooper (JIRA)" <ad...@incubator.apache.org> on 2006/12/06 18:42:20 UTC
[jira] Created: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
-----------------------------------------------------------------------------------------------------------------------------
Key: ADFFACES-321
URL: http://issues.apache.org/jira/browse/ADFFACES-321
Project: MyFaces ADF-Faces
Issue Type: Bug
Components: Skinning
Reporter: Matt Cooper
If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
af|companyLogo {
background-image: url('red-apache-leaf.png');
width: 100px;
height: 30px;
}
This makes it easy for page developers to place the logo on their pages by simply defining:
<tr:companyLogo/>
One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
Since the page layout has a style defined for the red background:
.MyPageLayoutRedArea {
background-color: red;
width: 500px;
height: 100px;
}
All the page developer needs to do is add one more definition to his or her skin to make it all better:
.MyPageLayoutRedArea af|companyLogo {
background-image: url('white-apache-logo.png');
}
The page source looks something like this:
<tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
<tr:companyLogo/>
</tr:panelGroupLayout>
This works great because the containment style causes the companyLogo to render with the alternate background image.
However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
af|companyLogo {
background-image: url('red-apache-leaf.png');
width: 100px;
height: 30px;
}
.AFDarkToneContainer af|companyLogo {
background-image: url('white-apache-logo.png');
}
.MyPageLayoutRedArea {
background-color: red;
width: 500px;
height: 100px;
}
Then the page source would look like this:
<tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
<tr:companyLogo/>
</tr:panelGroupLayout>
but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Matt Cooper (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-321?page=all ]
Matt Cooper updated ADFFACES-321:
---------------------------------
Priority: Minor (was: Major)
Downgraded to minor.
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: http://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Reporter: Matt Cooper
> Priority: Minor
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Matt Cooper (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-321?page=comments#action_12457003 ]
Matt Cooper commented on ADFFACES-321:
--------------------------------------
There is a workaround for this particular use case, simply add more components to the tree so that there is only one style class per component.
There is still a problem when you really want to define compound styles--no workaround for that but my needs are containment.
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: http://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Reporter: Matt Cooper
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Matt Cooper (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-321?page=all ]
Matt Cooper updated ADFFACES-321:
---------------------------------
Attachment: trinidad.patch
Updated trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/CoreRenderingContext.java
The public String getStyleClass(String styleClass) method used to attempt to compress the entire raw styleClass but now splits it up into individual class names and compresses them individually.
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: http://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Reporter: Matt Cooper
> Priority: Minor
> Attachments: trinidad.patch
>
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-321?page=all ]
Adam Winer resolved ADFFACES-321.
---------------------------------
Resolution: Fixed
Assignee: Adam Winer
Fixed, at least for instances of the 'styleClass' attribute. Our style class output code could be cleaned up a lot... filing a new issue for that.
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: http://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Reporter: Matt Cooper
> Assigned To: Adam Winer
> Priority: Minor
> Attachments: trinidad.patch
>
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Matt Cooper (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-321?page=all ]
Matt Cooper updated ADFFACES-321:
---------------------------------
Status: Patch Available (was: Open)
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: http://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Reporter: Matt Cooper
> Priority: Minor
> Attachments: trinidad.patch
>
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-321?page=comments#action_12458244 ]
Adam Winer commented on ADFFACES-321:
-------------------------------------
The patch is gonna be waaaay too slow. Regular expressions, etc., iteration, all in a key bottleneck. For one thing, the vast majority of calls to this function involve single styles that are *known* to just be single styles (all of the skinning classes).
CoreRenderingContext shouldn't be modified. We should do this in XhtmlRenderer.renderStyleAttributes() and anywhere else where getStyleClass(bean) is called.
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: http://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Reporter: Matt Cooper
> Priority: Minor
> Attachments: trinidad.patch
>
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Adam Winer (JIRA)" <ad...@incubator.apache.org>.
[ http://issues.apache.org/jira/browse/ADFFACES-321?page=all ]
Adam Winer updated ADFFACES-321:
--------------------------------
Status: Open (was: Patch Available)
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: http://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Reporter: Matt Cooper
> Priority: Minor
> Attachments: trinidad.patch
>
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (ADFFACES-321) styleClass attribute values that
include spaces need to be treated as multiple style classes rather than one
huge style class
Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/ADFFACES-321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matthias Weßendorf updated ADFFACES-321:
----------------------------------------
Fix Version/s: 1.0.0-incubating-core
Affects Version/s: 1.0.0-incubating-core
> styleClass attribute values that include spaces need to be treated as multiple style classes rather than one huge style class
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: ADFFACES-321
> URL: https://issues.apache.org/jira/browse/ADFFACES-321
> Project: MyFaces ADF-Faces
> Issue Type: Bug
> Components: Skinning
> Affects Versions: 1.0.0-incubating-core
> Reporter: Matt Cooper
> Assigned To: Adam Winer
> Priority: Minor
> Fix For: 1.0.0-incubating-core
>
> Attachments: trinidad.patch
>
>
> If you specify styleClass="Foo" on a component, its encoded HTML will be something like class="xyz" (the compressed equivalent).
> If you specify styleClass="Foo Bar" on a component, its encoded HTML is class="Foo Bar" when it should have been something like class="xyz xzz". The reason why the compressed equivalents are not being encoded properly is that the list of style class names are actually not being treated as a multiple class names. Instead, the entire string "xyz xzz" is passed into the RenderingContext.getStyleClass() method rather than tokenizing the string into each of the style classes first and then passing them into the getStyleClass() method.
> Although the generated CSS files include both totally compressed and totally uncompressed style definitions, this is still a problem because CSS definitions span across multiple DOM elements.
> Here's a simpler example, let's say we have a (fictional) component called "companyLogo" with a style of:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> This makes it easy for page developers to place the logo on their pages by simply defining:
> <tr:companyLogo/>
> One day, one of the page developers is working on a page layout and finds that the logo needs to be placed in a layout area where the layout has a background red background color. Since the logo is red and the background is red, the logo will be very hard to see.
> Since the page layout has a style defined for the red background:
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> All the page developer needs to do is add one more definition to his or her skin to make it all better:
> .MyPageLayoutRedArea af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> The page source looks something like this:
> <tr:panelGroupLayout styleClass="MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> This works great because the containment style causes the companyLogo to render with the alternate background image.
> However the "MyPageLayoutRedArea" is very specific to the particular page layout so it's not very reusable. Any extra styles defined in the MyPageLayoutRedArea container might not always be desired when switching the logo to a white graphic so it would be best to separate the CSS into proper groupings like this:
> af|companyLogo {
> background-image: url('red-apache-leaf.png');
> width: 100px;
> height: 30px;
> }
> .AFDarkToneContainer af|companyLogo {
> background-image: url('white-apache-logo.png');
> }
> .MyPageLayoutRedArea {
> background-color: red;
> width: 500px;
> height: 100px;
> }
> Then the page source would look like this:
> <tr:panelGroupLayout styleClass="AFDarkToneContainer MyPageLayoutRedArea">
> <tr:companyLogo/>
> </tr:panelGroupLayout>
> but because of the styleClass value bug described above, the generated HTML will yield a CSS hierarchy of "AFDarkToneContainer xzz" which is not in the generated CSS file instead of "xyz xzz" which is in the generated CSS file.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.