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 "Daniel Hannum (JIRA)" <ad...@incubator.apache.org> on 2006/10/04 17:09:19 UTC

[jira] Created: (ADFFACES-216) Customize message styles per severity

Customize message styles per severity
-------------------------------------

                 Key: ADFFACES-216
                 URL: http://issues.apache.org/jira/browse/ADFFACES-216
             Project: MyFaces ADF-Faces
          Issue Type: Improvement
          Components: Skinning
         Environment: Java 1.5, jboss 4.0.3
            Reporter: Daniel Hannum


I'd like to style my message component differently based on the severity of the messages being displayed. I see selectors to control the icons for each severity, but not the inline styling. For example, I want to make all the errors red and bold and all the infos something else.

I see that there are default styles already there. Errors already appear red and info appear black. This is through existing classes such as .OraInlineErrorText. However, customizing them in my skin file didn't have any effect. It appears that you cannot change message styles on a per-severity basis.

-- 
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-216) Customize message styles per severity

Posted by "Matthias Weßendorf (JIRA)" <ad...@incubator.apache.org>.
     [ https://issues.apache.org/jira/browse/ADFFACES-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Weßendorf updated ADFFACES-216:
----------------------------------------

    Affects Version/s: 1.0.1-incubating-core-SNAPSHOT

> Customize message styles per severity
> -------------------------------------
>
>                 Key: ADFFACES-216
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-216
>             Project: MyFaces ADF-Faces
>          Issue Type: Improvement
>          Components: Skinning
>    Affects Versions: 1.0.1-incubating-core-SNAPSHOT
>         Environment: Java 1.5, jboss 4.0.3
>            Reporter: Daniel Hannum
>
> I'd like to style my message component differently based on the severity of the messages being displayed. I see selectors to control the icons for each severity, but not the inline styling. For example, I want to make all the errors red and bold and all the infos something else.
> I see that there are default styles already there. Errors already appear red and info appear black. This is through existing classes such as .OraInlineErrorText. However, customizing them in my skin file didn't have any effect. It appears that you cannot change message styles on a per-severity basis.

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


[jira] Commented: (ADFFACES-216) Customize message styles per severity

Posted by "Daniel Hannum (JIRA)" <ad...@incubator.apache.org>.
    [ https://issues.apache.org/jira/browse/ADFFACES-216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462062 ] 

Daniel Hannum commented on ADFFACES-216:
----------------------------------------

I'm not sure what I was doing wrong (or how it squares with Scott who said it wasn't possible), but I have been able to do this

The styles are

.OraInlineErrorText
.OraInlineInfoText
etc

Of course it's not documented in adf-faces-skins-doc.xml. I had to dig through the generated CSS to find it, but I was able to adjust the size and color of the messages independently. Maybe I'm missing something.

> Customize message styles per severity
> -------------------------------------
>
>                 Key: ADFFACES-216
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-216
>             Project: MyFaces ADF-Faces
>          Issue Type: Improvement
>          Components: Skinning
>         Environment: Java 1.5, jboss 4.0.3
>            Reporter: Daniel Hannum
>
> I'd like to style my message component differently based on the severity of the messages being displayed. I see selectors to control the icons for each severity, but not the inline styling. For example, I want to make all the errors red and bold and all the infos something else.
> I see that there are default styles already there. Errors already appear red and info appear black. This is through existing classes such as .OraInlineErrorText. However, customizing them in my skin file didn't have any effect. It appears that you cannot change message styles on a per-severity basis.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ADFFACES-216) Customize message styles per severity

Posted by "Scott O'Bryan (JIRA)" <ad...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/ADFFACES-216?page=comments#action_12439911 ] 
            
Scott O'Bryan commented on ADFFACES-216:
----------------------------------------

The skinning system supports properties.  For instance, to decorate the "content" region of the tr:input tag, you might make a class like:

tr|input::content

To change this style based on if an error message is present, you would be able to add the expansion:

tr|input:error::content

How this translated on the client side is that if you would have the following DOM:

<div class="tr_input">
  <input type="text" id="123" class="content"/>
</div>

The "input" element would have the tr|input::content style.  By "appending" a special class to the root element:

<div class="tr_input p_AFError">
  <input type="text" id="123" class="content"/>
</div>

then the tr|input:error::content class would ALSO be appended to the "input" class.  When they render, the editable value components need to be enhanced to check their messages.  If messages are present, they need to find the most sever message and APPEND one of the following styleclasses to their "root" elements:

p_AFFatal
p_AFError
p_AFWarning
p_AFInfo

I don't have time to do this right now, so if someone else is interested in making this enhancement, have fun.  :)  Otherwise, I'll get to it when I can.


> Customize message styles per severity
> -------------------------------------
>
>                 Key: ADFFACES-216
>                 URL: http://issues.apache.org/jira/browse/ADFFACES-216
>             Project: MyFaces ADF-Faces
>          Issue Type: Improvement
>          Components: Skinning
>         Environment: Java 1.5, jboss 4.0.3
>            Reporter: Daniel Hannum
>
> I'd like to style my message component differently based on the severity of the messages being displayed. I see selectors to control the icons for each severity, but not the inline styling. For example, I want to make all the errors red and bold and all the infos something else.
> I see that there are default styles already there. Errors already appear red and info appear black. This is through existing classes such as .OraInlineErrorText. However, customizing them in my skin file didn't have any effect. It appears that you cannot change message styles on a per-severity basis.

-- 
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