RE: How to have a WOHyperlinks Functionality inside a Java String
RE: How to have a WOHyperlinks Functionality inside a Java String
- Subject: RE: How to have a WOHyperlinks Functionality inside a Java String
- From: "Ruenagel, Frank" <email@hidden>
- Date: Fri, 10 Jun 2005 13:09:13 +0200
We do something similar with hierarchical
java-applet-awt-menus which call component actions.
They are build up as mere strings (no Template).
The central idea is to append form-values ("?id=342")
to the WOAction-URL-String, which calls a component action.
The WOActionURL itself is encapsulated in a little javascript function;
in the repetition itself do not appear any URLs, but
only javascript-calls. The javascript function
takes a parameter, which identifies the row. This
identifier is appended to the WOActionURL, which is called
by the javascript-function (and only there).
For example:
function submittestatus(myStatusID)
{
document.forms[0].action ="<WEBOBJECT NAME=ActionURL1></WEBOBJECT>" +
'?statusID=' + myStatusID;
// or: window.location.href ?
document.forms[0].submit();
return false;
}
In your WOAction you simply use:
String myStatus = (String)
this.context().request().formValueForKey("statusID");
Frank
> -----Original Message-----
> From: email@hidden [mailto:email@hidden]
> Sent: Friday, June 10, 2005 10:13 AM
> To: email@hidden; email@hidden
> Subject: RE: How to have a WOHyperlinks Functionality inside a Java
> String
>
>
> Hi!
>
> You really should investigate doing this in the template. It
> will be much less trouble.
>
> If really this cannot be done, you will need to generate URLs
> with unique element IDs. These elements will appear as sender
> IDs in your invokeAction action methods in an upcoming
> request-response loop. There you will have to react upon the
> click on such a link.
>
> You might want to look at the source of WOLongResponsePage
> for such a use of a custom element ID.
>
> Pierre
>
> -----Original Message-----
> From: webobjects-dev-bounces+pierre.bernard=email@hidden
> [mailto:webobjects-dev-bounces+pierre.bernard=email@hidden
> le.com]On
> Behalf Of Ute Hoffmann
> Sent: Friday, June 10, 2005 10:03 AM
> To: email@hidden
> Subject: How to have a WOHyperlinks Functionality inside a Java String
>
>
> Hallo,
> I'm looking for something like WOActionURL, but for use not in a
> template with a .wod binding but in a java String.
>
> This is what I need to do:
> I have a repetition, which generates a string. In this string
> some URL
> should be generated as well, which performs a action and returns a
> WOComponent depending on where the URL is placed in the repetition
> (Which element is currently active). This string is a table but is
> represented in the component as a string element and it will contain
> several such hyperlinks, their numer ect completely dynamic.
>
> I think I did something like that before, but it was a long time ago
> and that there was a function I could use in the WO frameworks, but I
> do not recall what it was. It needs to create a WOHyperlink in a
> string. I would prefer not to have a direct action, though I
> know how
> to do this with a direct action.
>
> Any idea?
>
> Thanks,
>
> Ute
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
.de
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