Retrieve client side changes using componet binding

I have a selectBooleanCheckbox in my jsp bound to a HtmlSelectBooleanCheckbox.
On client side I have a js function that enable/disable the checkbox, I would like to know if is possible to get the client (changed) value by the component reference in my backbean.
How can I set the client "disable" attribute value in the server component on submit?

Not possible. That isn't been sent to the server as a request parameter. Best what you can do is to pass it along as a hidden input parameter, or to live with a cycle to the server on click.

Similar Messages

  • Client-side Conversion using  NumberConverter and DateConverter

    Hi,
    In our application we have a custom input text component and we are using the same component to capture date, number, currency and string values .As we are using the same component to capture date/number/string values I can't add number/date converter to it.
    At run time I have to read the user entered values and need to convert them into date/ number /currency values. I am planning to use Client-side Converters to format the values.
    Please let me know how make use of NumberConverter and DateConverter in java script to convert the values at client side.
    Regards,
    Kiran

    Hi Gabrie,
    Thanks for your response.
    ADF is providing NumberConverter / DateConverter to convert date/number/currency values. Instead of writing my own custom converters can I use the framework provided converters to convert the values at client side?

  • How to make client side validations using NWDS

    Hi Frndz..
                   Am creating UIs using NWDS ,i made tthe validations @ servr side n i have 2 made this validations @ clinet side ,but am not aware how it is????
    can anyone help me in this regard.
    THANKS & REGARDS
    Rajesh Kumar

    chk it
    /people/martin.kellermann2/blog/2006/12/17/client-side-input-validation-with-htmlb--the-basics
    http://help.sap.com/saphelp_nw04/helpdata/en/43/067941a51a1a09e10000000a155106/frameset.htm
    /people/kirupanand.venkatapathi2/blog/2005/12/18/client-side-validation-in-dynpage
    http://help.sap.com/saphelp_nw04s/helpdata/en/8e/e3a942ad920c31e10000000a1550b0/frameset.htm
    /thread/86123 [original link is broken]
    https://media.sdn.sap.com/html/submitted_docs/dotnet/Programming%20with%20PDK%20for%20.NET/SAP%20NetWeaver%20.NET%20Controls/Event%20Handling/Client%20Side%20Event%20Handling.htm

  • How to open pdfs directly in acrobat reader client side without using browser

    When I sent a request to the pdf through servlet
    the requested pdf is coming in a browser , but I want it to open in acrobat reader only . Is it possible ?

    Hi,
    Yes you can open in acroread. I am not sure about syntax. Cheak it in API's of java.lang.
    It is somehow like this.
    System.exec("<location of acroread>",<pdf file name>);
    Check if it helps.
    Thanks
    Parsu
    iAS dev support team

  • Client-side handler: static config?

    I would like to provide a client-side JAX-RPC handler that would
    be invoked without any modification to existing client code.
    The idea is that user's would only need to modify a config file
    (something like the web-services.xml file, but on the client-
    side) to use our handler.
    We are already doing this in axis (uses a client-side deployment
    descriptor: client_deploy.wsdd), but based on another thread
    ("Client Handler Chain - help ??"), it looks like there is
    currently no equivalent in WLS?
    Are there plans to add the ability to statically configure
    client-side handlers in WLS via some sort of client-side config
    file/descriptor, or is the programmatic method of modifying
    the HandlerRegistry in the client code the only way?
    Any help/ideas would be greatly appreciated!
    --Terry

    In 7.0, you can do this in a handler:
    import weblogic.webservice.binding.soap.HttpClientBinding;
    String url = http://my/new/address/;
    sslAdapter = null; //only needed for ssl
    Binding binding = new HttpClientBinding( url, sslAdapter );
    context.setProperty( WLMessageContext.BINDING_PROP,
    binding );
    HTHs
    -manoj
    http://manojc.com
    "William Cassidy" <[email protected]> wrote in message
    news:[email protected]...
    >
    Is there a similar way to set the endPointAddress.
    "manoj cheenath" <[email protected]> wrote:
    Ok, I will add this as a feature request.
    If you are ok with using WLS internal APIs (This APIs may change in
    the future), try this:
    weblogic.webservice.Operation operation
    =
    ((weblogic.webservice.WLMessageContext)messageContext).getOperation();
    >>
    weblogic.webservice.Port port = operation.getPort();
    String endPointAddress = port.getAddress();
    regards,
    -manoj
    "Terry Martin" <[email protected]> wrote in message
    news:[email protected]...
    Manoj, thanks for the response.
    We'd definitely like to see a client side dd at some point, but
    can work with the API's for now. Thanks much for adding this as
    a feature request.
    On another subject:
    I need to determine the target/endpoint URL from my client-side
    request handler. Again, this was something we were able to do in
    axis, but is currently not part of the JAX-RPC standard (JSR101).
    I could be missing something, but haven't seen any way of
    determining the target URL given only the SOAPMessageContext.
    The only way seems to be if it were passed as a "standard"
    property in the SOAPMessageContext (this is one way it is done
    in axis).
    I imagine this will someday be standardized in JAX-RPC (I can
    think of many uses for this feature, other than our own). In the
    meantime, could you also add this as a feature request for WLS?
    Thanks again,
    -Terry
    "manoj cheenath" <[email protected]> wrote:
    True. In WLS 7.0 there are no client side dd in which you can specify
    the handler chain. We did not comeup with ourown client side dd,
    hopeing that JSR109 will define the dd.
    It is quite easy to register the handlers through APIs. Let us know
    if
    that will not help you.
    I will add client side dd as a feature requst for the next release.
    regards,
    -manoj
    "Terry Martin" <[email protected]> wrote in message
    news:[email protected]...
    I would like to provide a client-side JAX-RPC handler that would
    be invoked without any modification to existing client code.
    The idea is that user's would only need to modify a config file
    (something like the web-services.xml file, but on the client-
    side) to use our handler.
    We are already doing this in axis (uses a client-side deployment
    descriptor: client_deploy.wsdd), but based on another thread
    ("Client Handler Chain - help ??"), it looks like there is
    currently no equivalent in WLS?
    Are there plans to add the ability to statically configure
    client-side handlers in WLS via some sort of client-side config
    file/descriptor, or is the programmatic method of modifying
    the HandlerRegistry in the client code the only way?
    Any help/ideas would be greatly appreciated!
    --Terry

  • Client side event for h:outputText... and other JSF component

    Hello friends...
    I need client side (to use Java script ) event for change in <h:outputText /> or <h:inputText...>.
    I want to open a popup window when there is a change in there. I donot want to use onblur() for this. Is there any thing for achiev it.
    Thanks.
    Regard
    Roshan Lal ( I don't know why there is "DOG" display in LIST )
    :-)

    Hi Jacek,
    Unfortunately I think you may be stuck extending Renderer. Another possibility is creating your component via a template, which will be available in JSF 2.0. However, as JSF 2.0 won't be out for a while... you can use JSFTemplating in the meantime:
    http://java.sun.com/developer/technicalArticles/J2EE/jsf_templating/
    http://www.theserverside.com/tt/articles/article.tss?l=JSFTemplateComponent
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • RMI client-side - how to encrypt,decrypt  in client-side

    I write javacard RMI style. My problem is...
    Source code below is work when it write in applet (card - side)
    but in client-side (reader -side) I copy it to client - side code and test to run, if fail --> throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    It seem to be "javacardx.crypto" and "javacard.security" is make for use in applet in card only. Did I misunderstand?
    if it make for use in applet only, how is possible to do like this " card use privatekey to sign message and send to reader , reader use card's publickey to verify that card sign this signature or not."
    or
    "card use reader's publickey to encrypt message and send to reader, then reader use privatekey to decrypt message (reader authencate itself) "
    because I can't do any of cipher , keybuilder in RMI-client side(reader)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    it will throw nullPointerException
    and if (change false to true)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,true);
    throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    after that I swap this line with
    pri_key = (RSAPrivateKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PRIVATE,KeyBuilder.LENGTH_RSA_512, false);
    since it will do this first (i swap the line already) it also throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    also be the same result with swap
    kp = new KeyPair(KeyPair.ALG_RSA,(short)KeyBuilder.LENGTH_RSA_512 );
    to a first line
    it throw exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHM
    Please help me
    RSAPrivateKey pri_key;
    RSAPublicKey pub_key;
    KeyPair kp;
    Cipher RSAcipher;
    RSAcipher = Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    pri_key = (RSAPrivateKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PRIVATE,KeyBuilder.LENGTH_RSA_512, false);
    pub_key =(RSAPublicKey) KeyBuilder.buildKey(KeyBuilder.TYPE_RSA_PUBLIC,KeyBuilder.LENGTH_RSA_512, false);
    kp = new KeyPair(KeyPair.ALG_RSA,(short)KeyBuilder.LENGTH_RSA_512 );
    kp.genKeyPair();
              pri_key = (RSAPrivateKey) kp.getPrivate();
              pub_key = (RSAPublicKey) kp.getPublic();
    //ENCRYPT
    RSAcipher.init(pri_key, Cipher.MODE_ENCRYPT);
    t_cipherLengthRSA = RSAcipher.doFinal(plaintxt,(short)0, (short)plaintxt.length, t_cipherText, (short)0);
    //DECRYPT
    RSAcipher.init(pub_key, Cipher.MODE_DECRYPT);
    RSAcipher.doFinal(ciphertxt,(short)0,(short) t_cipherLengthRSA, temp1, (short)0);

    I write javacard RMI style. My problem is...
    Source code below is work when it write in applet (card - side)
    but in client-side (reader -side) I copy it to client - side code and test to run, if fail --> throw
    exception 0x3 - javacard.security.CryptoException.NO_SUCH_ALGORITHMYou can not share code between card and client. On the card use the classes of javacardx.crypto and on the client side those of javax.crypto and java.security.
    It seem to be "javacardx.crypto" and "javacard.security" is make for use in applet in card only. That is right.
    if it make for use in applet only, how is possible to
    do like this " card use privatekey to sign message
    and send to reader , reader use card's publickey to
    verify that card sign this signature or not." or
    "card use reader's publickey to encrypt message and
    send to reader, then reader use privatekey to decrypt
    message (reader authencate itself) "On each platform you have classes that provide the same cryptographic operations but the interface of these classes is different (because of the limitations of the java card platform).
    because I can't do any of cipher , keybuilder in
    RMI-client side(reader)Use the java.security.KeyFactory instead.
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,false);
    it will throw nullPointerException
    and if (change false to true)
    Cipher.getInstance(Cipher.ALG_RSA_PKCS1,true);
    throw exception 0x3 -
    javacard.security.CryptoException.NO_SUCH_ALGORITHMCryptographic support on java cards is optional. Not every card supports every algorithm. Try to use another algo.
    Jan

  • Clone Rows - Tabular form - Client side add rows

    Hello all,
    I feel in love with this particular Tabular form, http://htmldb.oracle.com/pls/otn/f?p=24317:49 because of the Capabilities it has to create a "clone row".
    a very advance feature I like a lot.
    The trouble is when I go under >Report> and select which columns I would like to view, some will be hidden with default values.
    the default values I would like to keep hidden are: a Time Stamp, and :APP_USER.
    So when the user decides to clone a row the first original row will stay intact with all the information including the hidden values, but as for the cloned rows the hidden values are missing.
    Is there something missing in the javascript that permits this from happening?
    Please Help.
    <script type="text/javascript">
    var g_this;
    function fn_delete(pThis)
    var l_tr=$x_UpTill(pThis,'TR');
    l_tr.parentNode.removeChild(l_tr);
    function fn_CloneRow(pThis){
    g_this=pThis;
    l_tr=$x_UpTill(pThis,'TR');
    l_table=$x_UpTill(l_tr,'TABLE');
    l_tbody=$x_UpTill(l_tr,'TBODY');
    l_clone=l_tr.cloneNode(true);
    html_RowHighlight(l_clone,"D0D0E0");
    l_inputs=l_clone.getElementsByTagName('input');
    for (var j=0;j<l_inputs.length;j++) {
    l_this=l_inputs[j];
    if (l_this.type=="hidden") l_this.value="";
    if (l_this.name=="fcs") l_this.value="zzzz";
    if (l_this.type=="checkbox") l_this.parentNode.removeChild(l_this);
    // Change Clone functionality to Delete
    var l_img=l_clone.getElementsByTagName('img')[0];
    l_img.src="/i/delete.gif";
    if (document.all) l_img.onclick=function(){fn_delete(this)};
    else l_img.setAttribute("onclick","fn_delete(this)");
    l_tbody.insertBefore(l_clone,l_tr.nextSibling?l_tr.nextSibling:l_tr);
    </script>

    I have't looked at the specific clone-row sample code you mentioned in your post, but just wanted to point out that we've introduced client-side add-row functionality in APEX 4.0, so if you're using this code to add new rows on the client-side, then using the built-in functionality might be easier. Of course if you actually want to get a copy of an existing row, that might not be sufficient. As for the MRU process, the way APEX identifies new rows is by looking at the primary key or ROWID column value, which needs to be NULL. APEX also looks at the apex_application.g_fcud array, which holds information for each row on whether to do an create, update or delete. This array was introduced in APEX 4.0, and that's what could potentially be causing your example to fail after the upgrade.
    Regards,
    Marc

  • Tabular form - Client side Clone Row on apex 4.1 not work

    Hi all,
    j have a tabular form page where i have implemented Vika's clone row solution.
    (See http://htmldb.oracle.com/pls/otn/f?p=24317:49)
    Now, after migrating my application from Apex 3.2 to Apex 4.1 this feature not work.
    Clicking the Copy icon copies the row and puts it right below.
    Now, if I change some values in the new row and click Save, the MRU process updates does not insert the row in the database
    Apex 4.1
    rdbms 11.2.0.4
    win xp
    chrome browser
    Any help?
    Thanks in advance.
    lukx
    The "clone row" function is
    </script>
         <style type="text/css">
         img.clone {
         cursor:pointer;
         </style>
         <script type="text/javascript">
         var g_this;
         function fn_delete(pThis)
         var l_tr=$x_UpTill(pThis,'TR');
         l_tr.parentNode.removeChild(l_tr);
         function fn_CloneRow(pThis){
              g_this=pThis;
              l_tr=$x_UpTill(pThis,'TR');
              l_table=$x_UpTill(l_tr,'TABLE');
              l_tbody=$x_UpTill(l_tr,'TBODY');
              l_clone=l_tr.cloneNode(true);
              html_RowHighlight(l_clone,"pink");
              l_inputs=l_clone.getElementsByTagName('input');
              for (var j=0;j<l_inputs.length;j++) {
              l_this=l_inputs[j];
              if (l_this.type=="hidden") l_this.value="";
              if (l_this.name=="fcs") l_this.value="zzzz";
              if (l_this.type=="checkbox") l_this.parentNode.removeChild(l_this);
              // Change Clone functionality to Delete
              var l_img=l_clone.getElementsByTagName('img')[0];
              l_img.src="/i/delete.gif";
              if (document.all) l_img.onclick=function(){fn_delete(this)};
              else l_img.setAttribute("onclick","fn_delete(this)");
              l_tbody.insertBefore(l_clone,l_tr.nextSibling?l_tr.nextSibling:l_tr);
         </script>

    I have't looked at the specific clone-row sample code you mentioned in your post, but just wanted to point out that we've introduced client-side add-row functionality in APEX 4.0, so if you're using this code to add new rows on the client-side, then using the built-in functionality might be easier. Of course if you actually want to get a copy of an existing row, that might not be sufficient. As for the MRU process, the way APEX identifies new rows is by looking at the primary key or ROWID column value, which needs to be NULL. APEX also looks at the apex_application.g_fcud array, which holds information for each row on whether to do an create, update or delete. This array was introduced in APEX 4.0, and that's what could potentially be causing your example to fail after the upgrade.
    Regards,
    Marc

  • Manipulate client side files?

    Hi,
    I would like to manipulate client side files using APEX.
    Is there any functionality available for APEX similar to the functions provided in Oracle Forms 10g WebUtil?
    such as:
    CLIENT_HOST and CLIENT_TEXT_IO
    is there a way of using these functions in APEX?
    more specifically: I want to use CLIENT_TEXT_IO to create a batch file on the client, and CLIENT_HOST to execute the batch file in the cmd line on the client(windows)...
    could anyone suggest a way of doing this in APEX?
    thanks in advance
    Leon
    Message was edited by:
    user572239

    No, Forms over the web uses a Java applet in the browser, thus allowing them to manipulate client-side files. APEX does NOT use an applet (this is a good thing, btw) and thus has no native capability to manipulate client-side files. However, you could write your own Java Applet or ActiveX control (go with Java if you can, it works in all browsers) and embed this in an APEX page.
    Tyler

  • What are the client requirements to use BI OnDemand?

    What are the requirements on the client side for using the bi.ondemand.com site.  I would like to know what RAM amount is neccessary as well as the Operating System version.

    The bi.ondemand.com product is a off premise cloud based computing platform.  Being browser based, the only requirements is that you are using  a browser at a version level higher than IE6.  IE7, IE8, and Firefox are the supported browsers.
    When opening bi.ondemand.com with an unsupported browser  such as Opera, you may see a dialog box explaining that it is not supported, but you will find that there will not be any problems.  Some browsers just have not been fully tested yet.
    There is no real requirements concerning the amount of ram as long as there is enough to support the running of the browser.

  • How to set executeThreadCount on the client side in WLS 6.0 SP1

    In WLS 5.1, you can set executeThreadCount on client side by using "java -Dweblogic.system.executeThreadCount=30
    clientProgram". What's the counter part in WLS 6.0? The qustion is strictly to
    CLIENT. I know how to configure executeThreadCount on server side. Thanks.
    Jim Zhou.

    In WLS 5.1, you can set executeThreadCount on client side by using "java -Dweblogic.system.executeThreadCount=30
    clientProgram". What's the counter part in WLS 6.0? The qustion is strictly to
    CLIENT. I know how to configure executeThreadCount on server side. Thanks.
    Jim Zhou.

  • Struts 2 Client side validation getting skipped.

    I am doing a simple program using struts 2. Usually in struts2 bean class will be combined with action class unlike in struts 1.2. But for enhancing readability I made a seperate bean class and I reference it in my action class. But after seperating bean from action class Client side validation using xml is not happening. It is getting skipped. But server side validation inside execute() is happening. Will anyone please help me to find a solution to make client side validation run.
    here are the different files.
    1) JSP File - SEmail.jsp
    <%@ taglib prefix="s" uri="/struts-tags"%>
    <html>
    <s:head theme="ajax" />
    <title>SEmail </title>
    <body>
    <center><font color="blue" size="5" face="bold">
    <s:label     value="Secure Email - Non Registered User" /> </font></center>
    <br>
    <font color="red" size="3"> <s:label
         value="Want to contact us?."></s:label>
    </font>
    <center><s:form action="/Semail.action" method="POST"
         validate="true">
         <s:actionerror />
         <s:select label="Topic" name="user.topic" headerKey="-1" required="true"
              list="#{'Plan Coverage':'Plan Coverage','Sales':'Sales','Others':'Others'}">
         </s:select>
         <s:textarea name="user.message" label="Message" rows="4" cols="50"
              required="true" />
         <br>
         <s:label value="Contact Information" />
         <br>
         <table align="center" width="500">
              <tr align="left">
                   <td align="left"><s:select label="Title" name="user.title"
                        headerKey="-1" required="true"
                        list="#{'-- Select One --':'-- Select One --','Mr.':'Mr.','Ms.':'Ms.','Mrs.':'Mrs.'}">
                   </s:select></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="First Name"
                        name="user.firstname" size="20" maxlength="35" required="true" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Family Name"
                        name="user.familyname" size="20" maxlength="35" required="true" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Profession"
                        name="user.profession" size="20" maxlength="20" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Address" name="user.address"
                        size="20" maxlength="100" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="Telephone Number"
                        name="user.telnumber" size="20" maxlength="20" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="P.O. Box" name="user.pobox"
                        size="20" maxlength="8" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="City"
                        name="user.emirate" size="20" maxlength="35" required="true" /></td>
              </tr align="left">
              <tr>
                   <td align="left"><s:textfield label="Region and Country"
                        name="user.country" size="20" maxlength="35" /></td>
              </tr>
              <tr align="left">
                   <td align="left"><s:textfield label="E-mail Address"
                        name="user.email" size="20" maxlength="70" required="true" /></td>
              </tr>
         </table>
         <br>
         <s:file name="user.uploadFile" label="Upload Document" />
         <br>
         <br>
         <s:submit value="Submit" align="center"></s:submit>
    </s:form></center>
    <font color="red" size="3"> <s:label
         value="All fields marked (*) are mandatory."></s:label>
    </body>
    </html>
    2) struts.xml
    <!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">
    <struts>
         <package name="semail" extends="struts-default">
              <action name="Semail" class="semail.NonregUser">
                   <result name="input">/SEmail.jsp</result>
                   <result name="error">/SEmail.jsp</result>
                   <result>/SEmail.jsp</result>
              </action>          
         </package>     
    </struts>
    3) Bean Class - User.java
    package semail;
    public class User {
         private String topic;
         private String message;
         private String title;
         private String firstname;
         private String familyname;
         private String profession;
         private String address;
         private int telnumber;
         private String pobox;
         private String city;
         private String country;
         private String email;
         private String uploadFile;
         private String testing;
         public String getTopic() {
              return topic;
         public void setTopic(String topic) {
              this.topic = topic;
         public String getMessage() {
              return message;
         public void setMessage(String message) {
              this.message = message;
         public String getTitle() {
              return title;
         public void setTitle(String title) {
              this.title = title;
         public String getFirstname() {
              return firstname;
         public void setFirstname(String firstname) {
              this.firstname = firstname;
         public String getFamilyname() {
              return familyname;
         public void setFamilyname(String familyname) {
              this.familyname = familyname;
         public String getProfession() {
              return profession;
         public void setProfession(String profession) {
              this.profession = profession;
         public String getAddress() {
              return address;
         public void setAddress(String address) {
              this.address = address;
         public int getTelnumber() {
              return telnumber;
         public void setTelnumber(int telnumber) {
              this.telnumber = telnumber;
         public String getPobox() {
              return pobox;
         public void setPobox(String pobox) {
              this.pobox = pobox;
         public String getCity() {
              return city;
         public void setCity(String city) {
              this.city= city;
         public String getCountry() {
              return country;
         public void setCountry(String country) {
              this.country = country;
         public String getEmail() {
              return email;
         public void setEmail(String email) {
              this.email = email;
         public String getUploadFile() {
              return uploadFile;
         public void setUploadFile(String uploadFile) {
              this.uploadFile = uploadFile;
         public String getTesting() {
              return testing;
         public void setTesting(String testing) {
              this.testing = testing;
    This is my bean class. Instead of putting it with action class NonregUser.java , I have seperated it out for readability. And I am referencing it in the action class.
    4) Action Class - NonregUser.java
    package semail;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts2.interceptor.ServletRequestAware;
    import org.apache.struts2.interceptor.ServletResponseAware;
    import com.opensymphony.xwork2.ActionSupport;
    public class NonregUser extends ActionSupport implements ServletRequestAware,
              ServletResponseAware {
         private static final long serialVersionUID = 2451855813074437309L;
         HttpServletRequest request = null;
         HttpServletResponse response = null;
         private User user = null;
    /* I am referencing my bean class here instead of writing all the getters and setters here.*/
         public User getUser() {
              return user;
         public void setUser(User user) {
              this.user = user;
         public String execute() throws Exception {
              System.out.println("Validating login");
              if(user!=null){
                   System.out.println(user.getFirstname());
                   System.out.println(user.getEmail());
                   System.out.println(user.getTopic());
                   System.out.println(user.getTitle());
    // this server side validation is happening
                   if (user.getTitle().trim().equals("-- Select One --")) {
                        addActionError("Please select Title");
                        return ERROR;
                   } else {
                        return SUCCESS;
              }else{
                   return SUCCESS;
         public void setServletRequest(HttpServletRequest arg0) {
              System.out
                        .println("HttpServletRequest : " + NonregUser.this.getClass());
              request = arg0;
         public void setServletResponse(HttpServletResponse arg0) {
              System.out.println("HttpServletResponse : "
                        + NonregUser.this.getClass());
              response = arg0;
    This is my acation class. Here I am referencing my bean class User.java.
    5) xml validation file - NonregUser-validation.xml
    /*This client validatin is not working*/
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE validators PUBLIC
              "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
              "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
    <validators>
         <field name="topic">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please select the Topic</message>
              </field-validator>
         </field>
         <field name="message">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Message</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">8000</param>
    <message>Message cannot contain more than 8000 characters</message>
              </field-validator>
         </field>
         <field name="title">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please select the Title</message>
              </field-validator>
         </field>
         <field name="firstname">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter First name</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">35</param>
    <message>First Name cannot contain more than 35 characters</message>
              </field-validator>
         </field>
         <field name="familyname">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Family name</message>
              </field-validator>
              <field-validator type="stringlength">
                   <param name="maxLength">35</param>
    <message>Family Name cannot contain more than 35 characters</message>
              </field-validator>
         </field>
         <field name="emirate">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Emirate/City</message>
              </field-validator>
         </field>
         <field name="email">
              <field-validator type="requiredstring">
                   <param name="trim">true</param>
                   <message>Please enter Email address</message>
              </field-validator>
              <field-validator type="email">               
                   <message>Please enter a valid Email address</message>
              </field-validator>
         </field>
    </validators>
    6) web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app>
         <filter>
         <filter-name>struts2</filter-name>
         <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
         </filter>
         <filter-mapping>
         <filter-name>struts2</filter-name>
         <url-pattern>/*</url-pattern>
         </filter-mapping>
         <welcome-file-list>          
              <welcome-file>/SEmail.jsp</welcome-file>
         </welcome-file-list>     
         <error-page>
    <error-code>404</error-code>
    <location>/pagenotfound.jsp</location>
    </error-page>
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/error.jsp</location>
    </error-page>
    </web-app>
    Edited by: L-J-K on Jul 22, 2008 5:22 AM

    I was trying to do it through creating a new validators.xml where I would redefine all struts built in validations and add de definition for my custom Validation (<validator name="checkUser" class="com.custom.CustomUserValidator"/>). Then I define the ActionClassName-action-validation.xml refering to my custom validator (checkUser). The com.custom.CustomUserValidator Class has to extend FieldValidatorSupport or ValidatorSupoort (depending on what kind of validation).
    Ok that's it, this is the theory, now the custom validator (checkUser) is executed before my action but I don't know how to do it so that if the validation fails i return to the same page showing the error message to the user without having to execute the target action. Does anyone know how to do this????

  • Disable or restrict System.out.println() statements on client side

    Hi All,
    This might be a stupid question, but i am still going ahead and asking the question.
    Is there a way to disable or restrict System.out.println() statements in applet code from executing on the client side by using settings in proxy server or firewall or other security settings.
    Thanks
    Nag

    Hi All,
    This might be a stupid question, but i am still going
    ahead and asking the question.
    Is there a way to disable or restrict
    System.out.println() statements in applet code from
    executing on the client side by using settings in
    proxy server or firewall or other security settings.
    System.out.println() calls are executed on the client machine, and thus do not pass through any firewalls or proxies. If the applet is signed, you can redirect the System.out, by System.setOut(...).

  • Client-side validation

    Hello,
    I am trying to do client-side validation using the JSF.
    I would like to know if it is possible, if JSF furnishes some help to do it...
    If someone have some examples, it would be a great help.
    Thanks,
    Marie.

    Thank you very much for the link.
    I read the document but it did not completely solve my problem. Indeed, all the examples are about a client-side validation at the submit phase. And I am trying to do a client-side validation on the focus lost of each field.
    I know that I can do it by adding the attribute focusLost on the field and by adding the javascript corresponding to the validation of this field. But I would to make this validation automatic, and for that, I suppose that I need to make generate the javascript by a component. This step gives me some problems.
    Is it possible for a UIComponent to generate Javascript code that will be written at the end of the component?
    Thanks for your help
    Marie.

Maybe you are looking for