How to use facelets' ui:param in 8M1?
已回答
I have a JSF-managed session bean named selectContactSession. In my jsf page, I wrote
<ui:param name="model" value="#{selectContactSession.model}" />
Then IDEA cannot resolve the variable 'model'.
If I write
<c:set var="model" value="#{selectContactSession.model}" />
then IDEA understands what 'model' is.
I never use c:set in JSF so I'm not sure if I can replace all ui:param with it.
请先登录再写评论。
We have the same problem. Parameter cannot be resolved by IDEA in child pages.
Same problem here, parameter cannot be resolved in the same page.
Bug still exists after 12 years... It is really annoying, isn't there a fix available somehow? Or a way to tell JSF that the parameter is expected or something without usind the c:set tag? I don't want to directly insert JSP tags into my application
There is no workaround, unfortunately.
Here is the bug request for that: https://youtrack.jetbrains.com/issue/IDEA-63450
You can vote for it to be notified once there are updates. Your comments inside are also welcome.
Actually, I found a workaround:
You can change your facelet from something like this:
to something like this:
So, you basically just have to add this macro/comment/whatever and change the id and type accordingly, but this shouldn't be the only way