You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org> on 2010/01/09 12:58:54 UTC
[jira] Created: (MYFACES-2479) custom behavior makes form not to be
submitted
custom behavior makes form not to be submitted
----------------------------------------------
Key: MYFACES-2479
URL: https://issues.apache.org/jira/browse/MYFACES-2479
Project: MyFaces Core
Issue Type: Bug
Affects Versions: 2.0.0-alpha
Reporter: Matthias Weßendorf
Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
Java:
package net.wessendorf;
import javax.faces.component.behavior.ClientBehaviorBase;
import javax.faces.component.behavior.ClientBehaviorContext;
import javax.faces.component.behavior.FacesBehavior;
@FacesBehavior("net.wessendorf.Confirm")
public class ConfirmBehavior extends ClientBehaviorBase
{
@Override
public String getScript(ClientBehaviorContext behaviorContext)
{
return "return confirm('Really')";
}
}
taglib.xml:
<facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
version="2.0">
<namespace>http://wessendorf.net/behavior</namespace>
<tag>
<tag-name>confirm</tag-name>
<behavior>
<behavior-id>net.wessendorf.Confirm</behavior-id>
</behavior>
</tag>
</facelet-taglib>
XHTML file:
<h:commandButton value="click me">
<wessi:confirm />
</h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798335#action_12798335 ]
Matthias Weßendorf commented on MYFACES-2479:
---------------------------------------------
rendered output:
<input id="j_id1432746711_cec58d3" name="j_id1432746711_cec58d3" type="submit" value="click me" onclick="jsf.util.chain(document.getElementById('j_id1432746711_cec58d3'), event,'return confirm(\'Really\')');return false;" />
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798363#action_12798363 ]
Jakob Korherr commented on MYFACES-2479:
----------------------------------------
How funny, I just tested the same thing!
On my opinion, jsf.util.chain() should be changed to return the return value of the last executed function.
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12800158#action_12800158 ]
Jakob Korherr commented on MYFACES-2479:
----------------------------------------
posted in jsr-314-public forum:
http://wiki.jcp.org/boards/index.php?t=3206
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798361#action_12798361 ]
Jakob Korherr commented on MYFACES-2479:
----------------------------------------
to accomplish what you want, jsf.util.chain(...) would have to return the value from the last function, which it (per specification) does not.
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe resolved MYFACES-2479.
-------------------------------------
Assignee: Leonardo Uribe
Fix Version/s: 2.0.0
Resolution: Fixed
This was solved on 2.0.0, as part of MYFACES-2353. I tried the example and with the latest code works.
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
> Assignee: Leonardo Uribe
> Fix For: 2.0.0
>
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798359#action_12798359 ]
Matthias Weßendorf commented on MYFACES-2479:
---------------------------------------------
So,
when something like this is rendered:
<input id="j_id1432746711_cec58d3" name="j_id1432746711_cec58d3" type="submit" value="click me" onclick="jsf.util.chain(document.getElementById('j_id1432746711_cec58d3'), event,'return confirm(\'Really\')');" />
and I click the "Cancel" button on the JS-Confirm is still submits the button :-)
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798337#action_12798337 ]
Matthias Weßendorf commented on MYFACES-2479:
---------------------------------------------
question is: why "return false;" :-)
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798358#action_12798358 ]
Matthias Weßendorf commented on MYFACES-2479:
---------------------------------------------
Even if I do that, and (in my case - confirm() JS) I click the confirm CANCEL button, the form get's submitted.
So the jsf.util.chain() needs some help here too :-)
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798377#action_12798377 ]
Matthias Weßendorf commented on MYFACES-2479:
---------------------------------------------
not sure if something like
onclick="return jsf.util.chain(.....);" will break the spec...
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798342#action_12798342 ]
Jakob Korherr commented on MYFACES-2479:
----------------------------------------
>From my point of view return false should only be appended if ClientBehaviorHint.SUBMITTING is included in ClientBehavior.getHints()
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Michael Kurz (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798362#action_12798362 ]
Michael Kurz commented on MYFACES-2479:
---------------------------------------
Interesting enough, this problem also seems to exist in Mojarra. I tried something very similiar a few weeks ago. With only one behavior Mojarra behaves correctly but with two behaviors (I simply added two confirm child tags) jsf.util.chain is used and it stops working, too.
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (MYFACES-2479) custom behavior makes form not to
be submitted
Posted by "Matthias Weßendorf (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-2479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12798369#action_12798369 ]
Matthias Weßendorf commented on MYFACES-2479:
---------------------------------------------
I agree with Jakob;
> custom behavior makes form not to be submitted
> ----------------------------------------------
>
> Key: MYFACES-2479
> URL: https://issues.apache.org/jira/browse/MYFACES-2479
> Project: MyFaces Core
> Issue Type: Bug
> Affects Versions: 2.0.0-alpha
> Reporter: Matthias Weßendorf
>
> Attaching a simple behavior to a h:commandbutton makes the form to no longer submit it.
> Java:
> package net.wessendorf;
> import javax.faces.component.behavior.ClientBehaviorBase;
> import javax.faces.component.behavior.ClientBehaviorContext;
> import javax.faces.component.behavior.FacesBehavior;
> @FacesBehavior("net.wessendorf.Confirm")
> public class ConfirmBehavior extends ClientBehaviorBase
> {
> @Override
> public String getScript(ClientBehaviorContext behaviorContext)
> {
> return "return confirm('Really')";
> }
> }
> taglib.xml:
> <facelet-taglib xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd"
> version="2.0">
> <namespace>http://wessendorf.net/behavior</namespace>
> <tag>
> <tag-name>confirm</tag-name>
> <behavior>
> <behavior-id>net.wessendorf.Confirm</behavior-id>
> </behavior>
> </tag>
> </facelet-taglib>
> XHTML file:
> <h:commandButton value="click me">
> <wessi:confirm />
> </h:commandButton>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.