just implement interface "ServletRequestAware" and
ensure you has config "servlet-config" interceptor in
your action mapper.

regards
joey




On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

[EMAIL PROTECTED] wrote:
> joey wrote:
>> add request.setAttribute("invoices",accountBean.getInvoices()) in your
>> action execute method.

How do I do this is struts 2. I couldn't find any way to get my hand on
the Request object.

>> On 4/7/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>
>
> I thought that was set automatically by struts through the getters !
>
>
>>> OK, let me include more details, may be someone will understand what I
>>> am talking about.
>>> I have a list that belongs to  a Bean that's wet in an action class.
>>>
>>> public AccountBean getAccountBean() {
>>>     return accountBean;
>>> }
>>>
>>> AccountBean has an ArrayList<Invoices>  calles invoices.
>>>
>>> now im my jsp, I need to display this in a datagrid, I am doing this,
>>> but it's not working:
>>>
>>>
>>>
>>> <dg:dataGrid items="${accountBean.invoices}" var="inv"
>>> name="datagrid1" >
>>> <columns>
>>> <column>
>>> <header value="Name" />
>>> <item value="${inv.statementDate}" />
>>> </column>
>>> </dg:dataGrid>
>>>
>>>
>>> that's the error  I am getting:
>>>
>>> According to TLD or attribute directive in tag file, attribute items
>>> does
>>> not accept any expressions
>>>         org.apache.struts2.dispatcher.Dispatcher.serviceAction(
>>> Dispatcher.java:518)
>>>         org.apache.struts2.dispatcher.FilterDispatcher.doFilter(
>>> FilterDispatcher.java:421)
>>>
>>>
>>> Any Idea ??
>>>
>>>
>>>
>>>
>>> [EMAIL PROTECTED] wrote:
>>> > I have a bean that is set in an action class. I can access it using
>>> > struts tag, but what do I do if I need to access it from somewhere
>>> else
>>> ?
>>> >
>>> > for example, if I need to access it from a list iterator.
>>> >
>>> > Thanks.
>>> >
>>> >
>>> >
>>> >
---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> > For additional commands, e-mail: [EMAIL PROTECTED]
>>> >
>>> >
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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


Reply via email to