Re: Openning an extra window on button click
Re: Openning an extra window on button click
- Subject: Re: Openning an extra window on button click
- From: Alexander Spohr <email@hidden>
- Date: Sun, 4 May 2008 18:08:59 +0200
Am 04.05.2008 um 02:30 schrieb Serge Cohen:
Now, I'd like to have a button in the form, which when clicked would
create an extra window with a detailed list of the SELECTED object
of class A.
form: WOForm {
action = yourAction;
target = "newNiceLittleWindow";
}
To me this should be a button ("detail of selected"), so that I have
a chance to get the current state of the selection. Furthermore the
corresponding method should return "null" (so that the content of
the window does not change).
No, do not return null but the content of the new detail-page. This
will just be displayed in your newNiceLittleWindow;
Now I also want another (new) window to open up; to achieve that my
idea was to add to the BODY onload action a small call to
"window.open(someURL, "_blank", "...")" calling a method that would
return the detail of the selected object. I guess I have to use
WOActionURL to generate the URL used by window.open ... ?
Don’t do that. That would always be called. Then you’d have to add a
WOConditional for the body-tag and the horror begins :)
A last question, which indeed is more HTML related : Indeed I'm
using a wrapper component for having a consistent layout over all
the pages of the application. This makes it complicated for me to
add on demand a "onload" javascript to the BODY element... Is there
a more convenient place I can place that one ?
Dont use onLoad. Just put the JavaScipt where (your enclosed
WOComponent-page) it is needed, and it will run when the Browser
parses it.
atze
_______________________________________________
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