Hi all.

In my Struts2 application, I have a collection of Customer objects, and various 
users have the rights to edit some of them and not others.  I have created a 
Struts iterator tag, and in the iterator, I put the various Customer attributes 
into an HTML table.  All this works.

In one cell of the table, I have the string "Edit", and if it's clicked, it 
goes to another Action class to edit that particular Customer object.  All that 
works too.

What I want to do is only show the "Edit" string if the user has the right to 
edit that Customer.  I'm trying to set a "<s:if" tag to do this, but I am sure 
I'm not doing it right (because it's not working).

I am trying:

<s:if test="%{user.canEditCustomer(<s:property>)}">

hoping "property" is the current object in the iteration.  But whatever is 
happening, this doesn't do what I hope it does.  Am I anywhere close to the 
right solution here?

Thanks,
Dennis


      

Reply via email to