Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Néstor Boscán
Great tip Wes!

Found the solution:

ConfigurationManager configurationManager = new
ConfigurationManager();
OgnlValueStackFactory factory = new OgnlValueStackFactory();
configurationManager.addContainerProvider(new
XWorkConfigurationProvider());

 configurationManager.getConfiguration().getContainer().inject(factory);
ValueStack stack = factory.createValueStack();

Regards,

Néstor Boscán

On Fri, Jan 15, 2010 at 4:39 PM, Wes Wannemacher  wrote:

> One thing I've done in the past to figure things out is to just check
> the unit tests. I'd imagine there are some tests for the
> ValueStackFactory somewhere and they might give you some clues on how
> to bootstrap an instance.
>
> -Wes
>
> 2010/1/15 Néstor Boscán :
> > Thanks for the Reply
> >
> > I know that ValueStack is part of XWork. I checked the code there is an
> > OgnlValueStack and a OgnlValueStackFactory. But when I try to use
> > OgnlValueStackFactory I get:
> >
> > java.lang.IllegalArgumentException: Wrapped type converter cannot be null
> >
> > So I try to set the XWorkTypeConverter but I don't know how to instante
> it.
> >
> > Regards,
> >
> > Néstor Boscán
> >
> > 2010/1/15 Rafał Krupiński 
> >
> >> On 15.01.2010 21:25, Néstor Boscán wrote:
> >>
> >>> Hi
> >>>
> >>> I wish to access or create the ValueStack from outside Struts 2 so I
> can
> >>> apply the expression language and conversion properties of OGNL to
> create
> >>> some reportes. Is this possible?
> >>>
> >>
> >> ValueStack is part of XWork, so it's possible.
> >>
> >> -
> >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> >> For additional commands, e-mail: user-h...@struts.apache.org
> >>
> >>
> >
>
>
>
> --
> Wes Wannemacher
>
> Head Engineer, WanTii, Inc.
> Need Training? Struts, Spring, Maven, Tomcat...
> Ask me for a quote!
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Wes Wannemacher
One thing I've done in the past to figure things out is to just check
the unit tests. I'd imagine there are some tests for the
ValueStackFactory somewhere and they might give you some clues on how
to bootstrap an instance.

-Wes

2010/1/15 Néstor Boscán :
> Thanks for the Reply
>
> I know that ValueStack is part of XWork. I checked the code there is an
> OgnlValueStack and a OgnlValueStackFactory. But when I try to use
> OgnlValueStackFactory I get:
>
> java.lang.IllegalArgumentException: Wrapped type converter cannot be null
>
> So I try to set the XWorkTypeConverter but I don't know how to instante it.
>
> Regards,
>
> Néstor Boscán
>
> 2010/1/15 Rafał Krupiński 
>
>> On 15.01.2010 21:25, Néstor Boscán wrote:
>>
>>> Hi
>>>
>>> I wish to access or create the ValueStack from outside Struts 2 so I can
>>> apply the expression language and conversion properties of OGNL to create
>>> some reportes. Is this possible?
>>>
>>
>> ValueStack is part of XWork, so it's possible.
>>
>> -
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>
>



-- 
Wes Wannemacher

Head Engineer, WanTii, Inc.
Need Training? Struts, Spring, Maven, Tomcat...
Ask me for a quote!

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



Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Néstor Boscán
Thanks for the Reply

I know that ValueStack is part of XWork. I checked the code there is an
OgnlValueStack and a OgnlValueStackFactory. But when I try to use
OgnlValueStackFactory I get:

java.lang.IllegalArgumentException: Wrapped type converter cannot be null

So I try to set the XWorkTypeConverter but I don't know how to instante it.

Regards,

Néstor Boscán

2010/1/15 Rafał Krupiński 

> On 15.01.2010 21:25, Néstor Boscán wrote:
>
>> Hi
>>
>> I wish to access or create the ValueStack from outside Struts 2 so I can
>> apply the expression language and conversion properties of OGNL to create
>> some reportes. Is this possible?
>>
>
> ValueStack is part of XWork, so it's possible.
>
> -
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
>
>


Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Rafał Krupiński

On 15.01.2010 21:25, Néstor Boscán wrote:

Hi

I wish to access or create the ValueStack from outside Struts 2 so I can
apply the expression language and conversion properties of OGNL to create
some reportes. Is this possible?


ValueStack is part of XWork, so it's possible.

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



Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Néstor Boscán
Hi

I wish to access or create the ValueStack from outside Struts 2 so I can
apply the expression language and conversion properties of OGNL to create
some reportes. Is this possible?

Regards,

Néstor Boscán