You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Micael <ca...@harbornet.com> on 2003/04/16 07:52:03 UTC

populating the value

How would one populate the values in the following sort of code for 
<logic:iterate>?

<logic:iterate id='mmuser' name='<%= Constants.USERS %>'>
                       <tr>
                         <td>
                           <html:radio property='username' 
value='[   ?????   ]'/>&nbsp;<b><bean:write name='mmuser' property='name'/></b>
                           <% number++; %>
                         </td>
                         <!--td>
                           <b><bean:write name='mmuser' 
property='username'/></b>
                         </td-->
                       </tr>
                       </logic:iterate>

Thanks for any assistance.  Everything I have tried except the old <%= 
blahblah %> has not worked.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: populating the value

Posted by Kwok Peng Tuck <pe...@makmal.net>.
In this :
<logic:iterate id='mmuser' name='<%= Constants.USERS %>'>

the 'name' attribute refers to the name of the jsp bean cotaining the 
collection to be iterated if the 'property' attribute
is not specified.

The 'property' attribute refers to the name of the 'property' of the JSP 
bean  specified by the name, whose getter returns
the collection to be iterated.

You can get info on the tags here :
 http://jakarta.apache.org/struts/userGuide/struts-logic.html#iterate

I think there is a iterate example in few of the struts examples. Have a 
look around.




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Design] BaseAction hierarchy

Posted by Richard Stack <ri...@rogers.com>.
DispatchAction is a subclassof Action. Have your BaseAction subclass
DispatchAction call it NewBaseAction. NewBaseAction can now contain
everything in BaseAction and BaseDispatchAction. All the other actions
would sub-class NewBaseAction.

Richard  

Affan Qureshi wrote:
> 
> I have a BaseAction which extends o.a.s.a.Action and has a few common
> methods to be used by hundred other actions. But for actions that implement
> DispatchAction I have to create another BaseDispatchAction class to hold the
> common functionality for all DispatchActions. Is there a way to avoid this
> duplication?
> 
> Thanks,
> Affan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: [Design] BaseAction hierarchy

Posted by Navjot Singh <na...@net4india.net>.
i also ran into the same problems few days ago but believe me i found no
other solution to this problem.


----- Original Message -----
From: "Affan Qureshi" <qu...@etilize.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, April 16, 2003 11:51 AM
Subject: [Design] BaseAction hierarchy


| I have a BaseAction which extends o.a.s.a.Action and has a few common
| methods to be used by hundred other actions. But for actions that
implement
| DispatchAction I have to create another BaseDispatchAction class to hold
the
| common functionality for all DispatchActions. Is there a way to avoid this
| duplication?
|
| Thanks,
| Affan
|
|
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: struts-user-help@jakarta.apache.org
|
|


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


[Design] BaseAction hierarchy

Posted by Affan Qureshi <qu...@etilize.com>.
I have a BaseAction which extends o.a.s.a.Action and has a few common
methods to be used by hundred other actions. But for actions that implement
DispatchAction I have to create another BaseDispatchAction class to hold the
common functionality for all DispatchActions. Is there a way to avoid this
duplication?

Thanks,
Affan


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org