Re: Create tabs using struts- URL does not work

2006-01-12 Thread Ashish Kulkarni
hi there
the short description URL
http://www.jroller.com/page/javadujour/20060110
does not work, give 403 error
Just one more question, i can i programmatically
decide which tab is to be displayed, for example, user
clicks a button on tab1 , can i open tab 2 and load
information and show it to user
Ashish

--- Michael Jouravlev [EMAIL PROTECTED] wrote:

 On 1/12/06, Wendy Smoak [EMAIL PROTECTED] wrote:
  On 1/12/06, Michael Jouravlev [EMAIL PROTECTED]
 wrote:
 
   Oops, bad URL for live demo. Here is the proper
 one:
  

http://www.superinterface.com/jspcontrols/tabcontrol/index.jsp
 
  Nice. :)  How would you you conditionally display
 each tab based on
  user role(s)?
 
 Right now there is no security-specific tag or
 attribute. What you can
 do now is either:
 
 * surround each tab with Struts/JSTL conditional
 tags, or
 * create a tag/servlet that spits out only the tags
 that are
 appropriate for current component state (this would
 have to be my job,
 actually).
 
 For example, this is how the Tigris-style tabs can
 be defined
 (copy/paste style):
 
 === cut here ===
   table class=tabs border=0 cellspacing=0
 cellpadding=0
 tr
 
   %-- First tab is active --%
   c:if test='${empty currentTab || currentTab
 == tab1}'
 table class=tigristabs border=0
 cellspacing=0
   tr
 thjc:link event=tab1event
 value=Tab1 //th
 tdjc:link event=tab2event
 value=Tab2 //td
   /tr
 /table
   /c:if
 
   %-- Second tab is active --%
   c:if test='${currentTab == tab2}'
 table class=tigristabs border=0
 cellspacing=0
   tr
 tdjc:link
 event=tab1eventTab1/jc:link/td
 thjc:link
 event=tab2eventTab2/jc:link/th
   /tr
 /table
   /c:if
 /tr
   /table
 === cut here ===
 
 You can put whatever you want into JSTL condition.
 The tab component
 that I have now is more of a template that you can
 adjust for your
 content and design, than a parameterizable tag. If
 you interested, see
 this short intro:
 http://www.jroller.com/page/javadujour/20060110
 
 But nothing prevents me from putting this markup
 inside a Tab tag. I
 think I will do that, and I will add role
 attribute as well, just
 like you have in Struts Menu. Or do you want to have
 it in a different
 way? I am all ears :-)
 
 I am doing my releases step by step, hopefully it
 won't take long for
 1.0 version ;-) Thanks for heads up!
 
 Michael.
 

-
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Create tabs using struts- URL does not work

2006-01-12 Thread Michael Jouravlev
On 1/12/06, Ashish Kulkarni [EMAIL PROTECTED] wrote:
 hi there
 the short description URL
 http://www.jroller.com/page/javadujour/20060110
 does not work, give 403 error

This is weird. Works for me. Would you try once again? Just in case, I
attached the content of that page with this email.

 Just one more question, i can i programmatically
 decide which tab is to be displayed, for example, user
 clicks a button on tab1 , can i open tab 2 and load
 information and show it to user

Of course. The tab component works like any other component created
with the library. It has two phases: input (accept) and output
(render). On render phase you can check whatever conditions/objects
you need, and activate this or that tab. On input phase you handle an
event that comes from the tab and you can decide how to update your
domain model. If interested, please download the sample war file and
see the page source code:
https://sourceforge.net/project/showfiles.php?group_id=154342

Michael.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]