Re: constructing a url...
Re: constructing a url...
- Subject: Re: constructing a url...
- From: Mark Morris <email@hidden>
- Date: Tue, 26 Sep 2006 21:06:01 -0500
James,
I've done something similar to this, but quite a few years ago. I
haven't followed this whole thread, but maybe the same concept will
work for you.
I created a "ClosePopUpPage" component that I would call from my pop
up page submit action. (So right off the bat, any changes in the pop-
up page are processed.)
When the ClosePopUpPage loads, the javascript in the onLoad does
something like (this is from memory)
window.opener.submitFromPopUpForm.submit(); window.close();
This relied on an "informal interface" that the form to be submitted
on the main window had a certain name. And you needed to make sure
the resulting action didn't do anything unexpected. But the end
result is that the changes in the pop-up were reflected in the
refreshed main page.
Hope this can help in your situation.
Regards,
Mark
On Sep 26, 2006, at 5:20 PM, James Cicenia wrote:
I know this is confusing....
My app has a lot of popups. Not my design,,,, whereby when a person
edits something
in the popup and then hits save and then "close and refresh" I
automatically submit
the originating page. This has worked great. However with
DirectActions this does not
work. Only with component actions. I think because the DAs seem
like just a link and don't
have a real originating page... at least to the javascript.
It is a real pain of the arse interface but that is what the client
wanted and I made it work.
Except for this subtle issue. However, I hope your other method
will work.. I will report
back tomorrow.
Thanks again,
James
On Sep 26, 2006, at 4:03 PM, Chuck Hill wrote:
On Sep 26, 2006, at 12:22 PM, James Cicenia wrote:
OK --
Here is the real problem....
I need for the popup page to know the parent page so that
javascript can do its magic.
You mean in Java in your WO app, or in JavaScript in the browser?
What exactly do you need.
If I use a DA then there is really no parent page while a
component action gives you the parent page.
Maybe what you suggest will work then. I will try that tonight.
I am confused as to what you are referring to as the parent page
in a component action.
Chuck
On Sep 26, 2006, at 12:16 PM, Chuck Hill wrote:
On Sep 23, 2006, at 8:01 AM, James Cicenia wrote:
On Sep 22, 2006, at 3:28 PM, Chuck Hill wrote:
On Sep 21, 2006, at 7:26 PM, James Cicenia wrote:
Chuck -
I have been reading and re-reading that section. And, I still
can't seem to grasp one
fundamental issue and that is how I am to relate my current
EOObject to the action.
Each bubble on my graph is a project. Clicking on a bubble
popups the project window.
So...
They are in a WORepetition, right?
No... jFreeChart when it renders its graphic has its own
classes to render the associated URL while it does that.
So I can give it a context and any text.. probably pass it an
eo too. That is about it.
Do I have to create and insert context.elementIDs through each
iteration jFreeChart does?
confused.
Yeah, me too! :-) In that case, I think that what you want is
to do is to create the URL once and append something like ?
projectID=123 to it. Then, in the action method, get the
projectID form value, use EOUtilities.objectWithPrimaryKeyValue
to convert 123 to an Project EO, then return a page showing
that. It will be similar to a direct action with a query
string / parameter, but it will hit an action method instead of
a direct action. Does that make sense? Will that work with
jFreeChart (I have never used that)?
Chuck
I can see how to construct the URL, even invoke an action,
however, I am still mystified
about how it is to know what object the URL is referring too.
Does this make sense?
All that you can know is that the URL is for the current item
in the repetition. The URL is not for a specific object, just
for a specific place in the iteration through the tree of
WOElements. So in your invokeAction method, when
context.senderID().equals(context.elementID()) then whatever
is bound to the 'item' of the WORepetition has the correct
Project to popup a window for.
I am also not clear on why you don't just use a WOHyperlink
for this.
Chuck
On Sep 20, 2006, at 11:58 AM, Chuck Hill wrote:
Hi James,
On Sep 19, 2006, at 6:58 PM, James Cicenia wrote:
I need to construct a componentActionURL vs a directActionURL.
Basically I am using jfreeChart and need to create a popup
of an object.
I can make it work great with direct actions however, for
reasons unimportant here,
I need a componentActionURL.
My question I think is how to set the action for
WOContext.componentActionURL?
I think you are thinking about this backwards. The
frameworks compute the URL based on where in the tree of
WOElements it is. You don't set the action. The question
to ask is, "How do I know if the incoming action is for
me?" The answer is to check if context.senderID().equals
(context.elementID()). See page 181
--
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
--
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
--
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:
40onpointsoftware.com
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