[Opensource] links in expresso
Brian Rook
brian.rook at xor.com
Wed Jul 24 09:55:16 PDT 2002
As for the first part:
>Well, there's lots of ways to do it... html:link is one of them...
>expresso:TransitionTag is another easy way to create buttons. Another way
is:
>
><bean:define id="url" property="yourTransition.url"/>
><bean:define id="label" property="yourTransition.label"/>
>
>Then you can do your html anchor with the appropriate labels, etc.
This would be nice, but its also what I'm trying to avoid. Transitions are
nice because they have everything they need in order to move around. I want
to avoid yanking data out of them to make beans to make hrefs. That's what
I like about the transitionTag, you just give it the name and it makes
everything you need. However, I can't use (actually, don't want to use)
buttons, because they're big and clunky and there are places where
hyperlinks just work better.
I really like the transition tag, for buttons, but I wanted a tag that did
the same thing, except made a link. I was just wondering if anyone had
already made one yet and I just missed it (taglib docs are not as complete
as I'd like, but I understand that you guys are trying to fix that). I'm
planning on making a link tag, and will probably be borrowing heavily from
transitionTag.
Thanks for the heads up and i'll post my code here when I get it finished.
b
-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of Michael Rimov
Sent: Wednesday, July 24, 2002 1:30 AM
To: opensource at jcorporate.com
Subject: Re: [Opensource] links in expresso
At 11:20 AM 7/23/2002 -0600, you wrote:
>Is there a way to create links in expresso? I'm not really interested in
>using the struts html:link tag. I've been thinking that you should be able
>to create links from transition objects. Has anyone done anything like
>this?
Well, there's lots of ways to do it... html:link is one of them...
expresso:TransitionTag is another easy way to create buttons. Another way
is:
<bean:define id="url" property="yourTransition.url"/>
<bean:define id="label" property="yourTransition.label"/>
Then you can do your html anchor with the appropriate labels, etc.
>Benefits:
>1) You could setup your query string with the .addParam() and
>.getParamString() methods.
>2) All the transitions are controlled by your controller now
Using the results above, you get the same results unless I'm
misunderstanding the question.
>Questions:
>Using transitions for forms you have to specify the path to the controller
>in the form action attribute (i.e. form action="/myApp/Controller.do") How
>would you do this in a link tag?
TransitionTag will do all that automatically for you. Take a look at it
and let us know if it helps.
-Mike
_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/
More information about the Opensource
mailing list