Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7421205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:22:12+00:00 2026-05-29T08:22:12+00:00

i have a form in JSF2.0 like this <h:form id=validationFrom > <div id=mandotary >

  • 0

i have a form in JSF2.0 like this

    <h:form id="validationFrom" >

        <div id="mandotary" >

            <h:panelGrid columns="4"
                         border="1"
                         width="50%"
                         style=""
                         columnClasses="asteriskColumns, nameColumns" >

                <h:outputLabel value="*" style="color: red;" />
                <h:outputLabel value="Heading: " />
                <h:inputText id="heading" value="#{validation.heading}" />
                <h:message id="headingMessage" for="heading" style="color: red" />

                <h:outputLabel value="*" />
                <h:outputLabel value="Select Category Type :" />
                <h:selectOneRadio id="selectCategoryRadioButton"
                                  rendered=""
                                  value="#{validation.selectedRadioButton}"
                                  layout="layoutDirection">

                    <f:selectItems value="#{validation.radioButtonItems}"/>

                </h:selectOneRadio>
                <h:panelGroup />

                <h:outputLabel value="*"
                               rendered=""/>

                <h:outputLabel value="Broad Category :"
                               rendered=""/>
                <h:selectOneMenu id="broadCategory"
                                 rendered=""
                                 value="#{validation.selectedBroadCategory}" >

                    <f:selectItems value="#{validation.broadCategoryItemsList}"/>

                </h:selectOneMenu>
                <h:message id="broadCategoryMessage" for="broadCategory" style="color: red" />

                <h:outputLabel value="*" />
                <h:outputLabel value="Sub Category :" />
                <h:selectOneMenu id="subCategory"
                                 value="#{validation.selectedSubCategory}"
                                 style="width: 250px;">

                    <f:selectItem itemLabel="---Select---" noSelectionOption="true" />
                    <f:selectItems value="#{validation.subCategoryItemsMap}"/>

                </h:selectOneMenu>
                <h:message id="subCategoryMessage" for="subCategory" style="color: red" />

                <h:outputLabel value="*" style="color: red;" />
                <h:outputLabel value="Description: " />
                <h:inputText id="description" value="#{validation.description}" />
                <h:message id="descriptionMessage" for="description" style="color: red" />

            </h:panelGrid>

        </div>

        <h:commandButton id="saveButton"
                         value="Save"
                         action ="null"/>


        <h:commandButton id="cancelButton"
                         value="Cancel"
                         action="null" />

    </h:form>

</h:body>

Now i want to select form and div with class mandoroty, so i can check all the elements inside div. I am trying this, but it isn’t working

(function($){

    var mandotoryFieldsArray = $("#validationFrom div.mandotary")
    var test;

})(jQuery); //end of (function($){}

The line is giving me null array. Why? What i am doing wrong in selecting the form element?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T08:22:12+00:00Added an answer on May 29, 2026 at 8:22 am

    try to use

    $("[@id=validationFrom :mandotary]");
    

    refer blog http://rockycode.com/blog/ids-jsf-used-jquery/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have form like this: <div class=satu> <input type='text' size='1' maxlength='1' name='score[1][]' id='score[1][]'> </div>
I have form like this : <div id='add_field' class='locbutton'><a href='#' title='Add'>Add</a></div> <div id='remove_field' class='locbutton2'><a
I have form like this: <input type='text' name='people' id='namepeople'> <input type='hidden' name='idpeople' id='idpeople'> <input
I have form, where some fields are looks like rows, so I can add/delete
I have form in my page, I am using ajax.beginform(). Inside this form I
I have form with dateTimeField, and ListView. ListView looks like that: final ListView<String> countryView
I am trying to construct equivalent of this code in JSF2 <form action=/search.xhtml method=get>
i'm doing a JSF2 project. 1 . i have a form with some checkbox.
I'm using JSF2 on GlassFish 3. I have a form that accepts and optional
I have the following form in a p:outputPanel <h:form id=someForm> <p:panel id=panel header=HEADER> <h:panelGrid

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.