H:messages for components only.

Hello,
How can I display messages releated to all components on a page (not global messages) with just one JSF tag? Is it possible?
I want to place such tag on the page top, but I don't need global messages.
Thanks in advance.
Oleg.

Hmm... I'm not sure. I've looked into the MessagesRenderer and found
        String clientId = ((UIMessages) component).getFor();
        // if no clientId was included
        if (clientId == null) {
            // and the author explicitly only wants global messages
            if (messages.isGlobalOnly()) {
                // make it so only global messages get displayed.
                clientId = "";
        //"for" attribute optional for Messages
        Iterator messageIter = getMessageIter(context, clientId, component);
        assert(messageIter != null);
        if (!messageIter.hasNext()) {
        }In the HTMLBasicRenderer I found
    protected Iterator getMessageIter(FacesContext context,
                                      String forComponent,
                                      UIComponent component) {
        Iterator messageIter;
        // Attempt to use the "for" attribute to locate
        // messages.  Three possible scenarios here:
        // 1. valid "for" attribute - messages returned
        //    for valid component identified by "for" expression.
        // 2. zero length "for" expression - global errors
        //    not associated with any component returned
        // 3. no "for" expression - all messages returned.
        if (null != forComponent) {
            if (forComponent.length() == 0) {
                messageIter = context.getMessages(null);
            } else {
                UIComponent result = getForComponent(context, forComponent,
                                                     component);
                if (result == null) {
                    messageIter = Collections.EMPTY_LIST.iterator();
                } else {
                    messageIter =
                          context.getMessages(result.getClientId(context));
        } else {
            messageIter = context.getMessages();
        return messageIter;
    }You see, it's not true. In this case we have forComponent = null and ALL messages will be displayed. Right?
Best regards.
Oleg.
Edited by: ova2 on Dec 16, 2009 7:18 AM

Similar Messages

  • X120e diagnostic BIOS message "for evaluation only. not for resale"

    This is just a minor quibble, but when I enable "Diagnostic" messages in the BIOS, I get the following screen:
    http://imgf.tw/717745842.JPG
    I'm guessing the message "FOR EVALUATION ONLY. NOT FOR RESALE" isn't supposed to be there; at least this was this case for some past Thinkpad BIOSes (http://www-307.ibm.com/pc/support/site.wss/MIGR-59180.html).
    Or do I have some super special x120e? 
    EDIT: My model code is 0596-CTO.
    Solved!
    Go to Solution.

    clicq,
    How about marking your last post as solved so others can find it easily.  Any new posts about the x120e will be helpful for diagnostics.
    T430u, x301, x200T, x61T, x61, x32, x41T, x40, U160, ThinkPad Tablet 1838-22R, Z500 touch, Yoga Tab 2 Windows 8.1, Yoga Tablet 3 Pro
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    If someone helped you today, pay it forward. Help Someone Else!
    English Community   Deutsche Community   Comunidad en Español   Русскоязычное Сообщество

  • Setup "Messages" For Office Use

    Some people at the office have iChat or Messages setup to communicate with eachother.
    I want to use Messages (formerly iChat) but not have it tied to my personal info; just for office use. I started a new apple ID for this purpose using my office email. I signed in and I'm not sure how to add "buddies." I don't see a buddies list like I expected from when I used to use iChat years ago. Just a "new message" window. There is a plus button and when I click it it finds emails from my personal account on Apple mail which I do not want to tie to.
    I use apple Mail as my mail client and have both my personal and work emails setup on it. However I would like to use "Messages" for work only, so I dont get work related stuff popping up on my iPad at home, etc.
    Possible?
    Very unintuitive if so...

    Hi,
    We might need to back up a bit here.
    Messages adds the iMessages feature of iOS and adds it to what was iChat and renames the app along with some Layout/Interface changes.
    In Messages Menu > Preferences > Accounts there are two permanent items.
    The iMessages account (Uses an Apple ID which can be removed or Disabled but the account as such awill stay in the list)
    and the Bonjour one which can be Enable/disabled but not removed from the List.
    You can also have AIM (AOL) based Screen Names (which includes Apple ID issued by Apple - email style which are also Valid), Jabber/Google  and Yahoo accounts.
    These three accounts can have Buddy Lists (As does the Bonjour account).
    You could ...
    Enable the Bonjour account.
    This then "broadcasts" the My Card Name from your Contacts app and this appears as your Buddy Name in everyone else's Bonjour list.
    This requires that all Macs on on the same LAN and have their Bonjour account active in their app (be that iChat or Messages).
    Get an account (ID or Screen Name) from one of the services that Messages/iChat supports and enable that.
    You may then need to display that Buddy List (Window Menu) and separate out any combined listing (See the General section of the Preferences).
    Or you use the iMessages account to those that have iMessages  enabled.
    This is a pic of my main Messages window (Tabbed Chats and interface for starting chats) with the Window Menu  next to it showing the separated Accounts I have (yes there are really 10 which exceeds the CMD # system)
    9:29 pm      Thursday; February 27, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    Message was edited by: Ralph Johns (UK)

  • I can no longer see my inbox for texting, only those messages I've sent. How do I get my inbox back?

    I can no longer see my inbox for texting, only those messages I've sent. How do I get my inbox back?

    Tap the Messages button at the top left.

  • HT1386 After syncing with itunes(windows), messages for one of the contact(I have saved the contact name as 'Unknown') are lost. I can see only few messages which fits to the screen. I don't see option to load earlier messages.

    After syncing with itunes(windows), messages for one of the contact(I have saved the contact name as 'Unknown') are lost. I can see only few messages which fits to the screen. I don't see option to load earlier messages.
    Can anyone help.

    Can anyone help on this?

  • ERROR MESSAGE - Ivalid operation for forward only resultset : first 17075

    Hi, all, I'm using Jdbc Drive Oracle JDBC driver 8.1.7.0.0 and weblogic. However, when I do:
    Statment stmt = (CallableStatement) conn.prepareCall("{call some_pkg.p_searc(?,?,?,?,?,?,?,?,?)}",
    ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    ResultSet.first();
    I got the error message: Ivalid operation for forward only resultset : first 17075.
    Thanks.
    Mag

    Thanks for your reply. But what I want to use first. One thing I don't understand is why even I use ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY, but the resultset is still not scrollable. How can I get a scrollable resultset. Thanks.

  • Best practice for read-only functionality

    Hi,
    I'm part of the development team of a system with about 100 screens. The customer would like us to add some read-only functionality to the system, so that certain users are able to access the screens but not change any of the data on them. We already have policies in place on the database level that keeps read-only users from saving data, but it's not very user friendly to allow users to change data on a screen, only to tell them that they're not allowed to save those changes once they try to do so. It would clearly be better if all components are rendered as read-only components for read-only users, making them unable to make any data changes in the first place.
    User privileges in the system are controlled by roles defined and set in the system (not ADF roles or Weblogic roles). At any given time and place, it's possible to check whether the current user has a certain role. We already use this in a number of places to make it possible to control which user has access to which screens. In a few places we even control which functionality should be enabled for the current user within a screen, but mostly the access control is currently on the screen level. With read-only users getting access to all screens, it seems we will need lot of extra in-screen access control to keep these users from changing anything.
    But what's the best practice here? One way to go would be to add some logic to every single active component on every single screen, to determine whether it should be rendered as active or disabled/read-only. But that would require a lot of extra coding.
    So my question is: Is there a smarter way to do this? Maybe something done through skinning? Or something else?
    (I'm not sure how relevant this is for this sort of question, but we're currently using JDev 11.1.1.4.0, and expect to upgrade to 11.1.1.6.0 within the next 6 months)
    Best regards,
    Andreas

    Hi Guna, Puthanampatti and Don,
    Thanks a lot for your replies. I'm currently looking into implementing something along the lines of what Guna has suggested:
    Our application consists of a number of individual work spaces that are deployed as adflibs which have all been added to a "master application work space", and the master application is deployed as an .ear file. Most of the individual work spaces are for all the different functional areas of the application, with their own task flows, page fragments etc. The rest are work spaces with common functionality, like datamodel (entity definitions), utility methods, page templates, and framework extensions. In the latter, we have defined custom classes for all the base classes (somewhat similar to what Don describes, I believe).
    In our custom class for ViewRowImpl, I have added an isAttributeUpdateable method, and in our custom class for ApplicationModuleImpl I have added an isReadOnlyUser method. The isAttributeUpdateable method uses the isReadOnlyUser method to determine if the current user is a read-only user or not; if the user is a read-only user the isAttributeUpdateable method will return false, otherwise true. The isReadOnlyUser method in our base class is just a dummy method that always returns true. But in the ApplicationModuleImpl classes of our individual work spaces, i've written an override for isReadOnlyUser, giving the answer that is relevant for the work space in question (for instance, whether or not the current user has the role "User Administrator").
    That pretty much takes care of all input fields in tables and forms, which is a big step in the right direction. This still leaves some work to be done for components that are not directly linked to view object attributes (like buttons), but I guess that can't be helped. Also, there are a few of the work spaces that contain a number of pages that are related to different user privileges (as in: page 1 requires user privilege A, and page 2 requires user privilege B); in these cases I will have to do something different than just writing an override in the "local" ApplicationModuleImpl class.
    @Don: What you describe seems to be pretty close in functionality to what we already have, though your implementation is different from ours. You have used your custom base ApplicationModuleImpl class to keep read-only users from committing changes. We use Virtual Private Database and database policies to the same end: If a user without the required full-access role tries to commit data it will cause a database error, which we then handle in the application (so the user gets a message like "You don't have the required privileges to changes this data", rather than an ORA message). Unfortunately, our customers are not content with this. They want a solution where all input fields and most of the buttons etc. are disabled for read-only users, and that's why I'm looking into the best/smartest way to do this.
    @Puthanampatti: We already use something similar to what you're suggesting. The challenge I'm currently facing is how best to disable/enable components based on the current user's roles, not how to determine and store those roles.
    Best regards,
    Andreas

  • JSF screws IDs I specify for components padding them with "j_id_1"

    Hi everyone.
    Have anybody faced such a problem? When I specify the ID for the component, say, "logn", it is added to view as "loginj_id_1" padded with "j_id_1". Sometimes it happends, sometimes it doesn't. It may happen only for some of the components on the page. It wouldn't be a problem if the id under which the component is known was the same in all cases. But it's not the case. When the form validation fails and it's time to fill <h:message for="login">, I get the lines in the log saying:
    Unable to find component with ID loginj_id_1 in view.whereas the component exists under id "login". As for components at the same page whose IDs were padded with "j_id_1" there's no such an error and their <h:message>'s are filled as expected.
    Does anyone know what can make JSF override the ID that I specify? How come that one component is treated under differend IDs all around the project? Could it be a result of incorrect mixing RI & MyFaces for I have both of them in classpath? I haven't noticed that problem before upgrading to JSF RI 1.2_02 that comes with SJSAS 9.0_1.

    Each component is responsible for producing its own output, including it's HTML "id" attribute in the correct location. JSF does provide support for calculating the "id": UIComponent.getClientId(). The default implementation of this method is in UIComponentBase. I don't know if MyFaces has a different implementation or not... nor do I know if every component in your application produces HTML w/ id's formatted via this method. Some components may use serveral id's and create some or all of the id's by modifying the value rerturned by "getClientId()". Some containers (such as tables) may even manipulate the id's of their child components.
    So w/o a concrete example, I can't answer your question.
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Error Message: TypeError: Components​.classes[T​vtPwmCompo​nent_CID] is undefined

    I have the T520i ThinkPad.  Whenever I try to navigate to a web site, I receive the following error message:  "TypeError: Components.classes[TvtPwmComponent_CID] is undefined".  When I click 'OK' it takes me to the web site I requested.  I was told it has something to do with the Password Manager and it only happens when I use Firefox 6.0.  Any help will be greatly appreciated. 

    hey Aglo4u,
    currently there is no specific patch for firefox 6 and the password manager.
    though i would like you to try this patch and see if it works :
    http://support.lenovo.com/en_US/downloads/detail.p​age?DocID=DS014086
    WW Social Media
    Important Note: If you need help, post your question in the forum, and include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    Follow @LenovoForums on Twitter!
    Have you checked out the Community Knowledgebase yet?!
    How to send a private message? --> Check out this article.

  • Anchor, Message & Message Group Components - Threadinar8

    Hi All,
    This is the eighth in the Threadinar series. See the Components Threadinar Index at http://forum.sun.com/jive/thread.jspa?threadID=103424 for the complete list to date.
    This Threadinar will discuss the last 3 remaining components in the "Basic Components" section of the Creator Component Catalog.
    We will start discussion of the "Components Palette: Layout Section" from the next Threadinar.
    The components we will focus on today are
    "Anchor", "Message" and "Message Group" Components.
    Let us begin our discussion with the "Anchor" Component.
    [b]Anchor Component
    You can drag an Anchor Component from the Palette's Basic category to the Visual Designer to create a named anchor in your page. The HTML equivalent of this component is <a name=targetname></a>. The name of the anchor component, set in its id property, is the target name.
    For example, you drop an anchor at the bottom of a page and see that its name is anchor1. You then add a hyperlink to the top of the page and set the hyperlink's url property to #anchor1 to link it to the anchor.
    Drop the anchor on the page at the location to which you want the page to scroll when the user clicks a link to the anchor. You can also drag the anchor to another location on the page.
    If you want to link to an anchor in another page, use a hyperlink component and set its url property by using the property editor to navigate to the anchor. For example, if the page is named Page2.jsp and the anchor on that page is named anchor1, the resulting value of the hyperlink's url property is faces/Page2.jsp#anchor1.
    [b]Message Component
    What Is a Message Component?
    A message component is the primary way to notify users of errors during page processing. The IDE has two message components on the Basic section of the Components Palette:
    * Message. Displays a message associated with a specific component. A component that is likely to produce an error message, such as an input component with an associated validator or converter, needs to have a Message component.
    How Do I Use It?
    You can drag the Message component inline message icon from the Palette's Basic category to the Visual Designer to create a message related to a single component. The two message components, Message and Message Group, display error messages for component rendering and validation. Message displays error messages for a specific component.
    * Dragging a message component from the palette to the page results in a message item with the summary property set to true and the detail property set to false.
    * You can press Ctrl-Shift and drag the Message component to another component to link the for property to the other component and display messages for that component.
    * Messages are automatically shown as the result of a validation or other component related error.
    You can send your own error text to a Message component by calling the corresponding Java object's info, error, fatal, or warn method. The component displays an appropriate icon for the type of method called.
    You can also write your own input validation methods, which can write text to the Message component by throwing ValidatorException(new FacesMessage (String)). If you do not want to throw an exception, you can have the validation method call the Java object's info, error, fatal, or warn method instead.
    Important Properties Of A Message Component
         Appearance Related
         * showDetail. Type: boolean
         Indicates if the detail portion of the message should be displayed. This property is false (unselected) by default.
         * showSummary. Type: boolean
         Indicates if the summary portion of the message should be displayed. This property is true (selected) by default.
         Behavior
         * for. Type: String
         The component for which the message component displays messages. To set this property, you can hold down the Ctrl-Shift keys and drag the message component to the component for which it is to display messages. Alternatively, you can click the drop-down list next to the property and choose a component.
    [b]Message Group Component
    What Is a Message Group Component?
    Message Group. Displays page-level or global messages. You can use a Message Group component to assist with debugging as you are developing the page.
    How Do I Use It?
    You can drag the Message Group component from the Palette's Basic category to the Visual Designer to create a list of global messages for a page, such as system runtime errors, or a list of messages related to components. To show individual component errors, such as validation and conversion errors, deselect the showGlobalOnly property in the Message Group Properties Window.
    The two message components, Message Group and Message, display error messages concerning component rendering and validation.
    * This component, Message Group, reports either global errors only or all errors on all components on the page, including errors with the page itself. You can put a Message Group component on your page to assist with debugging as you are developing the page.
    * The Message component reports errors for a single component. Use Message if you want to provide your users with messages related to a specific component, like validation errors when they enter invalid data in a field. Message Group also reports validation errors, but it reports them for all components, not just one.
    You can send your own error text to a Message Group component by calling the corresponding Java object's info, error, fatal, or warn method. The component displays an appropriate icon for the type of method called.
    You can also write your own input validation methods, which can write text to the Message Group component by throwing ValidatorException(new FacesMessage (String)). If you do not want to throw an exception, you can have the validation method call the Java object's info, error, fatal, or warn method instead.
    Important Properties Of A Message Component
         Appearance
         * showDetail. Type: boolean
         Indicates if the detail portion of the message should be displayed. This property is false (unselected) by default.
         * showSummary. Type: boolean
         Indicates if the summary portion of the message should be displayed. This property is true (selected) by default.
         Behavior
         * showGlobalOnly. Type: boolean
         Indicates if global messages, messages not associated with any component, are the only messages to be displayed. By default, this property is false (not selected), and all messages from all components on the page are displayed.
         * tooltip. Type: String
         Information about the component that is readable by a screen reader and can be displayed as a tool tip.
    [b]For more details on Using these Components
    Take a look at this tutorial :-
    "Using Message Components"
    http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/message_components.html     
    This Tech article could also be Helpful :-
    Handling Error Messages
    http://developers.sun.com/prodtech/javatools/jscreator/reference/bestpractices/2/commonJSP.html#04
    Please share your comments, experiences, additional information, questions, feedback, etc. on these components.

    To write both a summary message and a detail message to the Message Group component, use code like the following statement. The first argument is the summary message and the second argument is the detail message.
    FacesContext.getCurrentInstance().addMessage(
    null, new FacesMessage("Summary Message", "Detail Message"));I try to add a Message Group component to every page. This helps me figure out problems, especially when it appears that an action component (Button, Radio Button, Hyperlink, and so forth) is not working.

  • I want to open Twitter, but after I type the password, it doesn't open, but the message for saving PW does appear... can you help me?

    I'm using FF on another computer, and pages that I have used in the original have opened, except for Twitter. I give the PW and the message for saving the password appears, but Twitter's HP page doesn't open, instead the registration page is the one that does... I have tried with another system and the page opens, so I know the problem isn't Twitter's, but FF's... can you help me? I want to open Twitter here...

    This issue can be caused by corrupted cookies or cookies that are blocked.
    *check the permissions on the about:permissions page and in "Tools > Page Info > Permissions"
    *https://support.mozilla.org/kb/fix-login-issues-on-websites-require-passwords
    Clear the cache and remove cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"

  • Opening & Closing balance of RG23A part II are miss matching for SECS only

    Hi Gurus,
    Opening & Closing balance for the month of May & April are mismatching for SECS only. where as BED & all other values are getting matched with April closeing & May opening.
    I have checked from Jan till Aprill everything is ok but after this in May i have problem.
    My closeing value in April for SECS is 40K where in May opening it is showing 5K. I use J2i6 to download the register.
    Plz can any one tell me how should i track this inconsistency.

    Its possible that some transactions are posted after you extract the report.  Extract the report again (J2I5) and print them. 
    Have you configured different GL accounts for posting BED, ECS & HCS.  From your description, it seems same GL is assigned for all three components.
    Ravi.

  • For weeks I have been viewing a doggy day care via their web cam.  This weekend I upgraded to Lion and have been unable to view the center since.  I get an error message for java webcam class not found.  All of my software is up to date--suggestions?

    For weeks I have been viewing a doggy day care center via their web cam.  This weekend I upgraded to Lion and have been unable to view the center.  I get an error message for Java plug-in 1.6.0_29 ....webcam class not found.  Any suggestions on how to fix this?

    Sorry, don't know what else to suggest unless there's a URL to the problem stream that someone here can try. Otherwise we can't test it to try and determine what might be wrong.
    BTW, make sure they're testing it with a Mac, not with a Windows system. If they test only with Windows, what they say is or is not working doesn't mean much.
    Regards.

  • RINGTONE NOTIFICATIONS FOR TEXTS ONLY

    I have a new   DROID RAZR HD by Motorola in White and it is fantastic.  I only want ringtone notifications for TEXTS ONLY.  How do I stop ringtone notifications from email and Facebook which I can wait on, but TEXTS I want to answer asap. 

    In the individual applications chose a silent tone for email and Facebook notifications. Then in the text message application choose the tone of your choice.

  • How to prevent error message for material description in MDG material detail screen, when user click on check action

    Dear Experts,
    I have a requirement for making material description as non mandetory in change request view of mdg material screen.
    I have done that using field usage in get data method of feeder classes, but still message is displaying.
    This message 'Material description is mandatory is displaying with check action only, but not with save or submit after i anhance field property as not mandetory.
    How to prevent error message for material description in MDG material detail screen, when user click on check action.
    Thanks
    Sukumar

    Hello Sukumar
    In IMG activity "Configure Properties of Change Request Step", you can completely deactivate the reuse area checks (but will then loose all other checks of the backend business logic as well).
    You can also set the error severity of the checks from Error to Warning (per CR type, not per check).
    Or you provide a default value for the material description, e.g. by implementing the BAdI USMD_RULE_SERVICE.
    Regards, Ingo Bruß

Maybe you are looking for

  • Document Generation in MSA - Make Word Doc Read-Only or PDF Documents

    Hello, The mobile sales client comes with an Document Generation tool to fill Word Document Templates with SAP data on demand. Because of legal issues, we do not want to allow anyone to be able to modify the generated word document. Using the permiss

  • Questions about compiling kernel on archlinux

    hi...i'm new of this forum and new of archlinux i'm tryng to compiling a custom kernel in order not to replace the kernel26 package.. i prefere to make it with abs for managing it with pacman.. i followed the wiki but something went wrong.... i used

  • JTextField Focus is not comming

    Hi I have 2 JTextField(userName and password).I am entering wrong username and password .It goes to server and rsponse come with worning "Wrong input".Then I am entering the username again and after that when i Press the tab key .the curser come to t

  • Maps finds addresses in a completely different city, instead of the one I'm actually in

    Why does Maps return addresses in a completely different city, even if location services are enabled? I must manually type in the city name every time, or I usually get different cities or countries (I live in a major Canadian city). Sometimes it giv

  • OSB JCA Adapter - Enqueue - BLOB Oracle data type

    Hi, I am tring to enqueue a message into oracle advacned queue using JCA AQ adapter of OSB. The message in the Q has BLOB data type. I used AQ Adapter enqueue operation for this, and an opaqueue schema in the adapter wsdl. I created a business servic