Igor Sluge

Greenhorn
+ Follow
since Apr 21, 2021
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Igor Sluge

Tim Holloway wrote:Injection (managed=true) does not work if you're not using a full-stack webapp server. If you're using Tomcat (or jetty), you have to add in extra mechanisms to support @Inject features.


Hello, thanks a lot for the clarification. Could you please specify what should be done for that in case of TomCat 9?
2 years ago
JSF
Hello,
I found on stackoverflow exactly the my problem: https://stackoverflow.com/questions/57552085/custom-converter-with-attributes-injection-not-working-with-anymore-after-upgrad
Where to put "managed=true " to make it works? But with "managed=true" injection for instance no longer works
2 years ago
JSF

Tim Holloway wrote:"managed=true" indicates that CDI should be used instead of legacy injection.

Have you tried injecting @ManagedProperty's into the converter: https://stackoverflow.com/questions/8675831/inject-managed-bean-property-into-custom-converter ?



Hello, unfortunately it's not acceptable for be because I need to pass current values of the #{item.name} to the converter. Bean can't help me in that case
2 years ago
JSF

Tim Holloway wrote:You're probably right. Have you checked by hard-coding the EL values just to be sure?

I'm thinking that the context of a converter bean makes EL impossible to use. Basically, you're looking at a single object instance (referenced by name) that is designed to be shared not only within a webapp user, but potentially between multiple webapp users concurrently. So the property injections would have to be done at construction time and not change thereafter.

People have had similar problems with the "id=" JSF attribute. They think that everything can be EL, and that's not 100% true.



It looks like it's required to put “managed=true” somewhere
2 years ago
JSF

Igor Sluge wrote:Actually this tag has a namespace but to simplify the code I omitted it. I'm looking for tag definition...



Hello, the actual tag definition is:



The problem with the code


is that only the hardcoded value "beanName" is transferred to the converter's code but all values that using EL don't transfer from JSF 2.3. Is any way to fix that?
2 years ago
JSF
Actually this tag has a namespace but to simplify the code I omitted it. I'm looking for tag definition...
2 years ago
JSF
Hello, this is custom tag defined by user and this is xhtml file
2 years ago
JSF
Hello, thanks a lot for your response

I use Tomcat 9.0.

I use the following tag for converter:


and my converter inhered from Converter<Object>

The problem is that limitation doesn't pass to the converter class. And I don't use "managed=true"
2 years ago
JSF
Hello,

I use in my code JSF 1.9 and custom converter with arguments.
Now I update JSF to 2.3 (jakarta.faces-2.3.14.jar) and found that custom converters stop working because converter arguments (constraints) are not passed to the converter. I found that I need to use "managed=true" but in this case injection stops working. Is any way to make custom converters works in JSF 2.3?
2 years ago
JSF