Suggestion: JavaScript scope variables and event listeners

Invoking Java from JavaScript in ADF Mobile is surprisingly efficient although it is still relatively expensive compared to plain HTML5/JavaScript/CSS stuff in the native UIWebView. But whenever you want to do something "dynamic" you have to revert to invoking Java, even for simple use cases. As far as I can see it as soon as you use listeners on components, managed beans or data controls you're in the Java world.
Why not add similar concepts that are pure JavaScript implementations for performance. As an example I want to have a SelectOneButton component and depending on its state I want to enable/disable an InputText component. As far as I can see it I would need Java to make this happen. First, I would need a Java managed bean to keep the enabled/disabled state. Then I would set the value property of the SelectOneButton with an EL expression to this managed bean property, or for other scenarios use a Java based ActionListener to change the state. Then the InputText component could use an EL expression in its Disabled property.
For this simple use case this would still perform fast, but real applications grow more complex.
Why not have the option of creating JavaScript based managed "beans"? The could live on javaScriptPageFlowScope or javaScriptViewScope. Then the AMX components could reference this from EL and it would be even better if we can create pure javascript ActionListeners (or other listeners). This would make it similar to the choice with ADF Faces application between doing a server roundtrip with partial-page-rendering and using pure clientListeners and clientAttributes for optimal performance.
For situations where we do need to power of Java, it would be great if we can access these javascript scope variables from Java.

This is a good suggestion, Wilfred. We haven't gotten to this level of optimization in the framework yet. At some point it's likely we'll have an option for the developer to specify the layer to handle the method.
Thanks

