tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Wood (JIRA)" <...@tapestry.apache.org>
Subject [jira] Created: (TAPESTRY-1405) EventListeners on RadioGroups don't fire asynchronously
Date Thu, 05 Apr 2007 17:43:32 GMT
EventListeners on RadioGroups don't fire asynchronously
-------------------------------------------------------

                 Key: TAPESTRY-1405
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1405
             Project: Tapestry
          Issue Type: Improvement
          Components: Core Components
    Affects Versions: 4.1.2
         Environment: java 1.5.0_07, osx 10.4.9
            Reporter: Julian Wood
            Priority: Minor


In the .html:

 <span jwcid="category@RadioGroup" displayName="literal:Category" selected="ognl:category">
   <input type="radio" jwcid="@Radio" value="ognl:@Category@VIDEO"/> Video
   <input type="radio" jwcid="@Radio" value="ognl:@Category@PROJECT"/> Project
   <input type="radio" jwcid="@Radio" value="ognl:@Category@OTHER"/> Other
 </span>

In the .java:

    @EventListener(events = "onclick", targets = "category", async = true, submitForm = "editTimeEventForm",
validateForm = false)
    public void categorySelected(IRequestCycle cycle)
    {
        log.info("Chose a category: " + getCategory());
    }

Nothing happens if you click on a radio button. It works fine if the RadioGroup component
is changed to a PropertySelection:

<select jwcid="category@PropertySelection" displayName="literal:Category" value="ognl:category"
model="ognl:categorySelectionModel">
   <option>Video</option>
   <option>Project</option>
   <option>Other</option>
 </select>

The latter includes some initialization js (while the former doesn't include any):

tapestry.cleanConnect(dojo.byId("category"), "onclick", "formEvent193333026");
tapestry.formEvent193333026=function(e){
    var content={beventname:"onclick"};
    tapestry.event.buildEventProperties(e, content);
    if (!content["beventtarget.id"]){
        content["beventtarget.id"]="category";
    }
    
   var validateState=tapestry.form.forms["editTimeEventForm"].validateForm;
   var validateForm=false;
   tapestry.form.setFormValidating("editTimeEventForm", validateForm);
   tapestry.form.submitAsync("editTimeEventForm", content);
   tapestry.form.setFormValidating("editTimeEventForm", validateState);
};
dojo.event.connect(dojo.byId("category"), "onclick", tapestry, "formEvent193333026");});

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message