I am in the process of evaluating dynaForm to see if it suits my needs. And so far it looks very promising - good work!
One problem that bothers me:
I've got a composite component for editing a date. It uses a specific converter.
But when I submit the form for the first time I couldn't get the date value set in my model. The converter doesn't get called.
The submit action returns null so I stay on the same view. Now further submits always call the appropriate converter and the correct value is set in my model.
If I move this date component out of the dynaForm but still in the same form it works correctly - also on the first submit.
Any idea?
--Heiko
DynaForm: Problem with first submit
Hi, I can nothing tell you without to see your code snippet. Post the code here please. Do you use the converter in a composite component? Does it work without composite comp., but still within DynaForm?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
After several attempts I found out that the composite component works if I do not include two scripts that are used inside the compsite component:
As I don't see any javascript errors in the browser console I think these scripts also come along with some other component used in the view. I will check...
But still there seems to be a problem with scripts used in composite components which in turn are used in dynaForms - does this sound reasonable?
Code: Select all
...
<composite:implementation>
<h:outputScript name="dateTime.js" library="javascript" target="head" />
<h:outputScript name="calendarTranslations.js" library="javascript" target="head" />
...
But still there seems to be a problem with scripts used in composite components which in turn are used in dynaForms - does this sound reasonable?
Using
Primefaces 11.0.1
Extensions 11.0.4
Mojarra 2.3.14.SP01
Wildfly 21.0.2.Final
Primefaces 11.0.1
Extensions 11.0.4
Mojarra 2.3.14.SP01
Wildfly 21.0.2.Final
Difficult to say. I would not include scripts within any components, but from the JSF point of view it's allowed to do in composite components. Maybe you can place h:outputScript outside of composite component? What is the generated HTML, where the scripts are rendered? In head?
PrimeFaces Cookbook (2. edition): http://ova2.github.io/primefaces-cookbook/ Learning Angular UI Development with PrimeNG: https://github.com/ova2/angular-develop ... th-primeng Blog: https://medium.com/@OlegVaraksin
Yes, the scripts are included in head.
I tried to conditionally include the component scripts via "rendered" attribute. But that didn't work.
But using "c:if" around the script inclusions seems to solve the problem. This way I can use my components incl. scripts as before and without scripts in case of using them inside dynaForm. Though I have to say I hate to use "c:if" as that may cause a lot of other problems.
I tried to conditionally include the component scripts via "rendered" attribute. But that didn't work.
But using "c:if" around the script inclusions seems to solve the problem. This way I can use my components incl. scripts as before and without scripts in case of using them inside dynaForm. Though I have to say I hate to use "c:if" as that may cause a lot of other problems.
Using
Primefaces 11.0.1
Extensions 11.0.4
Mojarra 2.3.14.SP01
Wildfly 21.0.2.Final
Primefaces 11.0.1
Extensions 11.0.4
Mojarra 2.3.14.SP01
Wildfly 21.0.2.Final
-
- Information
-
Who is online
Users browsing this forum: No registered users and 20 guests