If you ask me, it would have been a better decision to copy logic from the getLink() method from Form rather than trying to reconsitute the url with javascript (I fully agree that the getLink() method should be protected, not private).
This component will be broken for the similar reasons when migrating to Tapestry 3.1.
Paul
Viktor Szathmary wrote:
hi,
the PartialForm relies on a nasty, evil hack, because i was lazy :) overriding the base tapestry Form component's service link generating behavior is not currently possible without copypasting the entire sourcecode... so what i ended up doing is a dynamic substitution in the javascript:
// crazy replacement var s = values["service"].split("/");
s[0] = "partial";
if (s.length==4) s.splice(3,0,s[2]);
s = s.concat(parts);
values["service"] = s.join("/");
so this turns the value of the "service" hidden param from something like
direct/1/FooPage/$Form
to
partial/1/FooPage/FooPage/$Form (plus the part IDs)
which is what we really needed in the first place. This is ugly, but still seemed less gruesome than copypasting the entire Form implementation just to override 3 lines...
I'm not familiar with the operation of the "friendly urls" patch, so I don't have any immediate suggestions, but I can look into this later... in the meantime, I'm open for suggestions as to how to alter the service link rendering behavior in Form without serious copypasting.. I guess the best would be to submit a patch for Tapestry 3.0.4 that makes the offending method in Form.java protected instead of private:
private ILink getLink(IRequestCycle cycle, String actionId) { ... }
that's all I would need to override :) commiters?
regards, viktor
On Apr 12, 2005 2:42 PM, Jamie <[EMAIL PROTECTED]> wrote:
Has anyone got these working in a Friendly URLs patch to 3.0.3? I've
tried the PartialForm on a couple of my pages and nothing happens at all
(no errors, nothing logged, etc). I've got the Parts with IDs, and the
PartialForm--but no submission seems to take place and I'm getting no
errors. I've run the tacos example war in the same server with no problem.
Thanks, Jamie
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
