facebook

Validation.xml using Multiple Message Resources

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #251302 Reply

    krunalshah
    Member

    I am using multiple message resource files. Now I want to pull up the text for <arg0 key=”prompt.username”> from a different resource file other than a default message resource file. Could someone answer me how I can do that.

    I have ApplicationResource.properties which is a default resource file.
    I have ErrorResource.properties which is only for error messages.
    I have LabelResource.properties which is for all the labels or caption used in my application.

    Now when I am defining a <html:javascript /> tag I am using my error resource file. Which will pull that “{0} is required” text.
    Now when I am defining the validation.xml file in

    
        <formset>
    
            <form name="LoginForm">
                <field property="username" depends="required">
                  <arg0 key="prompt.username" />
                </field>
                
                <field property="password" depends="required">
                  <arg0 key="prompt.password"/>
                </field>
            </form>
    
        </formset>
    

    How to get the key value from the LabelResource.properties

    Pls answer me ASAP.. Thanks

    #251328

    Riyad Kalla
    Member

    If you need an answer to this quickly, I would suggest cross-posting it to the Struts mailing list as well so other folks can help you out just incase you don’t get help here soon enough.

    I’d add that I don’t have any idea unfortunately how to do this, I’ve never needed to. I’ve always had the monstrously large ApplicationResource.properties files.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Validation.xml using Multiple Message Resources

You must be logged in to post in the forum log in