ADF FACES: af:messages does'nt display label with resource bundles

Hi,
There is a problem with the af:messages component and error messages containing labels (such as Value is Required error message for required fields).
If I have an af:inputText with it's label property refering to a resource bundle loaded using the f:loadBundle action, when the Value is Required message is displayed, I get "" for the field name.
If I replace the label property with a constant value or with an expression refering to a managed bean property, then the label is properly displayed in the error message.
I suspect this has to do as to when the action of getting the label is done. Maybe the bundle is not availlable at that time. Anyway, this is a bummer as it mean that we cannot use the f:loadBundle action to load resource bundles.
This happen with AE11. I have not tested this with EA12.

Thank's!
I'll try EA12 when I have the time.
I also found that in our JSPs, we've put the f:loadBundle ouside of the f:view tag. I'll fix that in our codebase.
While researching a fix, I found out that using a managed bean (which implement Map interface) to load the bundle based on the name refered in the expression language is a lot more intuitive and allow for an easier management of the different resource bundle than the f:loadBundle tag.
Basically, our EL expression are now #{bundles.bundleName.property} we replace any "_" in bundleName with "." and then lookup this name as a ResourceBundle with the locale of the view. We keep the managed bean in the request scope it remember each bundle it loaded.
We could have done it with a custom VariableResolver. Maybe a future release of the JSF spec could provide a standard variable name that would implement the same behaviour. This way, one does not have to load each bundles before hand and only the bundles accessed by the JSP will be loaded.

