Calling a Function in a AbstractPortalComponent Class from a JSP

Hello,
i got a class witch extends AbstractPortalComponent. In this class I call in the function doContent this
response.include(request, request.getResource(IResource.JSP, "pagelet/TestComponent.jsp"));
now i want to define another function in this class.
This function should be called from the JSP. For Example when a Button is pressed. I know I can do this with a JSPDynPage but i need it this way.
How can i realise this?
Thanks for your replies.
Greetings
Christoph

Never mind - I was doing something very stupid and wasn't
calling the function as a method of a movie clip. I was simply
calling checkTarget(event) rather than
event.currentTarget.checkTarget(event); which seems to work.

Similar Messages

  • Best way to call a function in a generic class from a base class

    Hi,
    I have a generic class that works with subclasses of some other baseclass. When I construct the subclass, I call the constructor of the baseclass which I want to call a function in the generic class. e.g. suppose I have the following classes
    public class List<T extends BaseClass>
        newTCreated(T t)
    }

    Sorry, I pressed Tab and Enter last time when typing the code so I posted without meaning to
    Hi,
    I have a generic class that works with subclasses of some other baseclass. When I construct the subclass, I call the constructor of the baseclass which I want to call a function in the generic class. e.g. suppose I have the following classes
    public class List<T extends BaseClass>
        public void newTCreated(T t)
            // add the t to some internal list
        public T getT(int index)
            // get the object from the internal list
    public class BaseClass
        public BaseClass(List<?> list)
            list.newTCreated(this);
    public class SubClass extends BaseClass
        public SubClass(List<SubCass> list)
            super(list);
    }This doesn't compile because of the call to newTCreated in the BaseClass constructor because BaseClass is not necessarily of type T. Is there any way of checking when I call the newTCreated function that the BaseClass is actually of type SubClass? I could either add the call explicitly in each SubClass's constructor or have a function addToList in BaseClass that is called from the BaseClass constructor but overloaded in each subclass but both of those rely on future subclasses doing the same. Or I could change the newTCreated function to take an argument of type BaseClass and then cast it to type T but this doesn't give a compilation error, only a runtime exception.
    It seems like there should be solution but having only recently started writing Generic classes I can't find it. Thanks in advance for any help,
    Tom

  • Calling C Functions in existing DLL's from Java

    Hi Guys ,
    The tutorial in this site talks about creating ur own DLL's and then calling them from Java . I need to call C functions in existing DLL's from Java . How do I go about doing this ? . Any help on this would be much appreciated.
    regards
    murali

    What you are interested in can be done with what's called "shared stubs", from the JNI book (http://java.sun.com/products/jdk/faq/jnifaq.html), although you don't need the book to do it (I didn't).
    The example code will call functions with any number and kind of parameters, but doing that requires some assembly language. They supply working examples for Win32 (Intel architecture) and Solaris (Sparc).
    If you can limit yourself to functions to a single function signature (number and types of parameters), or at least a small set that you know you'll call at compile time, you can modify the example so that the assembly language part isn't needed, just straight C code.
    Then you'll have one C library that you compile and a set of Java classes and you can load arbitrary functions out of arbitrary dynamic libraries. In my case you don't even have to know what the libraries and functions are ahead of time, the user can set that up in a config file.
    You mentioned doing this with Delphi. One thing to watch out for is C versus Pascal (Win32) function calling convention. A good rule of thumb; if it crashes hard, you probably picked the wrong one, try the other. :-)

  • How to call a function in one .js file from another .js file

    Hello Techies,
    I am trying to call a function in two.js file from one.js file.
    Here is my code
    one.js
    <script>
    document.write("<script type='text/javascript' src='/htmls/js/two.js'> <\/script>");
         function one()
                        var a;
                       two(a);
              }two.js
                  function two(a)
                          alert("two");
                      }But the function two() is not working.
    How can I do this one??
    regards,
    Krish

    I think there is a syntax error in line
    document.write("<script type='text/javascript' src='/htmls/js/two.js'> <\/script>");
    end tag <\/script> is wrong.

  • Calling a function in a flex app from a loaded SWF

    How can I call a function in a flex application from a loaded
    swf file?

    Two ways:
    Application.application returns a reference to the top-level
    application scope. You can access any public member, var, function,
    component, etc through that reference.
    Dispatch an event event form the loaded swf and use a event
    handler in the main app. All the gurus advise this as best
    practice, to ensure "loose coupling" It is also pretty easy,
    especially if you use a bubbling event.
    Tracy

  • Calling a Function Pool inside a Class

    Hi,
        I want to call a Function Pool inside a Class Method. I am getting an Error that 'Report or Program Statement already exists' when I call the function pool in the method. can anybody help me on how to call a Function Pool inside a class method.

    Hello Krish
    Based on your error description I assume that you have tried to "insert" the function pool program (e.g. function group ZFUNC -> SAPLZFUNC) into your class.
    You cannot do that. The explanation for the error message is a following:
    - The class contains already a program statement (CLASS-POOL). If there is somewhere in the class an additional program statement (e.g. FUNCTION-POOL) you will get the error.
    In addition, you cannot "call" a function pool. Instead you can always call the function modules of your function group.
    Regards
      Uwe

  • Is it possible to call a function in a parent component from a child component in Flex 3?

    This is probably a very basic question but have been wondering this for a while.
    I need to call a function located in a parent component and make the call from its child component in Flex 3. Is there a way to access functions in a parent component from the child component? I know I can dispatch an event in the child and add a listener in the parent to call the function, but just wanted to know if could also directly call a parent function from a child (similar to how you can call a function in the main mxml file using Application.application). Thanks

    There are no performance issues, but it is ok if you are using the child component in only one class. Suppose if you want to use the same component as a child to some bunch of parents then i would do like the following
    public interface IParentImplementation{
         function callParentMethod();
    and the parent class should implement this 'IParentImplementation'
    usually like the following line
    public class parentClass extends Canvas implements IParentImplementation{
              public function callParentMethod():void{
         //code
    in the child  you should do something like this.
    (this.parent as IParentImplementation).callParentMethod();
    Here using the Interfaces, we re decoupling the parent and the child
    If this post answers your question or helps, please mark it as such.

  • Calling a function in the main movie from a loaded swf

    I realize this is probably a very basic question, but I have
    loaded a SWF file into another movie. I now want to call a function
    in the main SWF. Is there a way to do that? Alternatively, I have a
    custom class where I could put the function, but I haven't been
    able to figure out how to call it from the loaded SWF either. Do I
    somehow need to associate the class with the main movie,
    or...?

    Never mind - I was doing something very stupid and wasn't
    calling the function as a method of a movie clip. I was simply
    calling checkTarget(event) rather than
    event.currentTarget.checkTarget(event); which seems to work.

  • How to call a method of an Action class from JSP on load?

    Hi guys
    Due to bad design pattern, i am forced to do something which i have not tried before.
    I need to call a method of a struts action class which invalidated the user session FROM the JSP itself on load. Which means it would not require user input.
    We have a subclass of a DispatchAction that handles all the incoming .dos.
    So http://blarblarblar:7001/blar/blar/doSomething.do?method=logout will dispatch to an Action class called DoSomething, into a method called logout().
    So when the webapp throws an exception, the ActionMapping actually displays an error.jsp and i have to invalidate the user at this stage.
    I can't change the most top level code in the base action class so i got to do it this way.
    Any help is much appreciated.
    Thanks.

    hi :-) DispatchAction is quite cool ;-)
    dont get much of your question but hope
    the suggestion below could help.
    A. use redirect?
    or
    B. autosubmit the form
    1. create your form in a jsp
       <html:form action="/doSomething" />
         <html:hidden name="method" value="logout" />
       </html:form>2. auto submit the form with method = logout
    put the function autosubmit in the "onLoad" event of the body
       <script>
         function autosubmit(){
         var form = document.yourformname;
         form.submit();
       <script>regards,

  • Calling a function in an EXE file from Java Program

    Hi Im having a function which is written in c program.i need to call that function from my java program, if i create a shared library (DLL) for my C code then it works but my requirement is i dont want to create that DLL , like in it would be an executable and my java code should access that function in that C program

    I understand the usage od a DLL but the thing is if i convert the exe to a DLL
    the server doesnt start at all so what i need is that i dont want to change
    that .EXE into a .DLL,let it be an executable. that executable is in running mode
    and through my java program i need to call a function in that EXE file.
    Is ther any way to do it?Nope, but you have another problem: why can't you separate your server program
    into a .dll part and a startup part? Both, when properly linked against each other
    should give you an executable file.
    kind regards,
    Jos

  • Calling a Function in the Parent Window from the Child Window

    QUESTION: How do I call a function resident in the parent
    window from a child window?
    BACKGROUND
    I have a JavaScript function resident in the parent window
    that reformats information obtained from the Date object and writes
    the result to the parent window using the document.write( ) method.
    I would like to call this function from the child window and have
    it write to the child window instead. Is this possible? If not,
    must I rewrite the entire function and nest it in the below code?
    If so, what is the proper form of nesting?
    CODE: The code that creates and fills the child window is
    provided below. The highlighted area indicates where I would like
    to enter the information from the function resident in the parent
    window. I have tried every imaginable permutation of code that I
    can imagine and nearly destroyed my parent document in the process.
    I am very happy that I had a back-up copy!
    function openCitationWindow() {
    ciDow = window.open("", "", "width=450, height=175, top=300,
    left=300");
    ciDow.document.write("A proper way to cite a passage of text
    on this page:<br /><br />Stegemann, R. A. 2000.
    <cite>Imagine: Bridging a Historical Gap</cite>. " +
    document.title + ". [<a href='" + location.href + "'
    target='_blank'>online book</a>] &lt;" + location.href
    + "&gt; (");
    MISSING CODE;
    ciDow.document.write(").<br /><br /><input
    type='button' value='Close Window' onclick='window.close()'>");
    ciDow.focus();

    Never mind - I was doing something very stupid and wasn't
    calling the function as a method of a movie clip. I was simply
    calling checkTarget(event) rather than
    event.currentTarget.checkTarget(event); which seems to work.

  • How do you call a function in an attached MovieClip from the current MovieClip?

    Hi there,
    I have this MovieClip A (converted as a symbol) and put in my
    main MovieClip B using attachMovie() , and I am wondering how I can
    call a function defined in A from within B.
    Is it possible?
    Thanks

    Hi kglad,
    yes, I did the attachMovie of the symbol B and it seems like
    none of the ActionScript written in B was not carried over.
    This is how I built B into a symbol :
    (1) Two layers ( one for the ActionScript only, the other for
    the Components)
    (2) I defined the functions to be called remotely by A in the
    ActionScript layer
    (3) I selected all the components in the Components Layer and
    did a Convert To Symbol
    (4) I added the Symbol into A's Library
    (5) I used attachMovie to instantiate the Symbol of B
    I must have missed out something somewhere
    Thanks

  • Call a function in the shell SWF from a imported SWF

    We have flash set up as a shell to take lesson data from XML
    and display it frame by frame.
    We import SWF files when the XML tells it to to be displayed
    on the frame.
    How can I get the imported SWF file to call a function in the
    shell....
    basically have a button or movie clip in the imported swf
    call the "gotoNextFrame()" function in the shell.

    We found a "bit" easier way if anyone is interested.. we have
    the have an eventlistner added to the loader to assign a event to
    the swf file thats imported:
    flashLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
    addEventHandlers);
    then when its completed, it adds event listeners and calls
    our "goNextFrame" function (then clears it when its removed from
    the stage):
    function addEventHandlers(event:Event):void
    var swfMC:MovieClip = event.target.content as MovieClip;
    swfMC.addEventListener("NextFrame", goNextFrame);
    swfMC.addEventListener("PreviousFrame", goPrevFrame);
    swfMC.addEventListener(Event.REMOVED_FROM_STAGE,
    clearEventListeners);
    Then in the swf file thats to be imported, its real simple:
    next_btn.addEventListener(MouseEvent.CLICK, MoveToNextFrame);
    prev_btn.addEventListener(MouseEvent.CLICK,
    MoveToPreviousFrame);
    function MoveToNextFrame(e:MouseEvent):void
    dispatchEvent(new Event("NextFrame"));
    function MoveToPreviousFrame(e:MouseEvent):void
    dispatchEvent(new Event("PreviousFrame"));

  • Is it possible to call a function with the same name from 2 different dll's at the same time.

    I'm trying to call a function ( F ) form 2 different libraries ( A.dll and B.dll ) at the same time. The first lib loaded determines the function F. A->F and B->F have same interface and name but different implementation.

    Hi,
    I tried it with two dll's, both with the same interface, and at the same
    time, in the same VI. The popups even appear at the same time.
    But now I understand the problem... Both dll's are created by LabVIEW! If
    they are not (or one is not, and the other is), this is no problem.
    And VI's in memory cannot have the same name. LabVIEW doesn't care if VI's
    are in a dll or not.
    This might not help, but if you want to make some sort of "plug in" system,
    you might consider using llb's. By loading VI's dynamically, you can select
    the path from which they are loaded. You must unload (close all references)
    one before the loading the other, or the same problem will occur. If you go
    this way, I consider a different approach. Make on
    e library (or even a dll)
    that has the interface you like, this is the "loader". Now make several
    "plug in"'s, with the same interfaces. The name of each function in a plug
    in is a concatenation of the library name and the function name. The loader
    has one extra function, that loads (and unloads, when done) references to
    all desired libraries to use (the names of the functions can be figured out
    easily). All that the loader functions do is dynamically call the library
    functions. You can use a call by reference node for this (you can use the
    connector pane or the loader vi, since the interface must be the same!).
    If you go this way, I guess the loader library can be converted to a dll...
    Hope this helps.
    Wiebe.
    "rsam" wrote in message
    news:[email protected]..
    > Thx Wiebe,
    >
    > did you load both dll at the same time? For example in 1 vi. Somehow
    > the first loaded function keeps to overrule the second. Notice that
    > the interface is
    exactly the same.
    >
    > I loaded 2 dll created in Labview with results described above.
    >
    > Regards Ruud

  • Call Javascript function to pass a id  from APEX report column link

    Hi,
    Can anyone help me, in a report column link i'm calling a function to pass an id and i want to onclick change a icon on that column based on the value on the column status of this table.
    Is this possible?

    Hi Ron,
    I am doing exaclty what you have suggested me but no luck. I started changing the DEMO_CUSTOMERS application to my requirements.The report is working fine and on the report I have created a page attribute to the Hyper linked column and linked that to the page 2 and assign that attribute with #JOBNUM#.
    I am able to pass that value on to form when I click on the JOBNUM. But the problem is I am not able to pass that value into the SQL query so that my query pulls 20+ columns on to the Form ( which is second page ).
    Small clarification... On the form region it is said FORM NAME and type is HTML is that is the way the APEX was designed or does it need to say region type as FORM.
    Thanks for your help in advance.
    Cheers,
    Krishna.

Maybe you are looking for