• 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: Appending to URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Appending to URL


  • Subject: Re: Appending to URL
  • From: Jonathan Rochkind <email@hidden>
  • Date: Thu, 25 Mar 2004 14:30:33 -0600

On Mar 25, 2004, at 11:32 AM, Jonathan Rochkind wrote:

I take it there is no way to append an anchor name to the URL at any point in the R-R loop?

I can't think of a good one. There's always some way, but it might end up being really ugly.


But wait, let's approach this from a different angle. Can we 'fix' WOForm to it's old behavior, so we can keep using the old technique? What if you subclassed WOForm, and over-rode the neccesary parts simply to disable that validation exception, leaving other behavior unchanged. Or for that matter, if you could figure out how, give the WOForm a working 'fragmentIdentifier' binding, but I don't know how to write WODynamicElements really, so that would be a pain. Less of a pain to just figure out how to disable the validation maybe.

Then over-ride WOApplication.dynamicElementWithName to return your own WOForm subclass, when WOForm is asked for.

I think that could work, and then we could keep using the old hack to give a WOForm a # fragment identifier.

--Jonathan


<Bellamy Brothers>
If I told you that I bawled like a baby,
would you hold it against me?
</Bellamy Brothers>


--Jonathan

At 11:27 AM -0800 3/25/04, Dave Stewart wrote:
On Mar 25, 2004, at 10:55 AM, Jonathan Rochkind kindly and quickly offered this:

At 10:48 AM -0800 3/25/04, Dave Stewart wrote:
I've done something similar with my last project, but in that case I was able to bind the form's "href" binding to a method that simply returned context().componentActionURL() + "#Bottom", but in this case WOBuilder won't let me make that binding because of my "action" binding (required because of the popup).

That's exactly what I've always done, and continue to do. On OSX WO 5.2.1, WOBuilder let's me do it just fine. WOBuilder might report that the dynamic element fails validation because you have both bound, but just ignore WOBuilder's complaining and do it anyway, it works fine for me. The action method you have bound is still invoked, since you bound the href to context().componentActionURL() (with a # on the end). (I don't expect this has changed from 5.2.1 to 5.2.3).


If for some reason WOBuilder _really_ won't let you do this, maybe try switching to source view and editing the .wod directly to add your binding.

And I don't know why WOForm doesn't just have a 'fragmentIdentifier' binding like WOHyperlink does, so we wouldn't have to use this hack. (WOSubmitButton _does_ have a fragmentIdentifier binding, but as far as I know it doesn't do anything at all. I wouldn't expect it to; it's WOForm that needs the binding). Maybe if we all request such a thing on bugreport.apple.com...

Hmm, I was getting all excited here too ...

I went ahead and tried this. Somewhat to my surprise, when the page loaded I got this instead:

[2004-03-25 11:05:54 PST] <WorkerThread4> com.webobjects.foundation.NSForwardException for com.webobjects.appserver._private.WODynamicElementCreationException: <com.webobjects.appserver._private.WOForm>: At least two of these conflicting attributes are present: 'action', 'href', 'directActionName', 'actionClass'
at com.webobjects.appserver._private.WOForm.<init>(WOForm.java:43)
<rest of stack trace snipped, available upon request>


Maybe something has changed from 5.2.1 to 5.2.3? Can anyone confirm or deny that? Drat, this was such a clean answer too.
:-(


Unfortunately for me (at least), the documentation Apple has on the Dynamic Elements is a little dated already (date shows 11-01-2002 not only on the ADC site but also on my installed developer documentation) and doesn't mention this conflict (or a number of other bindings, for that matter), so I'm right back where I started.

Jonathan, I'm game on the "feature request", but would like to know if others are seeing the problem I am before filing it. I think it will have more weight if I can say something like "we used to be able to do this anyway, but now it's broken"


--Jonathan

So I have two ideas, but I can't make either of them work:

1. Figure out how to append "#Bottom" to the URL prior to calling context().page() in my action methods in order to get the anchor to work.

2. Figure out how to append "#Bottom" to the URL somewhere in the RR loop (appendToResponse() seems the obvious choice).

I've been through the documentation, but can't seem to put it together. Any ideas? What am I missing here? This should be easy, right?
;-)


(Particulars:
OSX 10.3.3
WO 5.2.3
Java 1.4.2)

Thanks in advance ...


Dave Stewart Aqua~Flo Supply (Goleta CA) dstewart at aquaflo dot com

There are 10 kinds of people in the world:
Those who understand binary and those who don't.

_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev




Dave Stewart
Aqua~Flo Supply (Goleta CA)
dstewart at aquaflo dot com

Murphy's Law:
	Anything that can go wrong, will.
Murphy's Corollary:
	Left to themselves, things tend to go from bad to worse.
Murphy's Constant:
	Matter will be damaged in direct proportion to its value.
Quantized review of Murphy's Law:
	Everything goes wrong all at once.
O'Tooles Commentary:
	Murphy was an optimist.




Dave Stewart
Aqua~Flo Supply (Goleta CA)
dstewart at aquaflo dot com

A computer lets you make more mistakes
faster than any invention in human history
with the possible exceptions of handguns and tequila.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: Re: Xcode and PB Projects
  • Next by Date: EOF access with no lock warnings
  • Previous by thread: Re: Xcode and PB Projects
  • Next by thread: EOF access with no lock warnings
  • Index(es):
    • Date
    • Thread