How can Client side validate in jsf ?

Hello,
This is mohan, I am newly for jsf. can you please anyone tell me, how to clinet side validate in jsf?
thanks Mohan

Use JavaScript.
JSF does not do client side validation. It is only a server-side technology.
CowKing

Similar Messages

  • How can we a validate a CSV file in SSIS and log the error details in another CSV File by using Sript Task.

    How can we a  validate a CSV file in SSIS and log the error details in another CSV File by using Sript Task.

    Please see:
    http://www.bidn.com/blogs/DevinKnight/ssis/76/does-file-exist-check-in-ssis
    http://social.msdn.microsoft.com/Forums/en-US/01ce7e4b-5a33-454b-8056-d48341da5eb2/vb-script-to-write-variables-to-text-file

  • How Can I use EL in JSF

    Dear All
    I want to add If condition in JSF page .
    How can I use EL at JSF page
    I want ot Add If condition .
    With Thanks and Regards
    Gunjan Bohra

    Actually By Problem Is Regarding DataTable Binding Method
    <f:subview id="vesselist" rendered="#{vesselBaseVO.dfsVO.dfsData.dfsResultBeanListSize>0}" >
          <t:dataTable value="#{vesselBaseVO.dfsVO.dfsData.dfsResultBeanList}"     
                              sortable="false"
                              var="result"
                              id="dfsTable"
                               forceId="true"     
                              rowClasses="AlternateRow1, AlternateRow2"
                              columnClasses="TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnText, TableColumnNumber, TableColumnNumber, TableColumnText"
                              headerClass="TableHeader"
                              frame="box"
                              width="100%" 
                              preserveDataModel="false" 
                              rows="10" binding="#{vesselBackingBean.searchResultDataTable}" rendered="true">
               </t:dataTable>
    </f:subview>Although I had block it with renderer attribute ,
    DataTable would not show if resultList size is 0 but
    DATA Table binding method is still called even dataTable is not rendered on page I want to block that binding method calling ...
    How can I do that !!!!

  • How can clients view video file that I upload to my Creative Cloud area?

    How can clients view video files that I upload to my Creative Cloud area?  Is there a special password that they have to use to gain access?
    Thanks for any guidance.
    Dave

    As a video professional, i agree and am VERY disappointed with this policy.  I attended CC presentations at various conventions, film festivals and meetups for a year-and-a-half before I made the leap to CC, and no one EVER mentioned a restriction to transferring video files.
    Whether it's to save storage space or not, that's how it APPEARS to the end user.  Anybody who knows ANYthing about how video pirates commit their crime (which it most-certainly is), knows that there are plenty of FREE, untraceable (or nearly-anonymous) resources to carry it out.  The need for anyone to pay $30 or more per-month to do it with an acct that has their info attached to it is ludicrous!  If anything it's CONTRIBUTING to piracy to encourage creatives to transfer their material to collaborative parties using a less-secure, more heavily-trafficked third-party service than the one they're paying for exclusive use for.
    Adobe's policy makers need to review this restriction and remove it or provide ANOTHER reason why it exists because this one doesn't fly.  And if it continues, make sure a disclaimer gets inserted in CC pitch presentations because likely half of the attendees are working with video.

  • How can client change link to external file in in-browser editing

    Hi, I made a website for a client. It has links to pdf files. Obviously they can change the text, but how can they change the link to another pdf file. Thank you.

    Sorry, this is not supported currently. Please vote for this idea: http://forums.adobe.com/message/5552091#5552091
    This helps the product team prioritize.
    Thanks,
    Abhishek

  • How to 'client-side include for secondary menu on page'

    Hi there.
    The following page refers:
    test page for early
    draft
    The linked page is in fact a DW CS3 tmp preview file, for
    that reason the CSS has been pulled into the html file by DW, it
    won't look that way in the eventual page file.
    After lengthy battles with the Spry Horizontal menu, I
    eventually resorted to Pop Menu Magic 2 (PPM2) to generate menus.
    I'm very happy with the product (I'm not looking for PPM2 support,
    but rather support pertaining to CSS-driven menu's in general
    relating to caching). I started out with a single main navigation
    menu, which was very comprehensive - but also very big (ito file
    size). I was hoping to cache a part of the menu on the client-side
    to reduce download times once the site visitor has downloaded the
    first page in the site (where he enters the site is not
    applicable). But that proved impossible (I think...).
    I then followed some advice to break up my main navigation
    menu, keep only the more important stuff in there and rather
    distribute the lower levels of the main menu into their own
    dedicated menus. From there the page linked above.
    The main menu at the top is fine, no problem there. On the
    left below the masthead I've created two menus, one above the other
    (it displays as a single menu but the first menu ends above the
    "Other tour lists" item). The first of these two menus contains the
    bulk of the heavy navigation elements (±160kb of the total
    page file size of 220kb). The div info that applies to this menu =
    <div id="p7PMM_2" class="p7PMMv06">. I'd love to cache this
    menu, either in full or the bulk thereof, on the client-side. That
    is implement a client-side include. When a visitor first enters our
    site the include file with the 160kb (secondary) menu gets
    downloaded together with CSS stylesheets, etc. When the visitor
    links through to a following page in our site, his machine
    (client-side) dishes up the menu to that next page without having
    to download it from our hosting server a second time.
    Is this possible and how? Any and all suggestions will be
    appreciated!
    Our clients are mostly wealthy and thus probably (virtually)
    all have high-speed broadband connections. I seriously doubt that
    any of them are running dial-up connections. Thus this issue is not
    going to sink our site. But I'd love to cut page file size if
    possible.
    Furthermore, I'm not too worried about the small portion of
    visitors that may have their javascript disabled in their browsers.
    The main navigation menu at the top of the page will still allow
    them to navigate the site. Much the same goes for SEO.
    I've tried one or two CSI javascripts and succeeded in
    actually getting the relevant tags and contents inserted in the
    html document, but the javascript would then 'break'. That is all
    the coding and menu contents would be there, but the javascript
    won't function (menu's won't pop / fly-out). I'm a little clueless
    when it comes to Javascript, and many other things :-), but I
    suspect that the Javascript in the include file does not get
    called. If the Javascript is kept in the html file, the menu
    content (elements) in the include file arrives in the html file
    after the relevant script has been called and doesn't get
    rendered??
    Once again any help / suggestions will be appreciated!

    > But that proved impossible (I
    > think...).
    Even without doing anything on your part, the images, the
    CSS, and the
    javascript is already cached client-side. You cannot cache
    any of the
    structural code client-side.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "afrilux" <[email protected]> wrote in
    message
    news:[email protected]...
    > Hi there.
    >
    > The following page refers:
    http://www.afrilux.co.za/test/1/dev2.htm
    >
    > The linked page is in fact a DW CS3 tmp preview file,
    for that reason the
    > CSS
    > has been pulled into the html file by DW, it won't look
    that way in the
    > eventual page file.
    >
    > After lengthy battles with the Spry Horizontal menu, I
    eventually resorted
    > to
    > Pop Menu Magic 2 (PPM2) to generate menus. I'm very
    happy with the product
    > (I'm
    > not looking for PPM2 support, but rather support
    pertaining to CSS-driven
    > menu's in general relating to caching). I started out
    with a single main
    > navigation menu, which was very comprehensive - but also
    very big (ito
    > file
    > size). I was hoping to cache a part of the menu on the
    client-side to
    > reduce
    > download times once the site visitor has downloaded the
    first page in the
    > site
    > (where he enters the site is not applicable). But that
    proved impossible
    > (I
    > think...).
    >
    > I then followed some advice to break up my main
    navigation menu, keep only
    > the
    > more important stuff in there and rather distribute the
    lower levels of
    > the
    > main menu into their own dedicated menus. From there the
    page linked
    > above.
    >
    > The main menu at the top is fine, no problem there. On
    the left below the
    > masthead I've created two menus, one above the other (it
    displays as a
    > single
    > menu but the first menu ends above the "Other tour
    lists" item). The first
    > of
    > these two menus contains the bulk of the heavy
    navigation elements (?160kb
    > of
    > the total page file size of 220kb). The div info that
    applies to this menu
    > =
    > <div id="p7PMM_2" class="p7PMMv06">. I'd love to
    cache this menu, either
    > in
    > full or the bulk thereof, on the client-side. That is
    implement a
    > client-side
    > include. When a visitor first enters our site the
    include file with the
    > 160kb
    > (secondary) menu gets downloaded together with CSS
    stylesheets, etc. When
    > the
    > visitor links through to a following page in our site,
    his machine
    > (client-side) dishes up the menu to that next page
    without having to
    > download
    > it from our hosting server a second time.
    >
    > Is this possible and how? Any and all suggestions will
    be appreciated!
    >
    > Our clients are mostly wealthy and thus probably
    (virtually) all have
    > high-speed broadband connections. I seriously doubt that
    any of them are
    > running dial-up connections. Thus this issue is not
    going to sink our
    > site. But
    > I'd love to cut page file size if possible.
    >
    > Furthermore, I'm not too worried about the small portion
    of visitors that
    > may
    > have their javascript disabled in their browsers. The
    main navigation menu
    > at
    > the top of the page will still allow them to navigate
    the site. Much the
    > same
    > goes for SEO.
    >
    > I've tried one or two CSI javascripts and succeeded in
    actually getting
    > the
    > relevant tags and contents inserted in the html
    document, but the
    > javascript
    > would then 'break'. That is all the coding and menu
    contents would be
    > there,
    > but the javascript won't function (menu's won't pop /
    fly-out). I'm a
    > little
    > clueless when it comes to Javascript, and many other
    things :-), but I
    > suspect
    > that the Javascript in the include file does not get
    called. If the
    > Javascript
    > is kept in the html file, the menu content (elements) in
    the include file
    > arrives in the html file after the relevant script has
    been called and
    > doesn't
    > get rendered??
    >
    > Once again any help / suggestions will be appreciated!
    >
    >

  • How can I modify the default jsf template

    Hello everyone,I don't like the default jsf template in jdev.I want to change it to this:
    <%@ page language="java" pageEncoding="GB18030"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces" prefix="af" %>
    <%@ taglib uri="http://xmlns.oracle.com/adf/faces/html" prefix="afh" %>
    <f:view>
    <afh:html>
    <afh:head>
    </afh:head>
    <afh:body>
         <af:form>
         </af:form>
    </afh:body>
    </afh:html>
    </f:view>
    how can i do this?In eclipse,I can modify a file to do this.

    Refer
    http://technology.amis.nl/blog/?p=1405

  • How can Client get a ejb remoteinterface class through ejbhomeinterface?

    HI,I've got ejbhomeinterface class(ejbhomeinterface class is on my local machine),How can i get ejb remoteinterface class(it is on remote app server) ? I've tried
    getEJBMetaData() method, but throw class not found exception,pls help me,thank you very much!!
    Object ejbObj = null;
    Class remoteClass = null;
    EJBHome aHome = null;
    try{
    aHome = (EJBHome) javax.rmi.PortableRemoteObject.narrow(aHome, EJBHome.class);
    EJBMetaData metaData = aHome.getEJBMetaData();
    // Class homeClass = metaData.getHomeInterfaceClass();
    aHome = metaData.getEJBHome();
    remoteClass = metaData.getRemoteInterfaceClass();
    //following code i want use remoteClass invoke remote ejb mothod
    }catch(Exception e)

    may be you need create InitialContext first, than from InitialContext lookup Home interface. And than using home.create() get RemoteInterface and use it.

  • How can client determine cause of RemoteException

    My BMP entity bean includes an SQL statement to UPDATE a database row (this UPDATE is in the ejbStore method).
    The UPDATE statement includes the following syntax
    UDPATE ....
    SET ....,
    no_of_changes = :no_of_changes + 1
    WHERE ....
    AND no_of_changes = :no_of_changes
    This ensures the UPDATE only proceeds if no other user has updated the row between my ejbLoad and ejbStore.
    If the update fails, becuase another user has updated the row, I throw an exception DatabaseBusyException, which extends RemoteException.
    My problem is that my client only sees a RemoteException, and I am therefore unable to be sure what message to give to the client. Ideally I would be able to tell it was a DatabaseBusyException and would inform the user that the 'Database is busy. Please retry later'.
    Any suggestions?

    Hmm, not sure on this. If the session bean is using remote access (PortableRemoteObject.narrow), then yes, all exceptions to the client are wrapped in Remote. But you should be able to get the exception message straight from remote - I'm not sure about the originating exception type, e.g. MyException.
    I must admit I've been focusing more server side so far, and the limited client side stuff I've done seems to indicate that remote simply passses the exception message. I don't think remote is being wrapped twice as you suggest, also not sure why you feel you need to trundle through the exceptions to the original message. I'm getting exceptions thrown from the SQL level in the EJB right up to the client (through several other session bean layers), and the original exception details are being preserved in the message body. EMail if you want to discuss further off-line.
    Rgds, LB

  • How Can I Side Scroll in Folder Pane

    I have recently started using Lightroom again (has 2 then upgraded to 5 in the past year) one thing I've noticed is that there's no side scrolling in the Folders pane. Because of that I can't read the folder names.
    I know if I move my photos to a higher level directory that would fix it but it's not like my photos are in an unusual place. The path structure I use is:
    Mac HD : /Users/Terriann/Photos/2014/12-17 - Folder of images/
    I could of sworn the last time I seriously used Lightroom (years ago and on a PC, now I'm on a Mac) I could side scroll that panel so I could read the folder names.

    Although I agree that a "scroller" on the folder panel would be useful, Lightroom is designed to use a keywords, metadata and filters workflow for selectings photos instead of a folder based workflow and once you start using it that way you will not have to "drill" down through folders looking for files.
    For instance, to select dates for any given day or month you can use the filter bar
    or you can click on the little arrow next to the date in the metadata on a photo and it will filter for all the photos on that date.
    It is a different concept to folders but once you set it up it is very powerful.

  • ADF: how can client pick up photos from cache instead of calling servlet

    I have a jspx whose page definition has a viewobject exposing photo ids. I want to display those photos using af:panelForm. The panelForm has navigation buttons, first, previous, next and last. In the panelForm, i use af:objectImage component whose source attribute gets its value from an image rendering servlet to whom we pass viewobject's ImageId bound attribute. Given the passed in ImageId, servlet would then fetch the photo blob from database and streams it back to requesting client.
    As I press navigation buttons to view photos, I notice photos are being cached in the client browser. However, if I keep navigating between same previously viewed photos, I was expecting the cached photos to be picked from browser cache instead of calling the servlet over and over to display the same previously viewed photos. However, cached photos dont seem to be taken advantage of and they are not picked and the servlet is always getting called. I want to not have the servlet called for previously viewed photos and instead cached photos to be used so images can be displayed faster and faster otherwise servlet will always go to database and fetch same blobs and render them which is expensive.
    After lots of investigation, it seems that pressing any of the navigation buttons results in a submit of the form and on submit of the form, cached photos don't get picked. what should i do with those buttons so they don't perform submit and so that cached photos get picked without bothering the servlet ?
    Please help.
    <af:panelForm>
    <af:panelHorizontal halign="center">
         <af:objectImage
         source="ImageRenderingServlet?imgId=#{bindings.ImageId.inputValue}"/>
    </af:panelHorizontal>
    <af:panelHorizontal halign="center">
    <af:panelButtonBar>
         <af:commandButton
         text="first"
         actionListener="#{bindings.First.execute}"
         disabled="#{!bindings.First.enabled}"/>
         <af:commandButton
         text="previous"
         actionListener="#{bindings.Previous.execute}"
         disabled="#{!bindings.Previous.enabled}"/>
         <af:commandButton
         text="next"
         actionListener="#{bindings.Next.execute}"
         disabled="#{!bindings.Next.enabled}"/>
         <af:commandButton
         text="last"
         actionListener="#{bindings.Last.execute}"
         disabled="#{!bindings.Last.enabled}"/>
    </af:panelButtonBar>
    </af:panelHorizontal>
    </af:panelForm>
    Message was edited by:
    samsam
    Message was edited by:
    samsam
    Message was edited by:
    samsam

    Hi,
    there is no API available to read from the browser cache. The way the browser cache works is that it retrieves the content itself if a image is referenced by a known URL. If the servlet streams an image then cache usage is not an option at all. If the servlet returns an image URL to a static image then it should do
    Frank

  • How can I avoid running out of memory when creating components dynamically

    Hello everyone,
    Recently, I am planning to design a web application. It will be used by all middle school teachers in a region to make examination papers and it must contain the following main functions.
    1)Generate test questions dynamically. For instance, a teacher who logs on the web application will only see a select one menu and a Next Quiz button. The former is used for determining the number of options for the current multiple/single choice question. The later is dedicated to creating appropriate input text elements according to the selected option number. That is to say, if the teacher selects 4 in the menu and presses the Next Quiz button, 5 input text form elements will appear. The first one is for the question to be asked such as "1.What is the biggest planet in the solar system?", the others are optional answers like a)Uranus. b) Saturn. c)Jupiter. d)Earch. Each answer stands for an input text elements. When the teacher fills in the fourth answer, another select one menu and Next Quiz button will emerge on the fly just under this answer, allowing the teacher to make the second question. The same thing repeats for the following questions.
    2)Undo and Redo. Whenever a teacher wants to roll back or redo what he has done, just press the Undo or[i] Redo button. In the previous example, if the teacher selects the third answer and presses the Delete button to drop this answer, it will delete both the literal string content[i] and the input text element, changing the answer d to c automatically. After that, he decides to get back the original answer c, Jupiter, he can just click the Undo button as if he hadn�ft made the deleting operation.
    3)Save the unfinished working in the client side. If a teacher has done half of his work, he can choose to press the Save button to store what he has done in his computer. The reason for doing so is simply to alleviate the burden of the server. Although all finished test papers must be saved in a database on the server, sometimes the unfinished papers could be dropped forever or could form the ultimate testing papers after several months. So if these papers keep in the server, it will waste the server computer�fs room. Next time the teacher can press the Restore button on the page to get the previously stored part of the test paper from his own computer and continue to finish the whole paper.
    4)Allow at least 1,000 teachers to make test papers at the same time. The maximum question number per examination paper is 60.
    Here are my two rough solutions,
    A.Using JSF.
    B.Using JavaScript and plain JSP[b] without JSF.
    The comparison of the two solutions:
    1)Both schemas can implement the first and the second requirements. In JSF page I could add a standard panelGird tag and use its binding attribute. In the backing bean, the method specified by the binding attribute is responsible for generating HtmlInput objects and adding them to the HtmlPanelGird object on the fly. Every HtmlInput object is corresponding to a question subject or an optional answer. The method is called by an actionListener, which is registered in the Next Quiz commandButton, triggering by the clicking on this button in the client side. Using JSF can also be prone to managing the HtmlInput objects, e.g. panelGird.getChildren().add(HtmlInput) and panelGird.getChildren().remove(HtmlInput) respond to the undoing operation of deleting an optional answer and the redoing operation of the deleting action respectively. I know JavaScript can also achieve these goals. It could be more complex since I don�ft know well about JavaScript.
    2)I can not find a way to meet the third demand right now. I am eager to know your suggestion.
    3)Using JSF, I think, can�ft allow 1,000 teachers to do their own papers at the same time. Because in this scenario, suppose each questionnaire having 60 questions and 4 answers per question, there will be approximately 300,000 HtmlInput objects (1,000X60X(4+1)) creating on the server side. The server must run out of memory undoubtedly. To make things better, we can use a custom component which can be rendered as a whole question including its all optional answers. That is to say, a new custom component on the server side stands for a whole question on the client side. Even so, about 60,000(1,000X60) this type of custom components will be created progressively and dynamically, plus other UISelectOne and UICommand objects, it also can�ft afford for most servers. Do I have to use JavaScript to avoid occupying the server's memory in this way? If so, I have to go back and use JavaScript and plain JSP without JSF.
    Thank you in advance!
    Best Regards, Ailsa
    2007/5/4

    Thank you for your quick response, BalusC. I really appreciate your answer.
    Yes, you are right. If I manually code the same amount of those components in the JSF pages instead of generating them dynamically, the server will still run out of memory. That is to say, JSF pages might not accommodate a great deal of concurrent visiting. If I upgrade the server to just allow 1,000 teachers making their own test papers at the same time, but when over 2,000 students take the same questionnaire simultaneously, the server will need another upgrading. So I have to do what you have told me, using JS+DOM instead of upgrading the server endlessly.
    Best Regards, Ailsa

  • How do I conditionally validate an element?

    Hi,
    I'm using MyFaces 1.1.6. I want to validate that a field is non-empty only if a particular checkbox is checked. How can I do this in JSF?
    Thanks for any thoughts, - Dave

    Here is a sample of an enumeration type definition.
         <xs:simpleType name="verbChoice">
              <xs:restriction base="xs:string">
                   <xs:enumeration value="Adjust"/>
                   <xs:enumeration value="Align"/>
                   <xs:enumeration value="Test"/>
              </xs:restriction>
         </xs:simpleType>

  • How can i use one datatable inside the other?

    Hi all,
    i need help ... i have this page that shows information from a relational table... for example a mapped table "Countries" that has a java.util.Set inside named "Cities" and i would like 2 know how can i do this using jsf...
    The display would be like this:
    Brasil
    Rio de Janeiro
    Sao Paulo
    USA
    New York
    Washington
    New Orleans
    And Goes on... So i guess it would be a dataTable inside the other, right? but i dunno how to do it...
    Thanks for any info. cya

    this is somehow a messy example. But just focus on the var attribute of outer datatable and how value attribute of inner datatable is referencing it.
    <h:dataTable id="table1" value="#{pc_City_state.listofstates.states}" var="varstates" styleClass="dataTable">
                   <h:column id="column1">
                        <f:facet name="header">
                             <h:outputText styleClass="outputText" value="StateName" id="text2"></h:outputText>
                        </f:facet>
                        <h:outputText id="text3" value="#{varstates.stateName}" styleClass="outputText">
                        </h:outputText>
                   </h:column>
                   <h:column id="column3">
    <f:facet name="header">
    </f:facet>
              <h:dataTable id="table2" value="#{varstates.cities}" var="varcities" styleClass="dataTable">
                                       <f:facet name="footer">
                                       </f:facet>
                                       <h:column id="column4">
              <f:facet name="header">
              <h:outputText styleClass="outputText" value="CityName" id="text6"></h:outputText>
              </f:facet>
              <h:outputText id="text7" value="#{varcities.cityName}" styleClass="outputText">
              </h:outputText></h:column>
              </h:dataTable>
    </h:column>
    </h:dataTable>

  • How to populate form data in jsf

    Hi
    I have 2 questions about how to do things in jsf, i have been working with struts and so will give example of what i would do in struts
    I have a jsf page for login, when i authenticate the next screen is a table with bunch of data,
    Where do i populate this table data and pass it along to jsp page, in struts i would define a Bean and save this bean in request and pass it to jsp page,
    I want to be able to go to home page from any page in my application, in struts i would just define HomeAction class and then add a home button on any page, and when this button is clicked, this would call this HomeAction will be get data to be displayed on homepage and build a bean and forward request to homepage.jsp,
    how can do i this in jsf,

    kulkarni_ash wrote:
    I have a jsf page for login, when i authenticate the next screen is a table with bunch of data,
    Where do i populate this table data and pass it along to jsp page, in struts i would define a Bean and save this bean in request and pass it to jsp page,You also need to define a bean, but you just use faces-config.xml to let JSF create and save it in request. As your question concerns the datatable, you may find this article useful to start with: [http://balusc.blogspot.com/2006/06/using-datatables.html].
    I want to be able to go to home page from any page in my application, in struts i would just define HomeAction class and then add a home button on any page, and when this button is clicked, this would call this HomeAction will be get data to be displayed on homepage and build a bean and forward request to homepage.jsp,In JSF you can use navigation cases for this. Just have something like<h:commandButton action="home" value="home" />in your JSP page and the following in the faces-config:
    <navigation-case>
        <from-outcome>home</from-outcome>
        <to-view-id>home.jsf</to-view-id>
    </navigation-case>

Maybe you are looking for