Win a copy of liveProject: Protecting User Data with Spring Security and OAuth2 this week in the Spring forum!

Igor Sluge

Greenhorn
+ Follow
since Apr 21, 2021
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:"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
1 week 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
1 week 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?
1 week ago
JSF
Actually this tag has a namespace but to simplify the code I omitted it. I'm looking for tag definition...
1 week ago
JSF
Hello, this is custom tag defined by user and this is xhtml file
1 week 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"
1 week 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 weeks ago
JSF