Similar Messages

  • ADF FACES: af:messages/ does not display my messages at all

    I am having an issue displaying messages using ADF MyFaces EA20.
    <af:messages />
    Within all backing beans I call messages with the following method to conveniently display messages when needed.
    // Add invalid email address message
    JSFUtils.addMsgToContext(FacesMessage.SEVERITY_ERROR, "setEmail_error", MsgConstants.INVALID_EMAIL);
    The method utilized can be seen below:
    public static void addMsgToContext(FacesMessage.Severity severity, String msgKey, String descKey) {
        // Check the parameter, if either short desc or desc both are empty
        if (StringUtils.isEmpty(descKey)) {
            logger.error("Message description are empty. Do NOTHING just return");
            return;
        try {
            logger.debug("Add Message to Context");
            FacesContext context = FacesContext.getCurrentInstance();
            Application application = context.getApplication();
            // Add the message to the context
            context.addMessage(msgKey, getMessageFromBundle(descKey, severity));
        } catch (RuntimeException e) {
            * Supress RuntimeException.
            logger.error("Error occured when add message to context", e);
    With the first login page when validating username and password, the messages I send to the context display correctly, for example, “incorrect password please try again” and this uses exactly the same code as above in the backing bean.
    However once a session has started the messages simply do not get displayed and are not included in the HTML the <af:messages /> is replaced with nothing.
    No runtime exception is thrown.
    If anyone has any idea of why the messages are not being displayed I would be very grateful to hear them.
    Finally if I may add that I used this method of displaying messages in a previous project and it was fine. This time the only difference is that I am using Hibernate.
    The closest answer I could find to a similar issue with Oracle Forums was:
    The messages have to be added before the Render Response phase. It's generally very unusual to add messages in a bean getter/setter. I'd restrict yourself to adding messages in event listeners and actions.
    I do put messages in my setter methods as this is where I perform validation, but I have tried moving them to the main method called by the action button and this still does not display my messages.

    Frank
    There is a standard way? Next time you can simply tell me to RTFM ;-) . I am working on a project and was assigned my particular section and was told that the messaging aspect and validation was not urgent, until now near the end of the project when it has become urgent. Rather then listen to my colleagues answer of "this is the way to do it" your answer suggested that we working in a non-standard way.
    Having looked at Oracle JDeveloper 10g (10.1.3) Documentation, Validation, Conversion, and the Application Lifecycle section I noticed:
    Render response:
    Either display new page based on invoked navigation rules, or displays same page with errors.
    I was providing a new navigation String to the same page under all conditions, which I guess gives a new context and so does not display the messages. Under error conditions I now return an empty navigation String and now it displays my messages.
    Thank you for your help with this and I promise to read the manual next time.
    Andrew

  • PPR Report ,How to display Label with TOTAl

    Hi,
    How Can i display PPR Report ,How to display Label with TOTAl like
    [http://apex.oracle.com/pls/apex/f?p=267:30:]
    Thanks
    Edited by: 805629 on Jan 6, 2011 3:34 AM

    Hi,
    For PPR Report:
    Select "Yes" in "Enable Partial Page Refresh" item of "Layout and Pagination" region in Report Attributes of that report.
    For display Label with TOTAL:
    Use "Break Formatting" region in Report Attributes of that report.
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • ADF FACES af:messages only display 1 message

    Hi,
    I'm using the af:messages tag to display warning or error message.
    The problem, is that when I put multiple warning messages in the FacesContext, only one of them is displayed in the message box.
    FacesMessage warning= new FacesMessage(FacesMessage.SEVERITY_WARN, "This is a warning!", "Beware!!!");
    FacesContext.getCurrentInstance().addMessage(null, warning);
    warning= new FacesMessage(FacesMessage.SEVERITY_WARN, "This is another warning!", "Beware even more!!!");
    FacesContext.getCurrentInstance().addMessage(null, warning);In my JSP, I use the <af:messages /> tag without any attributes.
    In this case, only the "This is another warning!" message is displayed.
    Note that if I have multiple error messages, it behave the same.
    I've tried to look in the decompiled code of the renderer (and laf) but I was not able to find out where it retrieve the messages from the FacesContext.
    Using <h:messages layout="table"/> instead of <af:messages /> display the two messages.
    This is with EA9... I did not had a chance to test it with a more recent release of ADF.
    Is this something that is already fixed (if so in which EA) or a known issue?
    Thank's!

    This has been fixed since EA9. It really is time to upgrade!

  • JDeveloper 11.1.2.3, ADF Faces: declarative component does not support af:clientListener?

    I am trying to create a declarative component with the following code:
    <?xml version='1.0' encoding='UTF-8'?>
    <af:componentDef xmlns:af="http://xmlns.oracle.com/adf/faces/rich" var="attrs" componentVar="comp" definition="private"
                     xmlns:afc="http://xmlns.oracle.com/adf/faces/rich/component">
        <af:xmlContent>
            <afc:component>
                <afc:display-name>DoubleClickTableDialogClientServerListener</afc:display-name>
                <afc:component-extension>
                    <afc:component-tag-namespace>org.mskcc.crdb.common.declarativecomponent</afc:component-tag-namespace>
                    <afc:component-taglib-uri>http://www.mskcc.org</afc:component-taglib-uri>
                </afc:component-extension>
            </afc:component>
                <af:clientAttribute name="serverListenerType" value="TableDoubleClickEvent"/>
                <af:clientListener method="handleTableDoubleClick" type="dblClick"/>
                <af:serverListener type="TableDoubleClickEvent"
                                   method="#{EditAddDialogTemplateBean.handleTableDoubleClick}"/>
        </af:xmlContent>
    </af:componentDef>
    At runtime I recieve the following error:
    javax.faces.view.facelets.FaceletException: ADF_FACES-60023:Component: DoubleClickTableDialogClientServerListenerComponent[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@7170a7, id=dctdcsl1] does not support client listeners.
      at oracle.adfinternal.view.faces.facelets.rich.BaseClientListenerHandler.apply(BaseClientListenerHandler.java:53)
    This component was intended to be dropped off within an af:table component. I would like to hear suggestions on workarounds, one other way I thought about was to create a code template for the three tags, however, the con to this approach is each developer would need to configure this template within jdeveloper. Ideas are appreciated.
    Also a side question, how can I embed code properly with the new forum? [code] tag does not seem to work now.

    Wes, can't help with the real question, but can tell you how to format code
    Change to the advanced editor (top right over the editor field), then you get more options. The one you are looking for is behind the blue '>>'. Here you select the language you want to insert and you get nice code formatting and color.
    Timo

  • ADF Faces Query Panel: How to display master data in detail table?

    Before stating the question, here is the background:
    I've a Fusion ADF (model/viewController) app that includes 2 tables with a master-detail relationship. The master table stores error numbers and associated levels of logging severity; the detail table stores the actual message text. These need to be separate, related tables because the requirement is that message text for a given error number can vary by product release.
    Messages are added in a bounded task flow; data for the master table entered in 1 fragment, data for the detail table in a 2nd page fragment. In the app, the Entity Objects for these tables are related with a foreign key association and have a composition association. This was done because the error numbers are generated in an Oracle DB sequence, and from what i have read that is a way in a task flow to have ADF put the number generated for the master table into the related key of the child table.
    The question is this:
    I need to create an ADF query panel with a table that searches on the detail DB table. However, i also need to use a couple of fields from the master DB table in both the query and in the ADF table. In addition, I need to add the ability for the user to edit either the master or detail record for the row he/she selects in the ADF table. I know how to create a view that would display the info i need; however, i have not been able to figure out how to obtain the keys for the selected ADF table row and pass them to the task flows that would edit.
    The master table has a numeric primary key. The detail table primary key consists of a foreign key to the master key and also a release number.
    I'm new to ADF and have been struggling with how to do this: i've a workaround that is functional but too klunky to be a permanent solution. So, could someone point me to some information on how to accomplish this?
    Versions: JDeveloper 11.1.1.4, ADF Business Components 11.1.1.59.23
    Thanks for your help!

    Thanks. I tried this out, but ran into an issue in that the detail table has 2 keys - a foreign key to the master primary key, and a 2nd key that uniquely distinguishes the detail. So i tried various things centered around using the SetCurrentRowWithKey operation and trying to obtain the selected ADF table row using an EL OF #{data.<pageDef>.<Iterator>.currentRowKeyString}; however i could not get the detail record for the selected row to display.
    I did find another approach that worked - I am wondering, is there anything problematic with this approach?:
    1. Create a VO joining the Master and Detail tables, with the Detail table being updatable.
    2. Made sure the applicable attributes were defined as keys.
    3. Add a query panel w/table using this VO.
    4. Create an ADF form based on the VO, showing the updatable fields.
    5. Create a bounded task flow with the following set on the Behavior tab:
    a. Share data controls with calling task flow
    b. Always Begin Transaction
    I specifically am wondering whether "Share data controls with calling task flow" has any negative implications or gotchas to handle. The doc at http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/taskflows_parameters.htm#ADFFD1693 doesn't suggest so, but just wanted to double-check before I go down this path.

  • ADF FACES: af:messages and autosubmit

    Using EA14.
    I have a view comprised of a main .jspx and two included .jspx files that each contain a f:subview. The main .jspx uses an af:panelPage with a "messages" facet containing an af:messages element. An af:inputText field in a subview has the autoSubmit atrribute set "true". In a valueChangeListener on that field the value entered may be incorrect and a global error message is created by calling
    FacesMessage fmsg = new FacesMessage(FacesMessage.SEVERITY_ERROR, message, detail);
    getFacesContext().addMessage(null, fmsg);
    I give all this as prelude to asking why the message added above would not be displayed. If I add a message to the specific component, it appears properly. If I add a global message (clientid=null), the message does not appear. I even tried adding a partialTriggers to the af:messages element, but that didn't work either.
    So, is there anything obvious that would be preventing the error message from being displayed?
    Thanks.

    Are you saying that, whether or not you specify a null clientId, it won't appear in the <af:messages>? When it's non-null, and refers to a specific component, does it appear both by the component or in <af:messages>, or only by the component?

  • Build and Extend an ADF Faces Application (ADFDialogFwk-does not compile)

    Has anyone upgraded the "ADFDialogFwk" application to work with Jdeveloper 10.1.3 Early Access 1 ?

    It requires a specific version of ADF Faces ea17 to be downloaded from oracle... of course as of today this version is upgraded to ea19 when you check for updates
    maybe this is the problem with my Jdeveloper..
    Did you try to compile it with Jdev 10.1.3 AE ?
    Regards,
    Maira

  • Displaying labels with  a different color in a form

    hello all,
    how to display labels in a form in different color?
    the question may be simple to many. as i am new to apex.

    Hello,
    Please check if the following can help you - App. Express -- Change font size in the item label. .
    Regards,
    Arie.

  • Problem with resource bundle messages written inside script of jsf included

    Hi,
    I have a main jsf page with the name Details.jsp.In this page I included Contacts jsf page.I am using resouce bundle for my application.I written all the output text tags with this resouce bundle keys.And I written the Details main page javascript alerts with this resource bundle correctly.But the problem is,I am having script alrts in my included jsf apge i.e. in Contacts page.When I write the script alerts with the resource bundle keys,it is not displaying properly.
    ---------------------------------------------------------------------Details.jsp--------------------------------------
    <f:loadBundle basename="Details_en" var="msg"/>
    <f:view>
    <head>
    <script>
    function saveFn()
    var d=document.getElementById('dform:dinputtext').value;
    if(d=='')
    alert('<h:outputText value="#{msg.requiredValidationMsgkey}"/>');
    return false;
    if(emailValidation()==false)
    return false;
    </script>
    </head>
    <body>
    <h:form id="dform">
    <h:outputText value="#{msg.nameHeader}"/>
    <h:inputText value="#{Bean.name}" id="dinputtext"/>
    <jsp:include page="/Contacts.jsp"/>
    <h:commandButton value="Save" onclick="if(saveFn()==false) return false;" action="#{Bean.saveAction}"/>
    </h:form>
    </body>
    </f:view>
    -------------------------------------------------Contacts.jsp----------------------------------------
    <script>
    function emailValidation()
    var em= document.getElementById('dform:cSubView:cemailtext').value;
    if(em=='')
    alert('<h:outputText value="#{msg.emailValidationMsgKey}"/>');
    return false;
    </script>
    <f:subview id="cSubView">
    <h:inputText value="#{CBean.email}" id="cemailtext" />
    </f:subview>
    The alert message in SaveFn is getting appeared coorectly.But in the function emailValidation is not geting dispalyed correctly.It is appearing as normat output text in the page,but not as an alert.

    Thanks for the reply.
    But I want to do some validations using javascript not only the required validation.
    In my application 5 text fields and one command button are there .Depending upon combination of 2 or 3 text field values, I have to get the values when I pressed command button.
    If I use the h:messages for validators,the conversion error is occurring when the text field takes wrong data.So it is going to give incorrect results when I press the command button.Thats why I am using javascript.
    When user enters wrong data,I want to do validation using javascript and I want to display the alert message using resource bundle.

  • Messages Does Not Display Contact Card

    When I message someone or they message me to/from my Messages App on my MBP Messages will not fill in their contact information from my contacts. The only exception to this is when I am messaging someone who uses their email as their iMessage/Messages primary address.
    For example, if I am messaging my friend who has an iPhone and their primary form of contact is their phone number then they show up as a phone number in my Messages app on my computer. However, on my phone they show up with their contact information filled in and the messages usually sync (sometimes there is issues where my computer will take me back to the last place I sent a message on the computer even though it has synced all of the messages I have also sent from my phone that day.) *See Screen Shot 1 Below*
    The opposite example is if I am messaging someone who has set their primary contact information to be their email address. In this case, Messages will add their contact information and picture to the message thread similar to "Brent" and "Mom" in Screen Shot 2  below.
    I don't know what else to do. I've tried restarting the app. Deleting message threads and restarting them. I cannot find other people who are having this issue as well. I'm just trying to figure out why my messages won't sync contact info. It all started when facebook updated their syncing with contacts. And yes, all of these phone numbers are in my contacts and assigned to contacts with pictures both on my phone and synced to my MBP.
    Screen Shot 1
    Screen Shot 2
    Screen Shot 3 (My current system Settings)

    Hi,
    Not sure I would have got that one.
    Can't say I have seen it before.
    Custom in Language and text can mean two things.
    1) You have either added things to particular Displays  (such as day and Date to the Time display)
    2) You can changed something like a Measurement setting from British Imperial to Metric
    There are other "tweaks" such as using a Chinese Calendar whilst saying you are in the US.
    I have mine set to United States so I can use the AIM SMS "feature"  in Messages.
    8:45 PM      Friday; July 19, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.4)
     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
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • ADF faces - Urgent! - problem in display row-detail

    Hi all, I've maka a post yesterday but I still can't resolve the problem.
    I have a page that display data from the database.
    The amount of data is variable, so I configure the iterator as follow:
    <methodIterator id="XLB_find_user_OLIter" Binds="XLB_find_user_OL.result"
    DataControl="Session_EJB_TDBLocal" RangeSize="10"
    BeanClass="TDB.model.OltdbView" Refresh="always"
    CacheResults="false"/>
    The table have a single selection column and a view detail button.
    when user click the button, the following method is called (in the backing bean):
    public String ElaboraAtt_action() {
    OperationBinding bind=this.bindings.getOperationBinding("XLB_changeToWorkingOn_olTdb");
    int ret=(Integer)bind.execute();
    if(ret==0){
    XLB_changeToWorkingOn_olTdb make some operation on the record and return a result code.
    the bind for XLB_changeToWorkingOn_olTdb is:
    <methodAction id="XLB_changeToWorkingOn_olTdb"
    InstanceName="Session_EJB_TDBLocal.dataProvider"
    DataControl="Session_EJB_TDBLocal"
    MethodName="XLB_changeToWorkingOn_olTdb"
    RequiresUpdateModel="true" Action="999"
    ReturnName="Session_EJB_TDBLocal.methodResults.Session_EJB_TDBLocal_dataProvider_XLB_changeToWorkingOn_olTdb_result">
    <NamedData NDName="username" NDValue="${userState.name}"
    NDType="java.lang.String"/>
    <NamedData NDName="callid" NDValue="${showOl_backing.currentCallid}"
    NDType="java.lang.String"/>
    </methodAction>
    where showOl_backing is the backing bean.
    In the backing bean, the code for current callid is:
    public String getCurrentCallid() {
    JUCtrlValueBindingRef tableRowRef=(JUCtrlValueBindingRef) this.getOl_table().getRowData();
    return (String) tableRowRef.getRow().getAttribute("callid");
    The problem is:
    If the rows change between the rendered page and the next submit, the row retourned from getCurrentCallid() is wrong.
    I've seen that, before start to execute the action, ADF refresh the table with the new values, so I think that the selection is made with an index, but on new values...
    I've tried almous any solution...
    Thanks!
    Luca

    ...ok...finally...I've done...
    simply, i've setted cache resut to true in the iterator.
    When af:pool refresh the table, or when a refresh button is click, a method call execute the operationBindings, and the result are refreshed...
    Hi all!

  • Picture messages does not display

    When I receive a picture message and I try to open it, It open up a grey sceen with IMG_12345. It allows me to save the picture and view it in my camera roll. How can I fix this?
    iPhone4 running 6.1OS Jailbroken

    probably something to do with jailbreaking your phone, which can't be discussed here. try google.

  • Acrobat XI Pro Form under Windows 7 does not display Arabic with Arabic Typesetting font

    After creating a form with right-to-left enabled, and the font of the field set to Arabic Typesetting, I can fill in the form correctly, but when I exit the field the blue editng field returns, and the text is not displayed.
    What can I do to correct this?

    Gilad:  You're right: when the fields are different, such as a checkbox and a text field, and you try to title them the same, Acrobat gives you a message. I received no messages, the field names are not the same or I missed one and Acrobat is no longer messaging about it.
    My question is different. Acrobat XI will not let me paste any field copied from a different PDF.  I've been doing that for 5 years in three different versions.  Maybe Acrobat XI has a new process for that, which I could not find in Acrobat help. Maybe it's because all forms now have extended rights automatically in Acrobat XI and there is another method to copy common fields to other PDFs.
    Any thoughts about the new Acrobat XI? It's different in many good ways, but different.
    Thanks for your ideas.

  • ADF Faces Components:how to align af:panelBox with fields in af:panelForm?

    Hi,
    I have an af:panelForm component to which I added af:selectOneChoice and few af:inputText components. af:panelForm aligns all af:inputText fields properly with labels being right justified and the input fields left justified.I wanted to add af:panelBox at the end but don't know how to align it with the input fields.
    I wrapped the last input field and the af:panelBox inside af:panelBorder but this didn't help. I still get af:panelBox displayed at the extreme left hand side.
    I could put af:panelBox inside another af:panelForm but that does not work for me because af:panelBox happens to be target of a PPR, source of which is the af:selectOneChoice. Depending on the selected item of ad:selectOneChoice, I want to either show af:panelBox or hide it. So I had to include af:panelBox in the same af:panelForm that contains af:inputText so that both source and target of PPR are at the same level for PPR to work. I can also add af:objectSpacer before af:panelBox to get the alignment i am looking after but this again doesn't help because when window is restored or maximized, then the alignment gets lost. Any clue how to achieve that ?
    <af:panelForm>
    <af:selectOneChoice
    id="SelectOneChoice"
    autoSubmit="true"
    immediate="true"...>
    <af:forEach var="item"
    items="#{bindings.View_rIterator.allRowsInRange}">
    <af:selectItem value="#{item.id}"
    label="#{item.id}"/>
    </af:forEach>
    </af:selectOneChoice>
    <af:inputText ..../>
    <af:inputText ..../>
    <af:inputText ..../>
    <af:inputText ..../>
    <af:inputText ..../>
    <af:panelBorder partialTriggers="SelectOneChoice">
         <af:inputText ..../>
    <af:panelBox text="Panel Box:"
    background="transparent" width="200">
    <af:panelHorizontal halign="center">
         <af:inputFile .../>
         <af:objectSpacer width="3"/>
              <af:commandButton .../>
         </af:panelHorizontal>
    <af:panelHorizontal halign="center">
    <af:objectImage ..."/>
    </af:panelHorizontal>
    <af:panelHorizontal halign="center">
    <af:panelButtonBar>
    <af:commandButton ..."/>
    </af:panelButtonBar>
    </af:panelHorizontal>
    </af:panelBox>
    </af:panelBorder>
    </af:panelForm>
    Please advice.
    Thanks

    Hi,
    did you try skinning ? Inline style CSS doesn't necessarily work for the whole component as it operates on the root DOM element, which in the case of a composite component isn't the individual facet
    http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/skin-selectors.html
    af|panelPage::about{
    height: 30%;
    Frank

Maybe you are looking for

  • Status of document after duplicate in sbo 2007

    Hi,everyone I meet a problem in sap business one 2007B. When I duplicated a purchase order ,I found its status is "Unapproved", instead of "Open". So are those marketing documents.  Because of it,I can't create a Goods Receipt PO according to that pu

  • .swf file created from Indesign won't open in Flash Player

    I have created an interactive flash presentation using Indesign. For several weeks I have made edits, exported a .swf file and opened the file by double-clicking it to open in Flash Player. From there I was able to export an .exe file with an embedde

  • Quicktime 7.5.5 Cant Play AVC 1 files

    I got this movie that i try to open with quicktime is a mpeg4 file the video codec is avc1 but every time i try to open i got this error message "An invalid public movie atom was found in the movie" can someone help me please to find out if a need a

  • CS5 Design Standard Installation Problem

    I have a base build of XP Pro SP3 and i'm trying to install CS5 Design Standard.  The PC is a HP xw6200 with dual Xeon 3.4Ghz CPUs and 2GB of RAM. Unfortunately I get the following error: Exit Code: 7 -------------------------------------- Summary --

  • Iphone from mac to pc

    I am giving my girlfriend my iphone. I have only used it with my mac, she has a pc. It isn't important to keep any contacts, calendars or music etc (keeping the apps would be nice). Is it just a case of connecting it to the pc and syncing it as a new