Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
The case is that on second container initialisation we do not create
singletons upfront ... I have tried to change that but got some problems, not
sure why. I must re-think how we initialise Str
Github user yasserzamani commented on the issue:
https://github.com/apache/struts/pull/153
> Thanks a lot :) I see now what's going on but have no idea why :\
@lukaszlenart , as I debug, the trace is `object factory creation` then
`set1 (inject it's 1st property)` then `set2 (
Github user yasserzamani commented on the issue:
https://github.com/apache/struts/pull/153
:) Yes I know, just a bit worry about backward compatibility between minor
versions.
I also am studying your sample and @lukaszlenart 's pr to understand what
is going on as I think sam
Github user aleksandr-m commented on the issue:
https://github.com/apache/struts/pull/153
@yasserzamani Looks like a hack :) I would rather leave as it is, then to
introduce that. If container is needed then it **should** be injected in the
constructor. Take a look at spring object f
Github user yasserzamani commented on the issue:
https://github.com/apache/struts/pull/153
@aleksandr-m , I modified `ObjectFactory` as below
```java
...
private List myPrivateInjectQueue;
...
@Inject
public void setContainer(Container container)
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
Thanks a lot :) I see now what's going on but have no idea why :\
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project
Github user aleksandr-m commented on the issue:
https://github.com/apache/struts/pull/153
Sure. No problem.
Test project -
https://github.com/aleksandr-m/struts2-objectfactory-container/
This commit adds custom date converter -
https://github.com/aleksandr-m/struts2-
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
I don't see any other options now to merge this. @aleksandr-m could you
prepare that example app? I will be able to investigate what's wrong with my
solution ;-)
---
If your project is set up
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
Would it be possible to share an application that replicates this
behaviour? Sorry for bothering you but I want to understand what's going on :)
---
If your project is set up for it, you can re
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
> With the new code in #155 the custom type converter isn't initialized at
all. :(
w00t!
---
If your project is set up for it, you can reply to this email and have your
reply appear on
Github user aleksandr-m commented on the issue:
https://github.com/apache/struts/pull/153
With the new code in #155 the custom type converter isn't initialized at
all. :(
Call trace of previous code in #155
```
---
If your project is set up for it, you can reply to this
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
I have changed code a bit, can you try to test it on your side?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project do
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
... but where the `ObjectFactory#buildBean` is called? It should only be
called when building non-internal beans and when all the internal beans were
already instantiated. Can you post a call tr
Github user aleksandr-m commented on the issue:
https://github.com/apache/struts/pull/153
It isn't about `XWorkConverter` per se. In #155 the injection of
`ConversionPropertiesProcessor` still happens and `TypeConverterCreator` is
injected next and `ObjectFactory#buildBean` is called
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
See these screenshots
master
![2017-08-01_2119](https://user-images.githubusercontent.com/170103/28842993-f915533e-76ff-11e7-8434-09d2404f.png)
this branch
Github user aleksandr-m commented on the issue:
https://github.com/apache/struts/pull/153
Ubuntu, oracle jdk8.
If following code prints `setContainer` before other setters (especially
before `setInterceptorFactory`) it will work. On Ubuntu using oracle jdk8
`setContainer` is
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
One more question: JDK version?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
(on OSX)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if t
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
hm... but this example works for both branches - `master` and this:
```
DateConverter.convertToString()
localizedTextProvider=com.opensymphony.xwork2.util.StrutsLocalizedTextProvider@342e
Github user aleksandr-m commented on the issue:
https://github.com/apache/struts/pull/153
Nope, #155 doesn't seem have any effect.
Add following files to project, run under *nix, execute some action which
lead to the JSP, `localizedTextProvider` should not be `null` in system
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
I have opened #155 - what do you think? @aleksandr-m can you test it
locally as I do not have the exact setup.
---
If your project is set up for it, you can reply to this email and have your
re
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
Hm... give me few minutes, maybe I will be able add support for it ;-)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your pro
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
I'm not sure if this is a good idea ... basically we need a
`@PostConstruct` mechanism in Struts DI - this can be easily achieved by
switching to Guice 3 and using CDI annotations.
---
If your
Github user yasserzamani commented on the issue:
https://github.com/apache/struts/pull/153
To keep `backward-compatible` if is very important, I think we may have
following:
```java
protected Object injectInternalBeans(Object obj) {
if (obj != null) {
Github user lukaszlenart commented on the issue:
https://github.com/apache/struts/pull/153
No better idea and I think we can assume when you need to inject the
`Container` you should always do it in a constructor.
---
If your project is set up for it, you can reply to this email and
25 matches
Mail list logo