myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Korherr (JIRA)" <...@myfaces.apache.org>
Subject [jira] Commented: (MYFACES-2479) custom behavior makes form not to be submitted
Date Sat, 09 Jan 2010 14:28:54 GMT

    [ 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.


Mime
View raw message