Hello;
I currently have a problem with my command button when I click on it here is the error
21/03/2020 à 14:10:51 : Initiating ajax request.
21/03/2020 à 14:10:51 : Form to post undefined.
21/03/2020 à 14:10:51 : URL to post undefined.
21/03/2020 à 14:10:51 : Post Data:javax.faces.partial.ajax=true&javax.faces.source=content%3Astep2%3Aconsommable_add%3Aj_idt67&javax.faces.partial.execute=content%3Astep2%3Aconsommable_add&javax.faces.partial.render=content%3Astep2&content%3Astep2%3Aconsommable_add%3Aj_idt67=content%3Astep2%3Aconsommable_add%3Aj_idt67
21/03/2020 à 14:10:51 : Response received succesfully.
21/03/2020 à 14:10:51 : DOM is updated.
21/03/2020 à 14:10:51 : Response completed.
U have idea why form post to undefined ?
Commandbutton form to post undefined
You have to post your XHTML code so we can see your button and form.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
i try then i have this error on post my code :
SQL ERROR [ mysqli ]
Incorrect string value: '\xE2\x82\xAC"/&...' for column 'post_text' at row 1 [1366]
You can download the file here, or if you want me to send it to you in other words me !
View : https://paste.ofcode.org/bpsGJQwDHzN4yALPYrtwR
download file : https://infra-build-echange.ovh/index.p ... onfCndSsWi
My form is : consommable_add
SQL ERROR [ mysqli ]
Incorrect string value: '\xE2\x82\xAC"/&...' for column 'post_text' at row 1 [1366]
You can download the file here, or if you want me to send it to you in other words me !
View : https://paste.ofcode.org/bpsGJQwDHzN4yALPYrtwR
download file : https://infra-build-echange.ovh/index.p ... onfCndSsWi
My form is : consommable_add
Your code looks OK to me. I wouldn't expect it to post to to unknown. Have you pressed F12 in Chrome and watched the network traffic?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
Yes,
Code: Select all
Request URL: http://localhost:8080/INFRA/facturation/DemandeAchat.do
Request Method: POST
Status Code: 200
Remote Address: [::1]:8080
Referrer Policy: no-referrer-when-downgrade
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 210
Content-Type: text/xml;charset=UTF-8
Date: Mon, 23 Mar 2020 09:44:44 GMT
Keep-Alive: timeout=20
Accept: application/xml, text/xml, */*; q=0.01
Accept-Encoding: gzip, deflate, br
Accept-Language: fr-FR,fr;q=0.9,en-US;q=0.8,en;q=0.7
Connection: keep-alive
Content-Length: 285
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Cookie: JSESSIONID=967151A4A99044E8DC53C6704B1CC273; _ga=GA1.1.724337351.1583915393; _gid=GA1.1.542276864.1584955885; _gat=1; verona_expandeditems=menuform%3Aj_idt22_2
Faces-Request: partial/ajax
Host: localhost:8080
Origin: http://localhost:8080
Referer: http://localhost:8080/INFRA/facturation/DemandeAchat.do
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36
X-Requested-With: XMLHttpRequest
javax.faces.partial.ajax: true
javax.faces.source: content:step2:consommable_add:j_idt68
javax.faces.partial.execute: content:step2:consommable_add
javax.faces.partial.render: content:step2
content:step2:consommable_add:j_idt68: content:step2:consommable_add:j_idt68
I don't know the rest of your app but .do is a strange extension to me like the old Struts application. I would expect to see a .XHTML or .JSF in the Post not .DO. Or have you mapped your .DO to be a JSF Extension in your web.xml?
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
Yes,
I attach my web.xml in case there is a problem there
And ty for ur help
I just deactivate rendered on each form and it works an idea why?
I attach my web.xml in case there is a problem there
And ty for ur help
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
<display-name>Infra Build</display-name>
<welcome-file-list>
<welcome-file>login.do</welcome-file>
<welcome-file>login.xhtml</welcome-file>
</welcome-file-list>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_REFRESH_PERIOD</param-name>
<param-value>-1</param-value>
</context-param>
<context-param>
<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>verona-bluegrey</param-value>
</context-param>
<context-param>
<param-name>primefaces.FONT_AWESOME</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
<param-value>/WEB-INF/primefaces-omega.taglib.xml</param-value>
</context-param>
<listener>
<listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
</listener>
<resource-env-ref>
<description>Object factory for the CDI Bean Manager</description>
<resource-env-ref-name>BeanManager</resource-env-ref-name>
<resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-env-ref-type>
</resource-env-ref>
<listener>
<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
</listener>
<filter>
<filter-name>Character Encoding Filter</filter-name>
<filter-class>org.primefaces.verona.filter.CharacterEncodingFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>Character Encoding Filter</filter-name>
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<error-page>
<error-code>400</error-code>
<location>/404.xhtml</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/404.xhtml</location>
</error-page>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error.xhtml</location>
</error-page>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.xhtml</url-pattern>
</servlet-mapping>
<mime-mapping>
<extension>ttf</extension>
<mime-type>application/font-sfnt</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff</extension>
<mime-type>application/font-woff</mime-type>
</mime-mapping>
<mime-mapping>
<extension>woff2</extension>
<mime-type>application/font-woff2</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eot</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
<extension>eot?#iefix</extension>
<mime-type>application/vnd.ms-fontobject</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg#exosemibold</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg#exobolditalic</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg#exomedium</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg#exoregular</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<mime-mapping>
<extension>svg#fontawesomeregular</extension>
<mime-type>image/svg+xml</mime-type>
</mime-mapping>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/login.do?reason=expired</location>
</error-page>
<session-config>
<session-timeout>30</session-timeout>
</session-config>
</web-app>
I just deactivate rendered on each form and it works an idea why?
Nope I need a reproducible test case using Primefaces Test: https://github.com/primefaces/primefaces-test
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1
-
- Information
-
Who is online
Users browsing this forum: No registered users and 44 guests