• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event


  • Subject: Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
  • From: "Eric E. van Leeuwen" <email@hidden>
  • Date: Fri, 9 May 2008 13:51:42 -0700

Yup, think I'm going to expand on Don's idea and instead of using submit buttons I'm going to use WOActionURL's for the server method's I'm interested in.

EvL

On May 9, 2008, at 1:49 PM, Chuck Hill wrote:

That is a full page submit, not JavaScript calling a server method.

Chuck


On May 9, 2008, at 1:44 PM, Eric E. van Leeuwen wrote:

Don,

Thanks! I'm going to give this a try.

Eric

On May 9, 2008, at 1:29 PM, Don Lindsay wrote:

Hello;

I have a WOpopup in a worepitition, each WOPopup has a WOSubmit button (both are in a TD tag) associated with it and it's style=visibility.hidden.

The WOForm has to have multiplesubmit set to true.
The WOSubmit must have it's action set to the method you wish to call in the java file.


I created a javascript function created to find the associated WOSubmit button that is associated with the WOPopup.

        function listChanged(oElement) {
           oParent = oElement.parentNode;
           //oAlert = oParent.type + "\n";
           oChildren = oParent.childNodes;
           for (i=0;i<oChildren.length;i++) {
             if (typeof(oChildren[i].type)!='undefined') {
              if (oChildren[i].type=='submit'){
                oChildren[i].click();
              }
              //oAlert += "\n" + oChildren[i].type + "\n";
            } else {
              //oAlert += "n,";
            }
           }
          //alert(oAlert);
        }

I set the otherTagString of the WOPopup to onchange=listChanged(this);

The javascript function finds the associated wosubmit and clicks it programatically.

Don

On May 9, 2008, at 4:17 PM, Eric E. van Leeuwen wrote:

Lachlan (et al),

Thanks for the quick response. But I must apologize for omitting the fact that I'd like to avoid using "3rd party" add-ons. Anyone else want to take a crack at it?

Eric

On May 9, 2008, at 12:18 PM, Lachlan Deck wrote:

Hi Eric,

On 10/05/2008, at 4:55 AM, Eric E.van Leeuwen wrote:

I need a way to "bridge" from javascript to my webobject's java. I have a situation where I need a WOPopupButton's onChange javascript event to call a method defined in the .java file of the WOComponent.

You'll want to take a look at the Ajax framework (and example app) in Project Wonder.
Live example: http://www.mdimension.com/cgi-bin/WebObjects/AjaxExample.woa


with regards,
--

Lachlan Deck

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Need help in calling a method defined in the .java file from a javascript fired from a javascript event (From: Eric E.van Leeuwen <email@hidden>)
 >Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event (From: Lachlan Deck <email@hidden>)
 >Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event (From: "Eric E. van Leeuwen" <email@hidden>)
 >Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event (From: Don Lindsay <email@hidden>)
 >Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event (From: "Eric E. van Leeuwen" <email@hidden>)
 >Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
  • Next by Date: Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
  • Previous by thread: Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
  • Next by thread: Re: Need help in calling a method defined in the .java file from a javascript fired from a javascript event
  • Index(es):
    • Date
    • Thread