Hi Mark,
> Let's say my action url is:
> http://www.server.com/anEvent.event?param1=val1
>
> Now, I create a BLink:
> BLink link = new BLink("text", url);
>
> My problem is that link.getParams() well, returns... null :-(
> I would expect (an d hoped) that the passed url would be parsed, and
> thus that getParams() would return a Map with one key/value pair:
> key:param1; value:val1
>
> In my code, I need to know if a parameter already exists, but BLink
> due to its behaviour of not parsing action URL can not help me.
Ah, I see. Couple of thoughts...
1. if you set your URL to simply be anEvent, and then manualy added the
params, then things would work (but you knew that)
2. org.enhydra.barracuda.plankton.http.HttpConverter does provide a
convenient mechanism for moving between a URL param string and a map, and
vica versa.
3. I'd be willing to consider modifying BLink so that getParam would show
parameters in the text url.
Of course none of these solve your immediate problem, but they do illustrate
that a solution wouldn't be all that hard to reach.
Christian
----------------------------------------------
Christian Cryder [christianc@xxxxxxxxxxxxxx]
Internet Architect, ATMReports.com
Barracuda - http://barracudamvc.org
----------------------------------------------
"Coffee? I could quit anytime, just not today"
> -----Original Message-----
> From: xmlc-admin@xxxxxxxxxxx [mailto:xmlc-admin@xxxxxxxxxxx]On Behalf Of
> Mark van Leeuwen
> Sent: Thursday, March 06, 2003 4:32 AM
> To: xmlc@xxxxxxxxxxx
> Subject: Re: Xmlc: Problem with setHref() encoding
>
>
> Christian Cryder wrote:
> > Hey Mark, are you using Barracuda components? If so, a BLink
> makes it pretty
> > easy to add params like you are talking about, and all the
> separators are
> > taken care of for you.
>
> Well, I tested it out, but unfortunely it does not fit my needs,
> because (as BAction), the actionURL is not parsed when constructed the
> object. To be clear, let me explain:
>
> Let's say my action url is:
> http://www.server.com/anEvent.event?param1=val1
>
> Now, I create a BLink:
> BLink link = new BLink("text", url);
>
> My problem is that link.getParams() well, returns... null :-(
> I would expect (an d hoped) that the passed url would be parsed, and
> thus that getParams() would return a Map with one key/value pair:
> key:param1; value:val1
>
> In my code, I need to know if a parameter already exists, but BLink
> due to its behaviour of not parsing action URL can not help me.
>
> However, this is a XMLC list, but this was certainly a Barracuda
> posting ;-)
>
> Anyway, thanks for the answers,
>
> Regards
>
> --
> Mark van Leeuwen
> Virgil B.V.
> Amsterdam
>
>
> _______________________________________________
> XMLC mailing list
> XMLC@xxxxxxxxxxx
> http://www.enhydra.org/mailman/listinfo.cgi/xmlc
|