GWT javascript client side RPC Call

Greetings, I'm currently developing a web application with Google Web
Toolkit. Basically i need to call a RPC from GWT from the client side,
in order to get some kind of data.
I've been currently searching and I've found JSNI which can write
javascript code in the java, but i can't seem to get it work the right
way.
Thank you in advance.

Steve,
Webflow is a server side technology. The only way to affect the invocation of
webflow from the client side is to change the origin and event parameters sent
to the webflow engine. These parameters must be passed via a request. There simply
is no way to interact with the webflow engine without a request/response.
OK, you may be able to hack something together using an Applet, RMI, and by using
internal webflow APIs. But you don't want to do that; that's not really an option.
Is there a way to call javascript methods
from BEA's tag libs? No.
Do I need to write my own tags and make
references to the objects that are used for webflow?I assume you mean that you would create custom JSP tags that would invoke directly
IPs and PCs. This would not accomplish what you want and would defeat the webflow
architecture.
Here is what you can do:
1) you could create your own custom JSP taglib that would insert JavaScript into
the HTML form along with the <input> tag. I don't know how hard this would be.
2) you could forget about using JSP tags, and simply use a JavaScript library.
You would need to code your HTML properly to use this technique. I did a search
on www.google.com and found a good article on exactly how to do this:
http://www.zdnet.com/devhead/stories/articles/0,4413,2326270,00.html
Post back if you have more questions.
PJL
Steve Lewis <[email protected]> wrote:
Okay, webflow is cool and all, but I'd like to be able to do both client-side
and server-side validation. Server-side is taken care of with the InputProcessors,
but there's not a way to do onSubmit or onChange using the proprietary
webflow tags.
Question: How do I do this? Do I need to write my own tags and make
references to the objects that are used for webflow?
I'd really like to be able to encapsulate all this at once.
Maybe I just need to ask this: is there a way to call javascript methods
from BEA's tag libs? Maybe there's a trick I don't know.
Thanks,
Steve Lewis
CTI, Inc.

