tapestry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TAP5-2204) Select component fails if SelectModel doesn't exist on submit
Date Sat, 02 Nov 2013 16:05:18 GMT

    [ https://issues.apache.org/jira/browse/TAP5-2204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13812043#comment-13812043
] 

ASF subversion and git services commented on TAP5-2204:
-------------------------------------------------------

Commit b77b87ed1f5585e6ec481ccb60cd29a985291539 in branch refs/heads/master from [~bobharner]
[ https://git-wip-us.apache.org/repos/asf?p=tapestry-5.git;h=b77b87e ]

TAP5-2204: Change to allow "always", "never" or "auto" as "secure" param
value for Select component, with "auto" as the default.

> Select component fails if SelectModel doesn't exist on submit
> -------------------------------------------------------------
>
>                 Key: TAP5-2204
>                 URL: https://issues.apache.org/jira/browse/TAP5-2204
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.4
>            Reporter: George Christman
>            Assignee: Bob Harner
>
> The SelectModel is now being used on form render AND submission whereas it used to be
used only on render of the form. This is a big deal performance-wise because creation of the
SelectModel commonly involves a database query to populated a list of
> objects. 
> This appears to be a regression bug starting in 5.4.21.
> Nabble post 
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Re-T5-4-ajax-select-menu-bug-td5724142.html
> Sample code and stack trace. 
> Geoff example
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/selectmore1
> or
> <html t:type="layout" t:title="Select Demo" xmlns:t="
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
> xmlns:p="tapestry:parameter">
>     <form t:type="form">
>         <select t:type="select" t:id="computer" t:model="computerModels"
> t:zone="ajaxZone"/>
>         <t:zone t:id="ajaxZone" id="ajaxZone">
>             <select t:type="select"t t:id="monitor"
> t:model="monitorModels"/>
>         </t:zone>
>     </form>
> </html>
> public class SelectDemo {
>     @Property
>     private Computer computer;
>     @Property
>     private Monitor monitor;
>     @Property
>     private SelectModel computerModels;
>     @Property
>     private SelectModel monitorModels;
>     @Inject
>     private SelectModelFactory selectModelFactory;
>     @InjectComponent
>     private Zone ajaxZone;
>     @Inject
>     private Session session;
>     public void setupRender() {
>         List<Computer> computers =
> session.createCriteria(Computer.class).list();
>         computerModels = selectModelFactory.create(computers, "name");
>         monitorModels = selectModelFactory.create(new ArrayList<>());
>     }
>     Object onValueChangedFromComputer(Computer computer) {
>         List<Monitor> monitors =
> session.createCriteria(Monitor.class).add(Restrictions.eq("computer",
> computer)).list();
>         monitorModels = selectModelFactory.create(monitors, "name");
>         return ajaxZone.getBody();
>     }
> }
> The full stack trace
>    - Application Exception
>    -
>    -
>    Tapestry Version: 5.4-alpha-22
>    -
>    -
>    Application Version: 1.1-SNAPSHOT-DEV
> An exception has occurred processing this request.
> Parameter 'model' of component SelectDemo:computer is bound to null. This
> parameter is not allowed to be null.
> org.apache.tapestry5.ioc.internal.OperationException
> *Parameter 'model' of component SelectDemo:computer is bound to null. This
> parameter is not allowed to be null.*
> locationclasspath:org/company/tapdemo/pages/SelectDemo.tml, line 31<html
> t:type="layout" t:title="Select Demo" xmlns:t="
> http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
> xmlns:p="tapestry:parameter">2 <form t:type="form">3 <select
> t:type="select" t:id="computer" t:model="computerModels" t:zone="ajaxZone"/>
> 4
> 5 <t:zone t:id="ajaxZone" id="ajaxZone">6 <select t:type="select"
> t:id="monitor" t:model="monitorModels"/>7 </t:zone>8 </form>trace
>    - Handling Ajax 'change' component event request for SelectDemo:computer.
>    - Triggering event 'change' on SelectDemo:computer
> org.apache.tapestry5.runtime.ComponentEventException
> *Parameter 'model' of component SelectDemo:computer is bound to null. This
> parameter is not allowed to be null.*
> context
> eventTypechangelocationclasspath:org/company/tapdemo/pages/SelectDemo.tml,
> line 3
> org.apache.tapestry5.ioc.internal.util.TapestryException
> *Parameter 'model' of component SelectDemo:computer is bound to null. This
> parameter is not allowed to be null.*
> locationclasspath:org/company/tapdemo/pages/SelectDemo.tml, line 3
> Filter Frames?
> Stack trace:
>    - org.apache.tapestry5.internal.transform.ParameterWorker$3$1.readFromBinding(ParameterWorker.java:275)
>    - org.apache.tapestry5.internal.transform.ParameterWorker$3$1.get(ParameterWorker.java:381)
>    - org.apache.tapestry5.corelib.components.Select.findValueInModel(Select.java:273)
>    - org.apache.tapestry5.corelib.components.Select.toValue(Select.java:262)
>    - org.apache.tapestry5.corelib.components.Select.onChange(Select.java:238)
>    - org.apache.tapestry5.corelib.components.Select.dispatchComponentEvent(Select.java)
>    - org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:950)
>    - org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1127)
>    - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1072)
>    - org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1069)
>    - org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:145)
>    - org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1068)
>    - org.apache.tapestry5.internal.services.AjaxComponentEventRequestHandler.handle(AjaxComponentEventRequestHandler.java:109)
>    - org.apache.tapestry5.internal.services.ajax.AjaxFormUpdateFilter.handle(AjaxFormUpdateFilter.java:56)
>    - org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>    - org.apache.tapestry5.upload.internal.services.UploadExceptionFilter.handle(UploadExceptionFilter.java:75)
>    - org.apache.tapestry5.modules.TapestryModule$37.handle(TapestryModule.java:2185)
>    - org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
>    - org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
>    - org.apache.tapestry5.internal.services.RequestOperationTracker$1.perform(RequestOperationTracker.java:55)
>    - org.apache.tapestry5.internal.services.RequestOperationTracker$1.perform(RequestOperationTracker.java:52)
>    - org.apache.tapestry5.internal.services.RequestOperationTracker.handleComponentEvent(RequestOperationTracker.java:47)
>    - org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
>    - org.apache.tapestry5.modules.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:299)
>    - org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
>    - org.apache.tapestry5.modules.TapestryModule$3.service(TapestryModule.java:844)
>    - org.apache.tapestry5.modules.TapestryModule$2.service(TapestryModule.java:834)
>    - org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:89)
>    - org.company.tapdemo.services.AppModule$1.service(AppModule.java:101)
>    - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:105)
>    - org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:95)
>    - org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
>    - org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:119)
>    - org.apache.tapestry5.modules.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:250)
>    - org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:59)
>    - org.company.tapdemo.services.impl.AjaxUploadServletRequestFilter.service(AjaxUploadServletRequestFilter.java:31)
>    - org.apache.tapestry5.upload.internal.services.MultipartServletRequestFilter.service(MultipartServletRequestFilter.java:44)
>    - org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>    - org.apache.tapestry5.modules.TapestryModule$1.service(TapestryModule.java:794)
>    - org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:166)
> RequestContext Path/TapDemoPath/selectdemo.computer:changeLocaleen_USServer
> NamelocalhostFlagsXHRPorts (local/server)8080 / 8080MethodPOSTQuery
> Parameterst:formcomponentidSelectDemo:formt:formidformt:selectvalue2t:zoneid
> ajaxZoneHeadersAccept*/*Accept-Encodinggzip, deflateAccept-Language
> en-US,en;q=0.5Cache-Controlno-cacheConnectionkeep-aliveContent-Length91
> Content-Typeapplication/x-www-form-urlencoded; charset=UTF-8Cookie
> JSESSIONID=8zhf85bxcr15DNT1Hostlocalhost:8080Pragmano-cache
> Proxy-AuthorizationBasic Z21jMDc6RmFsbGluZzIwMTM=Referer
> http://localhost:8080/TapDemo/selectdemoUser-AgentMozilla/5.0 (Windows NT
> 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0X-Requested-With
> XMLHttpRequestAttributespage-nameSelectDemoservletAPI.characterEncodingUTF-8
> servletAPI.contentLength91servletAPI.contentTypeapplication/x-www-form-urlencoded;
> charset=UTF-8servletAPI.protocolHTTP/1.1servletAPI.schemehttp
> tapestry.active-page-loadedtrueContext Attributes
> com.sun.jsp.tagFileJarUrlsCache{}com.sun.jsp.taglibraryCache{}
> javax.servlet.context.tempdir
> C:\Users\gmc07\Documents\NetBeansProjects\TapDemo\target\work
> org.apache.tapestry5.application-registry
> org.apache.tapestry5.ioc.internal.RegistryWrapper@3fc70554



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message