Similar Messages

  • Session scope variables and weird behaviour of AdfContext()

    Hello,
    what is the best method and correct API to create a session scope variable?
    I am currently using ADFContext().getCurrent().getSessionScope().get()/put(), but it looks like it has some problems: for some unkown reasons I loose the variable, that is get() returns null when called from a method of a (overridden)ViewRowImpl. Why does this happen?
    Thanks you in advance

    There are a couple of ways you can set values on a sessions scope but I would have to question if you really need a scope as high as session to accomplish what you want to do. At any rate, you should be able to store the value using the method you described but you could also try setting it using EL by using the setExpressionValue and resolveExpression methods in JSFUtils.java (you can find this in the latest fusion demo application). JSFUtils also has a getFromSession and storeOnSession that you could try.
    With all that said I don't think it is good practice to access scope variables from your model layer. You should write your method in the ViewRowImpl class to accept the value as a method parameter and then pass the value in through the binding layer or when invoking the method from your bean class.

  • Movie Clips as buttons – ignoring my stop actions and event listeners

    Ok, so I think I am hear with the proper linked files to show you guys! Pretty much learning everything, so forgive my ignorance thus far!
    Anyway, I am just trying to figure out movie clips as buttons, and have been following along on Lynda.com – however, I seem to be doing these things right, but when i test my movie, the button just loops regardless of rollovers or stop actions.
    You can check this address www.midnyc.com to see the failed anim, and you should be able to import it as well. Here is my coding:
    function rollover (e:EVENT){
        myBtn.gotoAndPlay ("in");
    myBtn.addEventListener (MouseEvent.MOUSE_OVER, rollover);
    function rollout (e:EVENT){
        myBtn.gotoAndPlay ("out");
    myBtn.addEventListener (MouseEvent.MOUSE_OUT, rollout);
    thank you in advance for your help. And to KGLAD, thanks for recommending how to post a bit better! Since I never had links etc... sorry about that.

    Do you get any kind of error messages?  Normally if there's a coding error, movieclips and other things go haywire.
    For you event handler functions, try specifying the event that matches the listener event...
    function rollout (e:MouseEvent){
    I think "EVENT" would be wrong anyways... "Event" would be correct

  • C# SSIS Script component - Save List String to Object package-scope variable and read it in Script Task

    before posting this i was searching this on internet but was not able to find info regarding my specific case:
    i have a DataFlow Task with "Error output" pointing from FlatFile to
    Script Component that does below (variable "ErrorMessageList" is listed under ReadWriteVariables property):
    List<string> lsErrors = new List<string>();
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    lsErrors.Add("test1");
    lsErrors.Add("test2");
        void PostExecute()
            base.PostExecute();
            Variables.ErrorMessageList = lsErrors;
    Then the DataFlow points to a ScriptComponent where this object variable is listed under ReadOnlyVariables property and does the below:
    public void Main()
    List<string> lsErrors = (List<string>)Dts.Variables["ErrorMessageList"].Value;
    and that is where i get exception-has-been-thrown-by-the-target-of-an-invocation
    What is wrong here?
    (i have mistakenly edited this first post before, so i tried to manually put it back to original version)

    i have missed the "override" keyword...
    public class ScriptMain : UserComponent
    public class UserComponent: ScriptComponent
    namespace Microsoft.SqlServer.Dts.Pipeline
    public class ScriptComponent
    // i should have seen this before
    public virtual void PostExecute();
    i believe i must have deleted the PostExecute method definition right after the ScriptComponent generated the script for me... and then when i've realized that i can't change ReadWriteVariables as a part of:
    public override void Input0_ProcessInputRow(Input0Buffer Row)
    // --- can't change ReadWriteVariables here
    then i had to add the method back but forgot that the base method is virtual
    thanks for this hint, Russ!

  • Remove Child and Event.SOUND_COMPLETE not working inside movie clip. What's the problem?

    I have a movie clip that is called to the stage. The user then clicks a button and music plays. As the music starts, another movie clip is called, a simulation of  an equilizer. There are several things that should happen:
    1) When the user closes the movie clip the music is supposed to stop playing and the equilizer movie clip is removed. What actually happens is the music stops playing but  the equilzer movie clip is not removed.
    2) When the music is finished playing the equilzer is supposed to be removed from the stage and the play button is reactivated. But none of that happens. When I click on the movie clip a second time equilizer is still there and the play button is not reactivated.
    Here's the code that calls the movie clip to the stage.
    stage.addEventListener(MouseEvent.MOUSE_DOWN, goButtons);
    function goButtons(event:MouseEvent):void
        if (event.target == Song_bnt)
            SoundMixer.stopAll();
            addChild(myPlaySong);
            myPlaySong.x = 304;
            myPlaySong.y = 105;
            //event.stopImmediatePropagation();
    Here's the code in the movie clip:
    import flash.media.Sound;
    import flash.events.Event;
    stop();
    var playRayJaySong:RJSong;
    var playRayJaySongChannel:SoundChannel;
    var equilizer:Equilizer;
    equilizer = new Equilizer();
    playRayJaySong = new RJSong();
    //Plays music, inactivates buttons, and adds the equilizer to the stage.
    PlaySongRJClip.addEventListener(MouseEvent.MOUSE_DOWN, songPageButton);
    function songPageButton(event:Event):void
        playRayJaySongChannel = playRayJaySong.play();
        PlaySongRJClip.visible = false;
        ClicktoPlaySong.visible = false;
        addChild(equilizer);
        equilizer.x = 269;
        equilizer.y = 246;
    //Removes the equilizer from the stage when the music is complete.
    PlaySongRJClip.addEventListener(Event.SOUND_COMPLETE, rjSoundComplete);
        function rjSoundComplete(e:Event):void
        PlaySongRJClip.visible = true;
        ClicktoPlaySong.visible = true;
        removeChild(equilizer);
    //Removes the equilizer and event listeners from stage and calls dispatch event to close the movie clip.
    closeSong_bnt.addEventListener(MouseEvent.MOUSE_DOWN, CloseSong);
    function CloseSong(event:MouseEvent):void
        removeChild(equilizer);
        dispatchEvent(new Event("RemoveMSong"));
        PlaySongRJClip.removeEventListener(MouseEvent.MOUSE_DOWN, songPageButton);
        PlaySongRJClip.removeEventListener(Event.SOUND_COMPLETE, rjSoundComplete);
    //Removes the MovieClip from the stage when the user clicks on the close button inside the MovieClip.
    myPlaySong.addEventListener("RemoveMSong", RemoveSongClip);
    function RemoveSongClip(e:Event):void
        SoundMixer.stopAll();
        removeChild(myPlaySong);
    Any thoughts?

    I figured out the problem. Here's how I reorganized the code (all in one frame).
    //Code for Ray Jay song.
    var playRayJaySong:RJSong;
    var playRayJaySongChannel:SoundChannel;
    playRayJaySong = new RJSong();
    myPlaySong.equilizer_inst.visible = false;
    //Plays the song.
    myPlaySong.PlaySongRJClip.addEventListener(MouseEvent.MOUSE_DOWN, songPageButton);
    function songPageButton(event:Event):void
        playRayJaySongChannel = playRayJaySong.play();
        playRayJaySongChannel.addEventListener(Event.SOUND_COMPLETE, rjSoundComplete);
        myPlaySong.equilizer_inst.visible = true;
        myPlaySong.PlaySongRJClip.visible = false;
        myPlaySong.ClicktoPlaySong.visible = false;
    //Removes the MovieClip from the stage when the user clicks on the close button inside the MovieClip.
    myPlaySong.closeSong_bnt.addEventListener(MouseEvent.CLICK,RemoveSongClip);
    function RemoveSongClip(e:Event):void
        SoundMixer.stopAll();
        removeChild(myPlaySong);
        myPlaySong.equilizer_inst.visible = false;
        myPlaySong.PlaySongRJClip.visible = true;
        myPlaySong.ClicktoPlaySong.visible = true;
        playRayJaySongChannel.removeEventListener(Event.SOUND_COMPLETE, rjSoundComplete);
    //Resets all of the movieclips to their orginal state.
    function rjSoundComplete(e:Event):void
        myPlaySong.equilizer_inst.visible = false;
        myPlaySong.PlaySongRJClip.visible = true;
        myPlaySong.ClicktoPlaySong.visible = true;
    Thanks all for your suggests and input.

  • Print memory scope variables value

    All,
    How do i print all the memory scope variable and their values that are set via the MB or the taskflow or the UI page using setAction/PropertyListener ?
    I mean where should i write the code ?
    thnks
    Jdev11.1.1.5
    Edited by: in the line of fire on Oct 13, 2011 9:50 AM

    @Frank
    if you can detail this +"If the managed bean uses a HashMap to store values then the bean itself can be used to expose an interface for all of what you want it to do. So its an architecture decision to make (which you should do when designing the application)"+
    As of now what i am doing is
        public void printMemoryVariables(){
            logger.info("inside printMemoryVariables");
            AdfFacesContext adfFacesCtx = AdfFacesContext.getCurrentInstance();
            // get the PageFlowScope Params
            Map<String, Object> scopePageFlowScopeVar= adfFacesCtx.getPageFlowScope();
            // get the requestScope Params
            Map<String, Object> scopeRequestScopeVar= adfFacesCtx.getViewScope();
            Collection scopePageFlowScopeVarValues = scopePageFlowScopeVar.values();
            Collection scopePageFlowScopeVarKeys = scopePageFlowScopeVar.keySet();
            //obtain an Iterator for Collection
            Iterator itrValues = scopePageFlowScopeVarValues.iterator();
            Iterator itrKeys = scopePageFlowScopeVarKeys.iterator();
            //iterate through HashMap values iterator
            while(itrValues.hasNext() && itrKeys.hasNext()){
                logger.info("Key : " + itrKeys.next() +  "Values: " + itrValues.next());
        }And calling this in the initializer of the taskflow. But is it possible to get the values during the task flow execution

  • Is there a way to clear ALL event listeners, stop all movie clips, etc?

    Is there a syntax for this?
    I have a movie that has 15 frames. Each frame has embedded movie clips within movie clips, tons of animations and event listeners. None is needed except when they are on the stage, on the frame. However, the animations continue even when the frame is left.
    For instance, I have a frame that has a dynamically rendered animation of leaves falling from a tree. When the frame is left, the leaves continue to fall.
    There are many instances of this type of thing happening.
    Ideally, I would love to just be able to clear everything when a new frame is loaded, since none of the animations or event listeners need to carry over from one frame to another.
    Is there a way to do this without the thousands of lines of code it would take to manually remove every single animation and event listener and sound, etc, from the stage?
    Thanks so much!!
    Amber

    you have to manually do that.
    or, you could convert each frame to a swf.  load each swf when needed and, if you're publishing for fp 10+, you can apply unloadAndStop() to kill all streams in the loaded swf and ready those assets for gc.

  • Javascript discussion: Variable scopes and functions

    Hi,
    I'm wondering how people proceed regarding variable scope, and calling
    functions and things. For instance, it's finally sunk in that almost
    always a variable should be declared with var to keep it local.
    But along similar lines, how should one deal with functions? That is,
    should every function be completely self contained -- i.e. must any
    variables outside the scope of the function be passed to the function,
    and the function may not alter any variables but those that are local to
    it? Or is that not necessary to be so strict?
    Functions also seem to be limited in that they can only return a single
    variable. But what if I want to create a function that alters a bunch of
    variables?
    So I guess that's two questions:
    (1) Should all functions be self-contained?
    (2) What if the function needs to return a whole bunch of variables?
    Thanks,
    Ariel

    Ariel:
    (Incidentally, I couldn't find any way of  marking answers correct when I visited the web forums a few days ago, so I gave up.)
    It's there...as long as you're logged in at least, and are the poster of the thread.
    What I want is to write code that I can easily come back to a few months later
    and make changes/add features -- so it's only me that sees the code, but
    after long intervals it can almost be as though someone else has written
    it! So I was wondering if I would be doing myself a favour by being more
    strict about make functions independent etc. Also, I was noticing that
    in the sample scripts that accompany InDesign (written by Olav Kvern?)
    the functions seem always to require all variables to be passed to it.
    Where it is not impractical to do so, you should make functions independent and reusable. But there are plenty of cases where it is impractical, or at least very annoying to do so.
    The sample scripts for InDesign are written to be in parallel between three different languages, and have a certain lowest-common-denominator effect. They also make use of some practices I would consider Not Very Good. I would not recommend them as an example for how to learn to write a large Javascript project.
    I'm not 100% sure what you mean by persistent session. Most of my
    scripts are run once and then quit. However, some do create a modeless
    dialog (ie where you can interface with the UI while running it), which
    is the only time I need to use #targetengine.
    Any script that specifies a #targetengine other than "main" is in a persistent session. It means that variables (and functions) will persist from script invokation to invokation. If you have two scripts that run in #targetengine session, for instance, because of their user interfaces, they can have conficting global variables. (Some people will suggest you should give each script its own #targetengine. I am not convinced this is a good idea, but my reasons against it are mostly speculation about performance and memory issues, which are things I will later tell you to not worry about.)
    But I think you've answered one of my questions when you say that the
    thing to avoid is the "v1" scope. Although I don't really see what the
    problem is in the context of InDesign scripting (unless someone else is
    going to using your script as function in one of theirs). Probably in
    Web design it's more of an issue, because a web page could be running
    several scripts at the same time?
    It's more of an issue in web browsers, certainly (which I have ~no experience writing complex Javascript for, by the way), but it matters in ID, too. See above. It also complicates code reuse across projects.
    Regarding functions altering variables: for example, I have a catalog
    script. myMasterPage is a variable that keeps track of which masterpage
    is being used. A function addPage() will add a page, but will need to
    update myMasterPage because many other functions in the script refer to
    that. However, addPage() also needs to update the total page count
    variable, the database-line-number-index-variable and several others,
    which are all used in most other functions. It seems laborious and
    unnecessary to pass them all to each function, then have the function
    alter them and return an array that would then need to be deciphered and
    applied back to the main variables. So in such a case I let the function
    alter these "global" (though not v1) variables. You're saying that's okay.
    Yes, that is OK. It's not a good idea to call that scope "global," though, since you'll promote confusion. You could call it...outer function scope, maybe? Not sure; that assumes addPage() is nested within some other function whose scope is containing myMasterPage.
    It is definitely true that you should not individually pass them to the function and return them as an array and reassign them to the outer function's variables.
    I think it is OK for addPage() to change them, yes.
    Another approach would be something like:
    (function() {
      var MPstate = {
        totalPages: 0,
        dbline: -1
      function addPage(state) {
        state.totalPages++;
        state.dbline=0;
        return state;
      MPstate = addPage(MPstate);
    I don't think this is a particularly good approach, though. It is clunky and also doesn't permit an easy way for addPage() to return success or failure.
    Of course it could instead do something like:
        return { success: true, state: state };
      var returnVal = addPage(MPstate);
      if (returnVal.success) { MPstate = returnVal.state; }
    but that's not very comforting either. Letting addPage() access it's parent functions variables works much much better, as you surmised.
    However, the down-side is that intuitively I feel this makes the script
    more "messy" -- less legible and professional. (On the other hand, I
    recall reading that passing a lot of variables to functions comes with a
    performance penalty.)
    I think that as long as you sufficiently clearly comment your code it is fine.
    Remember this sort of thing is part-and-parcel for a language that has classes and method functions inside those classes (e.g. Java, Python, ActionScript3, C++, etc.). It's totally reasonable for a class to define a bunch of variables that are scoped to that class and then implement a bunch of methods to modify those class variables. You should not sweat it.
    Passing lots of variables to functions does not incur any meaningful performance penalty at the level you should be worrying about. Premature optimization is almost always a bad idea. On the other hand, you should avoid doing so for a different reason -- it is hard to read and confusing to remember when the number of arguments to something is more than three or so. For instance, compare:
    addPage("iv", 3, "The rain in spain", 4, loremIpsumText);
    addPage({ name: "iv", insertAfter: 3, headingText: "The rain in spain",
      numberColumns: 4, bodyText: loremIpsumText});
    The latter is more verbose, but immensely more readable. And the order of parameters no longer matters.
    You should, in general, use Objects in this way when the number of parameters exceeds about three.
    I knew a function could return an array. I'll have to read up on it
    returing an object. (I mean, I guess I intuitively knew that too -- I'm
    sure I've had functions return textFrames or what-have-you),
    Remember that in Javascript, when we say Object we mean something like an associative array or dictionary in other languages. An arbitrary set of name/value pairs. This is confusing because it also means other kinds of objects, like DOM objects (textFrames, etc.), which are technically Javascript Objects too, because everything inherits from Object.prototype. But...that's not what I mean.
    So yes, read up on Objects. They are incredibly handy.

  • How to identify listeners types for forms, items and events in addon wizard

    Dear users,
    I have developed a sample addon through B1DE wizards and successfully installed and connected the addon and can view menu and form of my addon. Since i am new to this, i didn't add any listeners to my form, items and events because i don't know what type of listeners to add and what coding to add after adding listeners.
    If anyone describe me how to work with listeners, i would be glad. My form has basic fields like BPcode, BPname, Docnum, Itemcode, Item name, quanity, price, total etc. Uptil now my addon form has no function of getting list of BP and Items and calculating the totals based on price and quantity but it has some basic functions like add, update,del, add print view, next record previous, record next etc. which are due to object registration and auto-code generation wizards i think.
    Please help me in adding listeners and their relevant coding.
    Thanks in advance.

    Thanks for reply, Actually I am asking about listeners in the wizard of B1DE, code generator wizard. I think you are telling me about adding listeners directly in the vb.net. Kindly, tell me first, what event type I should add for item, form etc while adding listeners during  the wizard. Or If you know some link where event types of listeners are decribed, you are more than welcome.
    Thanks,
    Farhan

  • [JS] Basic question about event listeners and event handlers

    I am very new to the whole topic of event listeners and event handlers.  I'd run the test for the following problem myself, but I don't know where to start, and I just want to know if it's impossible -- that is, if I'm misunderstanding what event listeners and event handlers do.
    Say I have an InDesign document with a text frame that is linked to an InCopy story.  Can I use an "afterImport" event listener on the text frame to perform some action any time the link to the InCopy story gets updated?  And will the event handler have access to both the story that is imported, and the pathname of the InCopy file?
    Thanks.

    Thank you, Kasyan.
    Both of those are good solutions.
    We are currently using InDesign CS4 and InCopy CS5.  I'm hoping to get them to purchase the whole CS5 suite soon, since I'd like to start writing scripts for InDesign CS5 as soon as possible, as long as I'm going to have to be doing it in the not too distant future anyway.  The greater variety of event handlers sounds like it might be something that is crucial to the project I'm working on, so that adds to the argument for getting CS5.
    Thanks again.  You have no idea how helpful this is.  I made some promises to my boss yesterday that I later realized were  based on assumptions of mine about the InDesign/InCopy system that didn't make any sense, and I was going  to have to retract my promises.  But after reading your response I think I can still deliver, in a slightly different way that I had been thinking before.
    Richard

  • All event listeners and models in one file?

    I have one java file for all my event listeners of a programm and one java file for all my models. Is this good?
    I create instances with new AllInOneHandler.MouseHandler() for example.
    Or should I have one file for each event and each model?

    Hi,
    you should have one file for each class or interface - this gives you best control and reusability. Also when you have javadoc-comments in it, big files with many classes in it will become hard to edit.
    When using one file for each class or interface you can import only the needed classes or interfaces instead of importing whole packages - so it is easier to see, what is exactly imported. As so a good structured application has many classes, where each of them is small (and in an own source file), you will have less problems during the evolution of your classes this way.
    If you want to group some classes, why not use sub-packages for this purpose?
    greetings Marsian

  • HT6012 While trying to update projects and events from a previous version of iMovie to iMovie '11, someone forced iMovie to quit.  Now when I start iMovie '11 and try to update, a message says no projects or events can be found?  Any suggestions?

    While trying to update projects and events from a previous version of iMovie to iMovie '11, someone forced iMovie to quit.  Now when I start iMovie '11 and try to update, a message says no projects or events can be found?  I know there are previous projects and events, and they definitely have not been updated because they do not show up in my iMovie'11 library, events, or projects.  Any suggestions?

    I also have Jolly's problem. I found the iMovie 9.0.9 folder and tried to launch the older version of iMove. It would not launch. I removed all of the iMovie preferences from the Preferences folder, removed iMove 10 from the applications folder, and restarted my Mac. iMove 9.0.9 still won't launch and I can't access my videos created with the older version of iMovie. Is there a way to uninstall iMovie 10 and reinstall iMovie 9.0.9?
    I am running Yosemitie on a  iMac.
    Paul

  • Sending and parse javascript object variable to java variable

    can anyone help me how to send and parse javascript object variable from client to java variable on servlet. Here is what i mention about:
    suppose i have object variable var_js with it's properties:
    <script>
    var var_js = {
    id: 'var_js1',
    name: 'this is var javascript',
    allow_value_type: ['int', 'string', 'object']
    </script>
    /* after processing javascript object to java var, that i hope you guys may help me, it's java var (var_java) become something like*/
    var_java.id = "var_js1";
    var_java.name = "this is var javascript";
    var_java.allow_value_type = {"int", "string", "object"}

    You could have this html page:
    <html>
    <script>
    var var_js = {
    id: 'var_js1',
    name: 'this is var javascript',
    allow_value_type: ['int', 'string', 'object']
    function send()
    document.getElementById("id").value = var_js.id;
    document.getElementById("name").value =var_js.name;
    document.getElementById("allow_value_type").value =var_js.allow_value_type;
    document.form.submit();
    </script>
    <form name="myForm" action="http://localhost:8080/servlet/myServlet" method="post" >
    <input id="id" type="hidden" value="">
    <input id="name" type="hidden" value="">
    <input id="allow_value_type" type="hidden" value="">
    <input id="cmdGo" type="button" value="Button" onClick="send()">
    </form>
    </html>
    Then have a servlet like this:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class myServlet extends HttpServlet {
    public void doPost( HttpServletRequest request,
    HttpServletResponse response )
    throws ServletException, IOException
    String id = request.getParameter("id");
    String name = request.getParameter("name");
    String allowed_value_type = request.getParameter("allowed_value_type");
    Var_java var_java = new Var_java(id,name,allowed_value_type);
    //and have you java object
    class Var_java
    String id;
    String name;
    String allowed_value_type;
    public var_java(String id,String name,String allowed_value_type)
    this.id=id;
    this.name=name;
    this.allowed_value_type=allowed_value_type;
    well...something like that i think.
    Hope it helps.

  • ValueRef and scope variables

    It seems that the valueRef attribute is always associated to a bean variable.
    If I want to use scope variables like in JSTL I have to use the rtexprvalue="true" for valueRef.
    Can the variables pageScope, sessionScope, param, etc. be reserved so that they can be accessed
    thru valueRef?
    E.g. <h_output_text valueRef="pageScope.mySSN" /> or use the JSTL syntax:
    <h_output_text valueRef="${pageScope.mySSN}" />
    Does somebody know the rationale behind valueRef being limited to beans exclusively?

    I am not very clear abot this, but maybe it is because of some issue in making the Faces Components
    device-independent.
    Perhaps, you can try using <c:set> to copy the data from page-scope bean to a managed bean
    and then use the managed bean property in the valueRef.
    Ajay

  • JSP have event listeners???

    Hi Would like to check if JSP have event listeners?? Eg.Like onblur that is used to activate javascript. Instead of calling a javascript function, can it call a JSP code or function.
    Do JSP has functions like javascript?
    Also does anyone know how if javabean is able to return a value and place it in a textfield on a JSP page??
    Please help me I am going more and more headache
    as mine deadline draws near....sign :(

    No.
    JSP can have Java code as scriptlets, but tag libraries are preferred. I don't put any scriptlet code in my JSPs.
    You can add a JavaBean to page, request, session, or application scope in a JSP page and access the properties that have getters. Then you can assign the values to a text field.
    I don't know how tight your deadline is, but the best approach in my view is to use Java Standard Tag Library (JSTL). Jakarta has a free implementation. I'd also recommend reading Shawn Bayern's "JSTL In Action" book. You'll be up to speed with JSTL very quickly. It will provide a solution to what you're asking, if your deadline will allow you time to learn it. The book is very well-written and technically excellent, IMO. - MOD

Maybe you are looking for

  • ABAP Outbound Proxy with multiple entries

    I have message type as follows. MT_Proxy_Matmas_out  -- DT_Proxy_Matmas_out Matnr         1..unbounded    Material_Num   1..1    Material_Dec    1..1 Message Inrerface: MI_proxy_Matmas_out. Generated Proxy has following objects. 1. Class     ZMCO_MI_

  • Error on "import com.fastsearch.esp.content.DocumentFactory;"

    Hi I'm getting error for following statement import com.fastsearch.esp.content.DocumentFactory I think some jar file might be missing but don't know exactly which, can anyone tell which jar I need to include. Regards, cool_dude.

  • CTI Toolkit Agent Desktop Keep on Talking status and hung

    Hi All, We have ICM 7.2(5) and last two days most of the agent CTI toolkit getting greyed-out and keep on showing talking mode only.. please refer the below screen shot and advise the same. The agent cti logs attached for you info.. Thanks  & Regards

  • Production in SAP B1

    Expertz... What are the exact steps in SBO production module to be follwed?

  • Retriveial of data based on inner joins

    I have Five tables (Subject,English,Hindi,Maths,Science,Social) where Subject is the Primary table and rest all lookup table For Subject My select Statement need to display all chapter names Based on the ID's in subject table SELECT English.ChapterNa