Similar Messages

  • How to create a Document Set in SharePoint 2013 using JavaScript Client Side Object Model (JSOM)?

    Hi,
    The requirement is to create ""Document Sets in Bulk" using JSOM. I am using the following posts:-
    http://blogs.msdn.com/b/mittals/archive/2013/04/03/how-to-create-a-document-set-in-sharepoint-2013-using-javascript-client-side-object-model-jsom.aspx
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/1904cddb-850c-4425-8205-998bfaad07d7/create-document-set-using-ecma-script
    But, when I am executing the code, I am getting error "Cannot read property 'DocumentSet' of undefined "..Please find
    below my code. I am using Content editor web part and attached my JS file with that :-
    <div>
    <label>Enter the DocumentSet Name <input type="text" id="txtGetDocumentSetName" name="DocumentSetname"/> </label> </br>
    <input type="button" id="btncreate" name="bcreateDocumentSet" value="Create Document Set" onclick="javascript:CreateDocumentSet()"/>
    </div>
    <script type="text/javascript" src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js"> </script>
    <script type="text/javascript">
       SP.SOD.executeFunc('sp.js','SP.ClientContext','SP.DocumentSet','SP.DocumentManagement.js',CreateDocumentSet);
    // This function is called on click of the “Create Document Set” button. 
    var ctx;
    var parentFolder;
    var newDocSetName;
    var docsetContentType;
    function CreateDocumentSet() {
        alert("In ClientContext");
        var ctx = SP.ClientContext.get_current(); 
        newDocSetName = $('#txtGetDocumentSetName').val(); 
        var docSetContentTypeID = "0x0120D520";
        alert("docSetContentTypeID:=" + docSetContentTypeID);
        var web = ctx.get_web(); 
        var list = web.get_lists().getByTitle('Current Documents'); 
        ctx.load(list);
        alert("List Loaded !!");
        parentFolder = list.get_rootFolder(); 
        ctx.load(parentFolder);
        docsetContentType = web.get_contentTypes().getById(docSetContentTypeID); 
        ctx.load(docsetContentType);
        alert("docsetContentType Loaded !!");
        ctx.executeQueryAsync(onRequestSuccess, onRequestFail);
    function onRequestSuccess() {       
        alert("In Success");
        SP.DocumentSet.DocumentSet.create(ctx, parentFolder, newDocSetName, docsetContentType.get_id());
        alert('Document Set creation successful');
    // This function runs if the executeQueryAsync call fails.
    function onRequestFail(sender, args) {
        alert("Document Set creation failed" + + args.get_message());
    Please help !!
    Vipul Jain

    Hello,
    I have already tried your solution, however in that case I get the error - "UncaughtSys.ArgumentNullException: Sys.ArgumentNullException:
    Value cannot be null.Parameter name: context"...
    Also, I tried removing SP.SOD.executeFunc
    from my code, but no success :(
    Kindly suggest !!!
    Vipul Jain

  • Client Side Javascript Validation not Working in Struts 1.x version

    hi,
    I'm following the steps provioded in the below link for Javascript Client side validation but still it is not working.I'm struggling to get this work.
    [http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/|http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/]
    "The framework automatically generates the browser specific JavaScript and validate the data only at the client side."From the above statement i undertstand that framework itself generates the javascript function for validating the field mentioned in validations.xml file so that we dont have to explicitly write a javascript function for
    validating the fields
    (or)
    Do we need to call an explicit function
    Please need help on this.
    I have followed all the steps mentioned on the above link but Client Side Javascript Validation not Working in Struts 1.x version....
    Thanks and Regards,
    Deepak

    Hi,
    Please find my steps below....still getting an error.
    2> which version of commons-validation.jar needs to be downloaded ...Link please
        downloaded the latest commons-validation.jar and placed in lib.refreshed the project,and did a build.
        3> which DTD name to be specified in "validator-rules.xml" which is in accordance to commons-validator.jar file.
    validator-rules.xml ::
    <!DOCTYPE form-validation PUBLIC
              "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
              "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">validation.xml:
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    i did as u said and im gettiong the below errorNov 5, 2009 4:33:08 PM org.apache.struts.validator.ValidatorPlugIn initResources
    SEVERE: Invalid byte 2 of 2-byte UTF-8 sequence.
    org.apache.commons.digester.xmlrules.XmlLoadException: Invalid byte 2 of 2-byte UTF-8 sequence.
         at org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:139)
         at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1610)
         at org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(DigesterLoader.java:89)
         at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:122)
         at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:238)
         at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:181)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1036)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
         at javax.servlet.GenericServlet.init(GenericServlet.java:212)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
         at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
         at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:448)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
    Need help forum members.....
    Please reply to my question 1  which has been asked before as belowDo i need to write explicit javascript function for validation in Struts (or) struts generates the javascript function by itself.??? Please explain with an example....
    Edited by: Deepak_A_L on Nov 5, 2009 4:37 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Password hashing on client side

    Hi. I would like my users to have their passwords hashed in SHA1 at the client side when they login so that when the html form comes to the server, the password is hashed and in case if the form is being eavesdropped on , I do not need to worry about the passwords in plain since it's hashed.
    I am not using SSL because there isn't much things to encrypt or hide secret other than just for the login passwords or users changing their user profile like updating their passwords. And SSL can add quite abit of cost to my client's web hosting budget.
    So simply, is there anyway to hash passwords in client side using JSP before it is sent to the server ?

    Not using jsp no, because JSP stands for Java SERVER Pages. Meaning that java/jsp only runs on the server.
    You can do it in javascript client-side: http://www.movable-type.co.uk/scripts/sha1.html
    But whats the point?
    Now instead of sending what they user typed in, you send the hash of it.
    If anyone is monitoring the line, they can just send the hash of it as well.
    No protection is afforded you by doing this.
    Hashing the password doesn't stop someone stealing it by tapping into the line.
    What is DOES stop is somebody querying your database and saying "give me a list of username/passwords"

  • Client-side caching of Javascript (for Google Web Toolkit *.cache.* files

    Hi all,
    I'm trying out the use of Google Web Toolkit (GWT) for AJAX code development, leveraging RPC calling back-end Web Services for a document browser prototype.  When the JavaScript code is generated by GWT, it has the ability to automatically distinguish between cacheable and non-cacheable content via file extensions (.cache. and .nocache.).
    Now when running in a Tomcat environment with appropriate caching settings; the application runs extremely fast even on really poor latency sites (>500ms round trip); however on a NetWeaver stack, I can't find any information on how to set an attribute on .cache. files to set an expiry of 1 year.
    Anyone know how to do this on a NetWeaver J2EE stack?
    Thanks,
    Matt
    PS. For reference, GWT is a very cool open source project worth watching in the Enterprise space for targeted high-usability, high performance apps.  Just the image bundles concept themselves are an awesome approach to minimizing impact of small images on performance.

    Hi again,
    I thought I should post the solution I came up with in case people search on GWT in the future.  In terms of caching, the Portal does a good job of making nearly everything that GWT produces to be cached at the client; and for the life of me, I couldn't get nocache files not cached at the client side. 
    So thanks to my friendly local SAP experts in the portal space; I discovered there's not much you can do to get this working except try use standard browser tags like the following to prevent caching on the browser:
    Note - Can't seem to save this post in SDN with Meta tags that I'm trying to display so check out http://www.willmaster.com/library/tutorials/preventing_content_cache.php for more info...
    Unfortunately, the way that GWT creates the nocache files, it is not possible to modify the .js files to do this so I needed an alternative approach.
    Then I thought, well, the html file that includes the JS file is cached, but it's not very big, so how about I just write a script to modify the html file when I deploy to production to point to the nocache file with a date suffix.
    Let me explain in more detail:
    1. The original html file that includes the nocache.js file gets modified to point to nocache.<date>.js.
    2. The original nocache.js file gets changed to nocache.<date>.js
    3. Now produce an external bat file to do this automatically for you before deployment which DevStudio can call as part of an Ant script or similar.
    That's it.  So when you are developing, you can manually delete your cache, but just before you go to production, you do this conversion, and you will never have an issue with clients having the wrong version of javascript files. 
    Note - GWT takes care of caching of most of the files by using a GUID equivalenet each time you compile, so it's just a couple of files that really need to not be cached.
    Anyway, I'm not explaining this solution very well, but drop us a line if you need to understand this approach further.
    And lastly, my feedback about GWT - It Rocks!  Everyone loves the result, it's easy to build and maintain, it offers a great user experience, and it's fast.  Not a replacement for transactional apps; but for the occasional user - go for it.
    Matt
    Edited by: Matt Harding on May 22, 2008 7:48 AM

  • Looking for a client side JAXP-RPC HandlerChain example

    I would like to add a handler to the client side of a RPC call using 7.0.1. I
    can’t find any examples to follow for this logic in WebLogic or at Sun’s site.
    Does anyone know of some sample code I can browse to?
    I believe I want to add some files as attachments to a RPC call. To add them
    to the message, it looks like I should add them as an attachment in the handler.
    I see how this is done in the handler. However, I can’t find any useful documentation
    on setting the HandlerChain. I attempted this by following the Javadocs (HandlerRegistry,
    QName, HandlerInfo), but I must have left something out.
    Any suggestions for examples to follow?
    Thanks,
    Dave

    An example attached:
    regards,
    -manoj
    "Dave Lyons" <[email protected]> wrote in message
    news:3d9b508f$[email protected]..
    >
    >
    I would like to add a handler to the client side of a RPC call using7.0.1. I
    can't find any examples to follow for this logic in WebLogic or at Sun'ssite.
    Does anyone know of some sample code I can browse to?
    I believe I want to add some files as attachments to a RPC call. To addthem
    to the message, it looks like I should add them as an attachment in thehandler.
    I see how this is done in the handler. However, I can't find any usefuldocumentation
    on setting the HandlerChain. I attempted this by following the Javadocs(HandlerRegistry,
    QName, HandlerInfo), but I must have left something out.
    Any suggestions for examples to follow?
    Thanks,
    Dave
    [filetransfer.jar]

  • Deploying JAX-RPC Client for client-side application

    I have a java Swing client side application that I am attempting to integrate web services capabilities into. The web services were already written (new to web services myself), I am just calling them. Using Oracle's JDeveloper I managed to create proxies for the web services and to call them just fine, once I added the JAX-RPC Client library to my project.
    My only issue is how to deploy. Again within the development environment all works perfectly. I tried references to all the jar files identified by the Oracle JAX-RPC Client library to know luck. I've referenced other jar files I use for deployment with no issues.
    Anyone created standalone applciations before that call web services? How did you deploy the web service related libraries.
    I'm using JDeveloper 10.1.3.3.0 with Java 1.5.0_06.
    I appreciate any guidance provided.

    I found a solution, but it shouldn't have been that difficult. JDeveloper provides a view of what JARs are part of a library. I used that as a starting point of what JARs might be required for my instance. I switched to linking to the individual JARs within their JDeveloper installed locations directly instead of the single library. I then systematically starting removing them one-by-one from my list to determine which were actually being used in my implementation. I did this because there were way too many to deploy. Once that was done I created a separate directory for holding the required JARs files local to my application.
    Lastly, I had to take care of any internal references within the JARs that may link to other JAR files. So I opened each JAR and looked at its manifest and copied those files over. Then I repeated the steps of deternmining if they were really necessary and copying over other internal references until I had the complete list.
    In the end I ended up with a considerable smaller list of JARs then if I had just assumed all JARs within the library and their references. However, it was much more difficult then it needed to be.

  • SharePoint 2013 Client Side Object Model Javascript

    Hi,
    I am using Javascript Client Object Model in SharePoint 2013. What i am trying to do is:
    retrieve items from a particular list which exist on an another site collection. However, the Items that I want to retrieve will be based on particular value in the current site's list where I am writing the script.
    So for eg: I have a sharePoint list called "project status" in site A with project name (hyperlink URL field)  and project status as Managed metadata fields as two fields.
    I have site B where I have  "projects" list with Project name as the URL field. what I want to do is compare the project URL name in Projects list in site B to the Project name  URL in Project status list in Site A and retrieve the status
    so I can do a dashboard in site B using the same status in Site A

    Hi Cooltechie1234,
    You can filter the list item using CAML Query firstly and then set the managed metadata field label using JavaScript Client Object Model.
    If you have trouble in CAML Query, I suggest you can use CAML Designer to figure it out.
    More reference:
    http://cann0nf0dder.wordpress.com/2013/04/10/search-caml-query-with-managed-metadata/
    http://sharepoint.stackexchange.com/questions/113146/how-do-you-properly-write-to-a-managed-metadata-column-from-jsom-sharepoint-20
    http://www.vrdmn.com/2012/12/working-with-taxonomy-and-javascript-in.html
    Best Regards
    Zhengyu Guo
    TechNet Community Support

  • How to read and write Xml file at client side using JavaScript !

    Hello,
    i am new to javascript.
    I have requirement to read and update XML file at client side.
    Will you please guide what could be the best way to read and update XMl file using javascript.
    Thanks,
    Zuned

    This is a Java forum,not a Javascript forum. Maybe you should ask here [http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s|http://www.webdeveloper.com/forum/forumdisplay.php?forumid=3&s].

  • Creating/copying documents using client side object (javascript)

    Hi
    I want to the user to press a button and this creates or copies documents (Excel) into a document library on the same site. There are many examples showing how to do this for a list but how can it be achieved for documents?
    I've looked at SPFile.CopyTo method but dont know how to use it.
    So the source file would have a number of destination files and the name and column data would be altered at time of creation. Looking for a client side javascript solution.
    Hope someone can assist.
    Thanks

    Hi,
    According to your description, my understanding is that you want to copy or create excel files into a document library using JavaScript Client Object Model.
    For copying excel files, you can use get_files function to get files within a specific folder , and then you can use file collection
    push function to copy files and get_name function to get the file name.
    Here is a detailed code demo for your reference:
    How do I move files from one document library to another using JSOM?
    For creating files, you can use Jquery upload plugin to achieve it,here is a detailed code demo for your reference:
    How to Upload File to Document Library using JavaScript Client Object Model?
    Thanks
    Best Regards
    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]

  • Using Client Side Extensions (SWF) to call external Web Service

    Hi,
    I'm using .swf files to extend my CRMOD application, and one of my requirements is to be able to show information on a custom applet using the Client Side Extensions. This information is coming from an external system, so i'm trying to call this external web service using .swf.
    When i create my swf application and i run it locally, i can access the web service and receive the results into my browser, but when i do the same call from the custom web applet in CRMOD i don't get any results.
    Can someone tell me if this is possible? And if so, how to do it?
    Best Regards,
    NF

    Post Author: luke
    CA Forum: Data Integration
    Yes. I  have figured out the way to do it.
    Luke.

  • ADF validator or JavaScript for client side validation ?

    using JDev and ADF 11g
    Problem description : To apply validations such as date range check, pattern matching, maxlength etc.. on ADF Faces Components.
    Solution 1: Use ADF validator such as Reg Expr validator, Max Length validator
    Souliton 2: Write Javascript code for validating the component's value at cleint side.
    When using ADF Validator for such type of validation checking, a request is send to the server for processing (additional overhead) . However we can do such validations with javaScript functions without the need to interact with the server. So, what benefit does ADF Validator serves when one needs to implement such validations ?
    Please share your views...

    H,
    afaik, client side validation in ADF Faces suppresses server round trips if a validation error is detected on the client. Only if no problem is found, the server side validation is challenged upon submit (so no extra round trip for validation). Shay is absolutely correct. JavaScript is a convenience but never a solution.
    Here's how to create a custom validator with a client and server side implementation : http://download.oracle.com/docs/cd/E15523_01/web.1111/b31973/af_validate.htm#BABEIIDD
    Frank

  • How to use javascript to print on the client side

    hi all,
    Now i'm facing a problem:
    I want to use javascript to print something(for example, a table) on the client side. So i must get a connection with the printer installed in the client computer.
    some says that getObject() function can do this,but i don't know how?
    Who please help me!

    window.print();

  • How call session bean from Client side

    Hi
    calling session bean from client side it gives Lookup erroe, it gives JNDI error
    how we know session bean is working. in Admin tree bean statis is reb Flaf, and ID is "Down" how we activate it..
    null

    If you can make a connection using sess_sh, then you know that you have configured your database and listener properly. If it is not working, read the manuals that you can download from technet. They are pretty good, and if you follow the directions, you should see success.
    Good Luck!
    Brad

  • RPC FAILURE: Due to Client Side processing

    I am working with Sun Rpc for providing the client server interface in my project. I have observed that during stress testing after approx 3 hour client start taking a lot of time to process and give back the result. Although server side time stamp is still in microseconds, whereas client side gone in secs.Do any body face such problem previously if yes please let me know the solution.

    This forum is for discussion of programming in C++, particularly using Sun C++ compilers.
    You are more likely to find help for your question in a Solaris forum -- I suggest the "kernel" forum.

Maybe you are looking for

  • Don't work telnet client from ssh session ("%Connections to that host not permitted from this terminal") in 151-4M.

    I changed IOS to 15.1.4M in the ISR router. If I connect to console by ssh and  I type  "telnet X.X.X.X YY"  in console then It appear the strange message "%Connections to that host not permitted from this terminal". After I  downgraded to  ios 12.4.

  • Please tell me how to do this on a Mac

    How do you do a multi track video like the example below? http://www.youtube.com/watch?v=yfgk-i56QI0 The guy said he used Sound Forge 9 http://www.sonycreativesoftware.com/products/product.asp?pid=431 Can this be done on a Mac?????????????

  • Dictation worked now it won't

    dictation worked now it won't

  • Using default values for a column

    Hi, I am using PL/SQL Developer, where for some columns in a table I've defined 0 as default value. After running some queries on the table (insert,update) I realized that all the columns that are supposed to have 0 value (default), actually have NUL

  • Automated PDF to Grayscale Conversion

    Hi, I need to find a way of converting PDF files to Grayscale using an automated process. I have adobe distiller and adobe acrobat 8 professional - but I cannot find a way to access via API or command line so that I can automate the process of batch