af:messages - component name is appearing as the text 'component'

Hi,
Could any one please help me to resolve this validation issue occuring in <af:messages> popup.
I am using the <f:validator validatorId="validator.NameValidate"/> component to display faces messages in the popup.
The component link that gets generated does not have the same label. Sometimes the name of the component, e.g. "Age" is printed out which is acceptable.
But in my case, the word "Component" is printed out, which is unacceptable because it will not make any sense to our customers.
*Expected Condition - If validation fails for Age, Name [Appears as a popup]*
*<Error-icon>Error*
Messages for this page are listed below.
Age(clickable)     <Error-icon>This is not valid Age. The should contain only numbers.
Name(clickable)      <Error-icon>This is not valid name. The should contain only alphabets.
*Actual Condition - If validation fails for Age, Name [Appears as a popup]*
*<Error-icon>Error*
Messages for this page are listed below.
Component(clickable)     <Error-icon>This is not valid Age. The should contain only numbers.
Component(clickable)     <Error-icon>This is not valid name. The should contain only alphabets.
Please help.................
Regards
Jeffry
Edited by: Jeffry on Oct 18, 2011 1:51 AM

Hi John,
Thanks for Responding.
Here is the sample code :
In Jsff (includes in a JSPX which has a template ref) :
<af:inputText id="givenname"
value="#{pageFlowScope.registrationMB.givenName}"
styleClass="regforminput" maximumLength="36" binding="#{ValidateForm.givenName}">
<f:validator validatorId="validator.NameValidate"/>
</af:inputText>
</af:panelGroupLayout>
In faces-config.xml
<validator>
<validator-id>validator.NameValidate</validator-id>
<validator-class>com.adf.validator.NameValidator</validator-class>
</validator>
Validator class - NameValidator.java
package com.adf.validator;
import java.io.Serializable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
import oracle.adf.view.rich.component.rich.input.RichInputDate;
import oracle.adf.view.rich.component.rich.input.RichInputText;
import oracle.adf.view.rich.component.rich.output.RichOutputLabel;
public class NameValidator implements Serializable, Validator {
public NameValidator() {
super();
public void validate(FacesContext facesContext, UIComponent uIComponent,
Object object)throws ValidatorException {
String value = (String)object;
if ((value == null) || value.length() == 0) {
return;
String expression ="^[A-Z][a-zA-Z]*$";
CharSequence inputStr = value;
Pattern pattern = Pattern.compile(expression, Pattern.CASE_INSENSITIVE);
Matcher matcher;
matcher = pattern.matcher(inputStr);
if (!matcher.matches()) {
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_FATAL,
This is not valid name. The should contain only alphabets.",
null));
Regards
Jeffry

Similar Messages

  • I connected my new iphone 4 to itunes but now it wont recognise my old 3gs. My name doesnt appear on the left. i want to transfer all my songs to my new one but cant sync now. can anyone help

    i connected my new iphone 4 to itunes before backing up my old one but now it wont recognise my old 3gs. My name doesnt appear on the left. i want to transfer all my songs to my new one but cant sync now. can anyone help

    Plug your phone into the wall charger for at least 30 minutes...make sure you have a sim card in the phone...then:
    Leave the USB cable connected to your computer, but NOT your phone, iTunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new.
    Make sure you have no anti-virus software running or any firewalls...turn all of that stuff off.

  • My name now appears on the upper right hand corner of my display after upgrading to mountain lion.. is there a way to get rid of that?

    my name now appears on the upper right hand corner of my display after upgrading to mountain lion.. is there a way to get rid of that?

    In System Preferences > Users & Groups > Login Options (below the list) > click the padlock and authenticate > Uncheck Show fast user switching menu as:  or you can change it to icon.

  • I use the apple email in my mac air. When I foward messages, people that use Outlook receive the text in form of attachment instead of the message opened in the body of the email. How can I solve this?

    I use the apple email in my mac air. When I foward messages, people that use Outlook receive the text fowarded in form of attachment instead of the message opened in the body of the email. How can I solve this? Thanks. Best regards.

    this:
    Did not exist at the point of delivery to the consumer.
    Nor did the white corrosive agent present exist at the point of sale.
    " exposure   of copper   alloys   to   moisture   or   salt   spray   will   cause   the formation  of  blue  or  green  salts  called  verdigris.  The presence   of   verdigris   indicates   active   corrosion."
    I see also 2 contact points with DEEP corrosion pitting not indicative of any defect from the factory.

  • What can I do, if my keyboard appears on the text when I write? Because I can't read what I'm writing

    Lately
    I have troubles when I have to write something because my keyboard appears on the text, so I'm not able to see what I just typed.
    I try to review the settings but I don't know how can I resolve this, but well, I'm here so it is obvious.  
    So do not hesitate in contact to me, because is awful to hide the keyboard after I type a statement just to see

    Just a glitch.  I wouldn't worry. Here is a tip about the keyboard.  Hold fingers at two spaced locations on the keyboard and drag the keyboard apart. Do the reverse and drag the split keyboard back together.  Also this can be achieved by holding the key I mentioned previously and choosing undock or split and you can get back to where the keyboard is on the bottom of the screen by doing what I said before.  Have a play

  • I downloaded the pages application, to be used like " word", but I can't get if I can use it also to revise documents ....so as to make corrections and they appear on the text. thanks for the help

    I downloaded the "pages"  application, to be used like " word", but I don't know if I can use it also to revise documents ....so as to make corrections and they appear on the text. thanks for the help

    tatarapido wrote:
    I downloaded the "pages"  application, to be used like " word", but I don't know if I can use it also to revise documents ....so as to make corrections and they appear on the text. thanks for the help
    Why repeat the question in the description area? That provides no more information than just leaving the description area blank.
    Yes you can edit documents in Pages. What can you not figure out that you want to do? Have you transfered a document to the iPad and opened it in Pages and tried to edit it?

  • TS2755 all of my contact "names" that appear on my text messages have now become contact numbers.  I prefer the history to show the name rather than the number.  how do i convert this setting back to names?

    Hello, my phone has just changed a setting and I am unable to figure out how to change it back.   Historically my text messages are saved and stored by "contact name".  Now they appear by "contact number".  I prefer contact name and would like help with how to restore or return to the original setting.
    Thank you so much

    This happened to me too, and my pictures dissapeared.  If you click the number, a drop down menu will appear and you can choose add to exisitig or create new contact. 50% of the time I am able to see the contact in my list the other %50 I have to create a new contact. When you do either of these the name will show versus the number. I think this is a bug with the latest update.

  • TS4268 Trying to send a message but the name that appears in the destination box is 'emergency' not the contact but the message goes to the contact. How can I rectify this?

    I was sending messages to family but noticed that the names in the contact box were 'emergency' and not the contacts I was writing to.  Can anyone explain this and how to amend it back to contact names, please?

    First just try logging out and back in.  Whatever is holding on to it may not be running after the logout thus freeing it so you can trash it after logging back in.
    You might also try Trash It!
    Lastly, look at the following for suggestions:
    The X Lab: Solving Trash Problems

  • Logical System Name Not appearing in the Business System

    Hi,
    Initially we had created a Technical system with Client 700 without a "Logical System Name" in SLD. hence the 'logical system name' in 'business system' was also Blank.
    Now, since we are implementing the IDOC to file scenario; we need to maintain the "Logical System Name" in the client and which in turn should reflect in our Business System in SLD.
    Though we maintained the Logical System Name in the Technical System --> Client --> Logical System Name; we are unable to see the same(Logical System Name) in Business System ('Integration' tab)
    Please also note that Business System is of the ROLE: Integration server.
    When we go to business system in SLD ---Integrtaion tab ---Logical System Name -- is still blank.
    Can anyone please help us to update the 'Logical system name' in Business System in SLD?
    Regards,
    Rehan

    Hi Sunil,
    I followed your link till
    Bussiness System -> select your bussiness System -> in Below pane u will find Details of your bussiness system ->amongs the various tabs available select Integration Tab->U will See option for technical system beside that u will see option for change ->click this ->u will be taken to Logical system ->there u define u r logical syatem name and then save the entries.
    When I clicked the option chnage ---> "Change Associated Technical System" appeared, It didn't take me to Logical system.
    But in turn I clicked hyperlink corresponding to Technical systems, it took me to technical system --> clients tab --I have entered the Logical system name.
    When I go back to Business system again its not showing the Logical system name in Integration tab.
    regards,
    rehan

  • How do I get the Tab Group names to appear above the Tabs?

    At one point the names of all my Tab Groups appeared above the Tabs. That is, on every page there's a horizontal list of open Tabs. Above that there used to be a similar looking horizontal list of all Tab Groups. Now that horizontal list of Tab Groups is gone.
    This was useful for rearranging and re-categorizing Tabs into different Groups because I could see the whole page for any given Tab, and could move the Tab to a different Tab Group simply by clicking on the Tab and dragging to to any Group in the Tab Groups section above the Tabs section. This was usually easier than rearranging Tabs on the Tab Groups page (accessed by clicking the "Group your tabs" icon at the upper right of the display).
    I don't know how this feature got there or why it went away, but I liked it.
    How can I get this back?

    Tab groups were the primary reason I used Firefox (since the beginning).
    Now that they are gone, so am I !!!!!
    -- However ... good news! ... they are not gone, just a tiny bit more difficult to manage.
    You right click on the tab and select Move To Group. You then create new tab groups within the Tab Group interface. Once you've done that, the familiar Tab Group boxes icon appears in the upper right hand corner of each Group in full display.
    Having done it a few times, I can't even remember now what the original method was precisely. But all the functions are still there -- that's the important thing! And I'm still here on Firefox (at least until the next bone-headed crisis....)

  • Original form name still appears in the web title bar when renamed file is posted.

    When I rename a form for reuse the name of the original form still appears in the web title bar. How do I get the web title bar to reflect the new form name?

    Outlook Web Access sends illegal Content-Disposition headers and this is no longer allowed in Firefox 8. The server needs to be fixed.
    See:
    * https://support.mozilla.com/en-US/questions/894442
    * https://support.mozilla.com/en-US/questions/895024

  • In adobe Captivate I would like the person taking the quiz to write their name and then for that name to appear on the score page.  Anyone know how to do that?

    I have lessons created using Captivate that my high school students use.  I would like the student taking the test to type their name and have it appear on the score page so that they cannot share results.
    Otherwise kids can do these for HW and share it with their friends.
    thanks

    Supposing you don't use a LMS, this could be the work flow:
    Add a Text Entry Box in the beginning of the course to ask for the name. If you want to be sure that they really do enter a name, have a look at:
    Where is Null? - Captivate blog
    Each Text Entry Box has an associated user variable.It is created automatically with the same generic name as the TEB, but you could better use a more significant name for the user variable:
    Save Time: Create Associated Variable for Text Entry Box while Defining this TEB - Captivate blog
    On the Score slide, insert a text container (caption or shape) in which you insert the user variable, using the X button in the Properties panel of the text container; it will appear between $$ and be replaced by the value of the variable on runtime

  • When sending an email my From: box says "undisclosed recipient" rather than my actual name...want my name to appear in the From: line

    When I compose and send an email my name and email address show on the screen. But when it is sent the "From:" changes to "undisclosed recipients". I have a screen print of what I am talking about...but don't see on this screen how to send it to you.
    Hopefully you can give advice to a new user of Thunderbird.
    Margaret

    Woops...found the problem. My address book had the name "undisclosed recipients" next to my email address. I edited that name to say "Margaret Parsons" and presto my name appears in the "From" line on my sent emails. Yeaa....problem solved, given enough time and poking around Thunderbird...sure love this email.
    Margaret

  • How can ikeep my other account names from appearing in the sign in box for gmail

    when i sign in to gmail while using firefox,al of my other account names appear in the sign in box.How can I prevent this

    See:
    * http://kb.mozillazine.org/Deleting_autocomplete_entries
    * http://kb.mozillazine.org/Password_Manager

  • Contact names not appearing in group text

    When sending a group text the contact names do not appear but the phone numbers do, is there a way to change this?  Phone is a Z30  STA100-5

    I didn't have the problem when returning from International, but I did have the problem right after my new Verizon iphone was set up last week. 
    After reading some of the posts in the support forum, I first edited my contacts to include the +1 in front of the phone numbers (this may have been an unnecessary step, and it certainly was an annoying one).
    Second, I used the *228 set up feature, closed the phone, contacts and text functions on the phone, then turned the phone off and back on, and it seemed to fix the problem for the most part.  I think if you search the forum for *228, you will find posts that have the full sequence of steps to follow.. 
    I have other issues with my phone, but at least this one seems cleared up for now.

Maybe you are looking for

  • Data from DSO to CUBE

    hi gurus, please tell me from which table (Changelog or Active data) of DSO the cube will pick the records and also overwrite functionality works with DSO Change log Please awaiting a quick response Thank you

  • Transfering purchases from iPhone 4 to iPhone 4S.

    I was looking for a little help on this issue.  I have just ordered the iPhone 4S and want to move my purchases from my old iPhone 4 to it.  To make a long story short I have a Mac running Snow Leopard and HAD a macbook pro which I just sold.  Once I

  • "Buying" TV shows...

    IF I bought a season of Boston Legal (or any other series), would I "own" it or would I only have a 30 day viewing period before they went "poof" like the rental movies. Also, if I bought a series, could I sync it to my both my Apple TV and my IP?

  • My Macbook Pro just shuts off.....not very happy

    I got my 17" MBP a week ago Saturday. Everything was fine for almost a week. Friday it shut odwn on me three times. I called Apple Care and they walked me through a series of steps that supposedly would take care of the problem: remove the battery, p

  • Bluetooth Does not work

    So I recently bought some Kinivo bluetooth headphones and installed the bluetooth adapter that came from the same company. My issue is that Skype will not allow bluetooth to be accessed. I found this by going to tools>options>advanced>advanced settin