How to manage with the required attribute with the h:selectOneMenu ?

dear all,
I have form with some drop down list.
All have a default value to invite user to select a criteria.
By submitting my form I have an actionListener method wich check validity of the fields.
I would like to display a message near the <h:selectOneMenu> to point the attention of the user about selection must be done.
I try following:
<h:selectOneMenu  id="idContractNature" required="#{applicationController.requiredContract}" partialSubmit="true" valueChangeListener="#{applicationController.valueChangeContractType}" value="#{applicationBackingInfo.opportunityInfo.contractNatureId}">                          
               <f:selectItems    id="SlctContractNatureItms" value="#{applicationDefaultDataController.contractNatures}"/>          
</h:selectOneMenu>
<h:message for="idContractNature"></h:message>I set the required attribute to true in the actionListener method if the contract id is equal to 0 (my default value)
But it doesn't work.
How can i check the validity of the drop down list?
I set the required attribute to true when the

thanks but can set null for the value of the default value due to:
Can't set property 'contractNatureId' of type 'int' on class '....' to value 'null'.
because it's a list SelectItem with int / string

Similar Messages

  • How to override the default "required" attribute for the UIComponent?

    Hi, consider the following markup: <h:inputText id="txt_firstName" value="#{myBean.firstName}" required="true"/>
    if I leave this field empty and hit the submit button, the required validator will fire an error msg. If however, I leave an empty space in the text box and hit submit button, it will go through no problem.
    I'd like to override the required attribute, so it will trim the spaces first before decide if it really is empty:
    //whatever the name of the method i'm overriding....
    String value = (String)value;
    if(value==null)throw new ValidatorException(whateverDefinedInTheBundle);
    value = value.trim();
    if(value.length==0)throw new ValidatorException(whateverDefinedInTheBundle);
    How can I go about doing that?
    Thank you.

    Did you already try
               <af:treeTable value="#{bindings.DashProjectPhasesDev.treeModel}"
                                  var="node"
                                  selectionListener="#{bindings.DashProjectPhasesDev.treeModel.makeCurrent}"
                                  rowSelection="none" rowBandingInterval="0"
                             inlineStyle="width:810px; height:1100px;"> Check the last line with inlineStyle...
    Julian

  • WCF :Consider marking the type with the CollectionDataContractAttribute attribute or the SerializableAttribute attribute or adding a setter to the property

    Hi All,
    Currently I am working in a WCF project here when I try to send data from WCF Project 1 to WCF project 2 I am getting the below error.
    The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:subscriber. The InnerException message was 'The use of type 'Integra.Business.ICC.ObjectChangeTracker'
    as a get-only collection is not supported with NetDataContractSerializer.  Consider marking the type with the CollectionDataContractAttribute attribute or the SerializableAttribute attribute or adding a setter to the property.'.  Please see InnerException
    for more details.
    I don't understand what issue this is since I am new to WCF. Please help me on this thanks in advance.

    You've posted to a forum for Microsoft Project - a project management program.  Please re-post your question to the WCF forum:
    http://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=wcf
    Sorry - I cannot seem to move your post for you.
    Julie

  • How to change the required attribute of a field

    Hi,
    I'm using jdeveloper 10g, uix and jHeadstart to generate my application.
    In my form, I have some attributes that are required and if I change a checkbox, some of these fields that was required, must now be not required.
    How can I do this?
    Any ideas?
    Thanks!
    Martin

    Sounds like a custom validation, but you could also use a partial rendering and EL to achieve this. Lets say you could set the 'required' property of the field based on the EL expression calculating the value in the other field

  • HT4623 My computer is not taking the new update from itunes. It states that i do not have the requirements to finish the Install and that it was Installed incorrectly. I have never had any issue with any previous update regarding iTunes. What is the issue

    My computer is not taking the new update from itunes. It states that i do not have the requirements to finish the Install and that it was Installed incorrectly. I have never had any issue with any previous update regarding iTunes. What is the issue?

    Hi there Double2D,
    You may find the troubleshooting steps in the article below helpful.
    iTunes 11.1.4 for Windows: Unable to install or open
    http://support.apple.com/kb/TS5376
    -Griff W. 

  • AD user script to populate the IPPHONE attribute with the last 4 digits of the Telephonenumber attribute

    Good Afternoon Scripting Guys. I have a script that I have been working with pretty much all day today and just cant quite get it to play nice. Our objective is to search AD for specific users (say filtering them out with a username that starts with a "T")
    and User account is "Enabled" then grab the last four digits of their phone number (phone number is set up as follows: (800) 123 456 ) then populate the IPPHONE attribute with the last four digits of their phone number. I have read a ton of online
    blogs with users successfully making this happen but it appears that they are all using Quest (as the commands are all Get-qaduser and Set-qaduser). I need something that runs strictly in native Active Directory Module PowerShell on a Windows Server 2008r2
    Domain Controller.  I am also trying to keep it as simple as possible by using a Get command, then piping a Set command.  I have saved the script into a .ps1 file with the logic as follows:
    $SelUsers = Get-ADUser -filter {(SamAccountName -like "t*")} -Properties ipphone,telephonenumber -searchbase "OU=Test Users,OU=Temporary Org,OU=Test_Domain Users,DC=mydomain,DC=com" | where {($_.enabled -eq $True)}
    foreach ($user in $SelUsers)
     {$user.ipphone = $user.telephonenumber(4,$User.telephonenumber.length-4)
     set-aduser -instance $user}
    What is happening is kind of funny, but aggravating at the same time.  When we run the script, it completes with no errors.  When I pull up the properties of a user in the OU, the IP Phone field is populated with the number 8.  If the User
    account did not have a telephone number, the IP Phone field is populated with a -4.  So, apparently, the script is somehow subtracting the "-4" from the number of all of the Telephone Number field's characters.  Basically 12-4 is 8. 
    If there is no telephone number, then 0-4 is -4.  I have run the Get-ADUser portion of the script independently so I know its getting the correct users.  I also know it is populating the IPPHONE attribute but not with the last 4 digits of the telephone
    number.  Can you guys help out and maybe get this to work correctly?  Also, can you add logic to it to the script to delete any value in the IPPHONE field first, then replace it with the last 4 digits of the telephone.
    Any help would be GREATLY appreciated!!!!!  Thanks Guys...
    Lee

    First thing I would do is modify your filtering. This will remove the unneeded piping to the Where-Object cmdlet and also allow us to only return users who already have something in the telephoneNumber field. It is possible this could return all of your
    users, but if you have service accounts, etc. that do not have a telephoneNumber then they will not be included in your results. It's just a little cleaner.
    $SelUsers = Get-ADUser -filter {(SamAccountName -like 't*' -and Enabled -eq $True -and TelephoneNumber -like '*')}
    I suspect you may have a made a mistake when you entered what your phone numbers looks like. I assume that you forgot a final digit. If this is correct, and you have a space in the phone number between the three digits and the final four then you can use
    the split method to grab the last four digits.
    Foreach ($User in $SelUsers) {
    $Number = $User.telephoneNumber.split(' ')[-1]
    Set-ADUser -Identity $User -Replace @{ipPhone=$Number}
    There's no reason to delete what's in the field first because that's part of what the -Replace parameter will do anyway. This should help get you started!

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • FatalError: The required attribute 'FeatureDefinitionScope' is missing

    Hi all, 
    I'm trying to export a Subsite from a WSS 3.0 SharePoint to SharePoint Foundation 2013. I haven't installed or enabled any further features on both servers. While importing the site via Import -SPWeb I got the Error FatalError: The required attribute
    'FeatureDefinitionScope' is missing. I compared the features and cant see any obvious difference. Any Suggestions what else I can do?
    Here is the whole Error message
    [29.01.2014 15:01:05] [ListItem] [default.master]   Verbose: List URL: /websites/Webseitesammlung/_catalogs/masterpage
    [29.01.2014 15:01:06] FatalError: The required attribute 'FeatureDefinitionScope' is missing.
    [29.01.2014 15:01:06] Debug:    at System.Xml.Schema.XmlSchemaValidator.SendValidationEvent(XmlSchemaValidationException e, XmlSeverityType severity)
       at System.Xml.Schema.XmlSchemaValidator.CheckRequiredAttributes(SchemaElementDecl currentElementDecl)
       at System.Xml.Schema.XmlSchemaValidator.ValidateEndOfAttributes(XmlSchemaInfo schemaInfo)
       at System.Xml.XsdValidatingReader.ProcessElementEvent()
       at System.Xml.XsdValidatingReader.Read()
       at System.Xml.XmlReader.ReadToDescendant(String name)
       at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream)
       at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream)
       at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects()
       at Microsoft.SharePoint.Deployment.SPImport.Run()
    [29.01.2014 15:01:06] Progress: Import did not complete.
    Thanks for any suggestions!

    You can't use export and import, as this will not work across versions.  Your path to 2013 should be attaching your wss3.0 db to 2010, so that it can upgrade, and then detach and attach it to 2013.  Backup/Restore does NOT work across versions...
    even 2010 to 2013...

  • Can we change the View attribute of the Switcher through PERSONALISE PAGE?

    Can we change the View attribute of the Switcher through PERSONALISE PAGE? I want this switcher to display another column. This switcher that i want to change is a seeded one. I have extended a VO and added a new attribute. I want this Switcher to display this new attribute. How can I acheive this.
    Regards
    Ali

    When I do exactly that I get a .XLS file that when you open it and click Save As comes up in Single Web Page mode. When I change the type I get a much smaller file. I am doing exactly what you describe, but with different results. Is it possible that this is configurable?
    Here is a screenshot of me exporting:
    http://i879.photobucket.com/albums/ab359/jameyweare/problem1.gif
    Here is the properties of the file. As you can see the size is 215kb This is actually a very small query for for demonstration purposes. I have queries that return 20k rows with 10 to 15 columns. This creates a spreadsheet that is over 20MB.
    http://i879.photobucket.com/albums/ab359/jameyweare/problem2.gif
    This next screenshot is of the Save As dialog from Excel. I have highlighted the file type that the file is currently saved in.
    http://i879.photobucket.com/albums/ab359/jameyweare/problem3.gif
    In this screenshot I have changed the file format.
    http://i879.photobucket.com/albums/ab359/jameyweare/problem4.gif
    Here is the new properties. The file size has decreased to 57.5kb. In the cases where I had files that were 20MB or greater (and took aver 10 minutes to open up), this process reduced those files to about 200kb.
    http://i879.photobucket.com/albums/ab359/jameyweare/problem5.gif
    Any help on this would be appreciated.
    Edited by: Jaime Weare on Jul 17, 2009 3:38 PM

  • Data type of the base attribute or the base value does not match...

    ...the assigned expression.
    Hello all,
    I always get the Error
    +<ERROR+
    TEXT="'DWH.CUB_REGISTRATIONS_AW.REGISTRATIONS': XOQ-02517: Der Datentyp des Basisattributs oder der Basisgröße stimmt nicht mit dem zugeordneten Ausdruck überein.
    XOQ-01400: Ungültige Metadatenobjekte"/>
    The English message must be something like this:
    The data type of the base attribute or the base value does not match the assigned expression.
    when I run my mapping. The attribute REGISTRATIONS is NUMERIC (12,2) in the Cube and I map a NUMERIC(12,2) constant in it.
    I use a simple OWB-Mapping for loading, but I don't understand why it doesn't function. Other mappings where the attributes are out of a
    table I put in a cube are running well.
    I tried different things, but nothing fixed my problem. Any idea ?
    Thanks a lot for help
    Michael

    Technically this is a 'warning' from the server, not an 'error'. This means that the change you made should have been submitted, but you get an warning message on the client. AWM would suppress this warning, but evidently OWB does not. Can you switch to use AWM?
    Here is the definition of the warning along with 'cause' and 'action' sections. (Unfortunately these sections are not translated into German for some reason.)
    >
    02517, 0, "The data type \"%(1)s\" of the base attribute or base measure is different from the mapped expression \"%(2)s\"."
    // *Cause: Either the base attribute or base measure with the mapped expression was set to an inconsistent data type, or it was mapped to an expression of a different data type from its fixed data type.
    // *Action: When changing a mapped expression for a base attribute or base measure, ensure that the expression has the same data type; otherwise, set the data type of the base attribute or base measure to NULL first. When a base attribute or a base measure has an existing mapped expression, do not set it to a different data type.
    >
    It is probably safe to ignore this warning, but if you can post the relevant XML for the cube, then will probably be able to spot the problem. I assume that REGISTRATIONS is a measure in the cube CUB_REGISTRATIONS_AW, so this is what you can look for in the XML:
    (1) The definition of the base measure along with the datatype. It should be something like this
    <Measure>
      <BaseMeasure
        SQLDataType="NUMBER(12,2)"
        ETMeasureColumnName="REGISTRATIONS"
        Name="REGISTRATIONS">(2) The mapping info for the measure, which should looks something like this:
    <MeasureMap
      Name="REGISTRATIONS"
      Expression="...">
      <Measure Name="REGISTRATIONS"/>
    </MeasureMap>I don't know if you can get the XML directly from OWB. If not, then DBMS_CUBE.EXPORT_XML should work (assuming you are in 11.2). You could also attach AWM and save the cube to an XML template.

  • This morning I ask about the requirement to download the adobe Cs6 before i buy the product and the salesperson told me that i met the requirement for that particular software, so my surprise now when i open the file it says an error because my computer d

    this morning I ask to a sales person about the requirement to download the adobe Creative Cs6 before i buy the product and the salesperson told me that my computer met the requirement for that particular software, so my surprise now when i open the file it says an error because my computer doesn't meet this requirement,  my computer is a OS X 10.5.8 and the requirement  is OS X v10.6.8 or v10.7 what can i do?

    The requirements are online. For the Master Collection the requirements on Macs are:
    Mac OS
    Multicore Intel processor with 64-bit support
    Mac OS X v10.6.8 or v10.7
    4GB of RAM (8GB recommended)
    15.5GB of available hard-disk space for installation; additional free space required during installation (cannot install on a volume that uses a case-sensitive file system or on removable flash-based storage devices)
    Additional disk space required for disk cache, preview files, and other working files; 10GB recommended
    1280×900 display with 16-bit color and 512MB of VRAM; 1680×1050 display required and second professionally calibrated viewing display recommended for Speedgrade
    OpenGL 2.0-capable system
    DVD-ROM drive compatible with dual-layer DVDs (SuperDrive for burning DVDs; Blu-ray burner for creating Blu-ray Disc media)
    Java™ Runtime Environment 1.6
    Eclipse™ 3.7 Cocoa version (for plug-in installation of Flash Builder); the following distributions are supported: Eclipse IDE for Java EE and Java Developers, Eclipse Classic, Eclipse for PHP Developers
    QuickTime 7.6.6 software required for QuickTime features, multimedia, and HTML5 media playbackOptional: Adobe-certified GPU card for GPU-accelerated performance in Premiere Pro; see the latest list of supported cards
    Optional: Adobe-certified GPU card for GPU-accelerated ray-traced 3D renderer in After Effects; see the latest list of supported cards
    Optional: Tangent CP200 family or Tangent Wave control surface for Speedgrade
    Optional: 7200 RPM or faster hard drive (multiple fast disk drives, preferably RAID 0 configured, recommended) for video products
    Broadband Internet connection and registration are required for software activation, validation of subscriptions, and access to online services.* Phone activation is not available.
    You should have been given the correct information. Adobe offers 30-day money back guarantee.
    You can find return information here:
    Return, cancel, or exchange an Adobe order

  • Issue on deployment: Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''

    Hi,
    I have the following issue when deploying:
    Solution Deployment : Missing one or more of the following attributes from the root node in solution .wsp: assembly '', type ''
    The solution is a farm solution (was never sandbox) and it deploys fine.
    It was updated several times with success. We did not see this issue until recently when we had some other issue (unrelated) and looked at the logs. The solution is updated without problem and updates are available for the user. But we can see this error
    in the logs at the update time. 
    Any idea what might cause this?
    Pop Anisia

    Hi,
    This error is wide meaning, as it can come from differences between SP versions, variables types used, bad manifest file, WebConfiguration ...
    You can try to redeploy the solution.
    retracted the solution,removed all the previous ref, removed dll from GAC and folder from 14\features and reset the iis, deploying it again.
    Here are some similar issue post, you can use as a reference:
    https://social.technet.microsoft.com/Forums/office/en-US/72ac9a02-3a51-48b8-9e36-3b24a2d4da74/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-alertbdcwsp?forum=sharepointgeneralprevious
    https://social.technet.microsoft.com/Forums/office/en-US/331af288-5ba6-48a7-9e9d-ac4e4bc8f8fa/missing-one-or-more-of-the-following-attributes-from-the-root-node-in-solution-xxxwsp-assembly-?forum=sharepointdevelopmentprevious
    In additional, you can check the ULS log (C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS) to get the detailed information.
    I hope this helpful.
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Slideshow page appears to load all images at once making it very slow. Is it possible to force it to load just the required items for the immediate page / slide

    Hi Everyone
    First post and a Muse / Web Noob.
    Im building my personal website with muse ( CC and now CC 2014 ) , its quite simple with slideshows embedded inside each other and is just 4 pages in total.
    My two slideshow pages appears to load all images at once making it very slow ( plus 20 secs on my system ). Is it possible to force it to load just the required items for the immediate page / slide. It would be so much faster and would work much better in this particular situation.
    Ive built all the images and icons at the correct size so optimisation shouldn't be an issue. The whole site is only about 42mb.
    www.paradoks.co.uk
    Many thanks
    Deck

    Oh well the problem seems to have fixed itself. It seems it was either a Java or Tumblr problem because the same thing happened when I installed Chrome. It is a lot more stable now and no more crashes yay.

  • Will apple fix the requirement to use the iCloud to sync?

    will apple fix the requirement to use the iCloud to sync?, Do not want to use it, rather usb sync and it seems there are many others.

    Hi,
    I must admit to having moved to iCloud to do this some while ago.
    I had presumed the wording in iTunes and the big Sync button at the bottom did actually mean Sync.
    However it seems you are explaining it is similar to the iMessages "Sync" across devices which is in fact actaully only "Display on All Devices". (What you do with an iMessage on one device does not effect it on another).
    Thanks for the clarity.
    7:06 pm      Tuesday; April 15, 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

  • Text field properties-Using the 'required' option in the text field properties.

    Using the required' option in the text field properties.
    The 'help' manual describes the 'required' function as this: Required Forces the user to fill in the selected form field. If the user attempts to submit the form while a required field is blank, an error message appears and the empty required form field is highlighted.
    My users ARE not submitting the form, they open the pdf, fill it out and print it. HOW can I, make a field "required', I don't want them to skip/leave blank specific fields. However, if I choose the box 'required' in the text field properties, and I begin filling out the form, I can just tab past that field that I've choose as 'required', and I do not get
    prompt/error message or anything, it allows me to save, or print.
    I WANT SOME TYPE OF message (similar to enter a company order form
    off the web, where you can't continue without filling out 'required' fields).
    Is there a step/option I am not doing?

    Then you are going to have to write some JavaScirpt to be executed by the "Will Print" document action to check all the requried fields, either by name or by the 'required' property and handle the issue of the imcomplete fields. You will not be able to stop the print, but you could display and error field so the user knows the form is incomplete and the printed form also conatains this information.

Maybe you are looking for

  • Closing stock report 31.08.2008

    Hi, Sap experts I want to see the report which can show Closing stock as on 31.08.2008 - Quantity , Value , date & material name & master can anyone known about this report regards gk

  • Syncing photos and catalogue over two Macs, using Box

    There's me thinking I was dead clever. I use Box for my business filing, so have unlimited storage and can sync to my two Macs. But it turns out that Box can only sync 40,000 files, and, the killer is, it won't sync the catalogue previews file. These

  • Case Statement in Crystal - Still need help

    I posted earlier today and I was told to use the formula below.   This formula works, however, it stops imputing information after the first condition is met.  I want the report to list ANY of the part numbers that meet the conditions below.  That is

  • Jasper

    Dears, can in jasper report import PDF file? for example I have report (myReport.jasper) and I have (doc.pdf). I need set doc.pdf in myReport.jasper. as image.. when view myReport.pdf . I can view doc.pdf in myReport.pdf. thank you

  • RV110W and QuickVPN - Servers Certificate Doesn't Exist

    After a day of troubleshooting I have finally got the QuickVPN client to work.  I connect however during the connection I get: "Server's certificate doesn't exist on your local computer.  Do you want to quit this connection?" I click no and it connec