Announcement Announcement Module
Collapse
No announcement yet.
Mapping Results error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mapping Results error

    i dont have any idea on this error
    i am trying to use Spring AjaxEventDecoration..

    Code:
    						Spring.addDecoration(new Spring.AjaxEventDecoration({
    							elementId: "selectedTaishoHaniSentei.analyzeId",
    							formId: "rosenkaSanshutsuView",
    							event: "onchange",
    							params: { _eventId: "updateTaishoHaniSentei", 'selectedTaishoHaniSentei.analyze_id': dojo.byId('selectedTaishoHaniSentei.analyzeId')[dojo.byId('selectedTaishoHaniSentei.analyzeId').selectedIndex].id }
    						}));
    Code:
    Mapping Results = [[Success@14d0d46 mapping = parameter:'selectedTaishoHaniSentei.analyzeId' -> selectedTaishoHaniSentei.analyzeId, code = 'success', error = false, originalValue = '99999', mappedValue = '99999'], [TargetAccessError@1a27fbe mapping = null -> eventId, code = 'propertyNotFound', error = true, errorCause = org.springframework.binding.expression.PropertyNotFoundException: Property not found, originalValue = [null], mappedValue = [null]], [TargetAccessError@170b8b6 mapping = parameter:'ajaxSource' -> ajaxSource, code = 'propertyNotFound', error = true, errorCause = org.springframework.binding.expression.PropertyNotFoundException: Property not found, originalValue = 'selectedTaishoHaniSentei.analyzeId', mappedValue = [null]], [TargetAccessError@16edb6b mapping = parameter:'selectedTaishoHaniSentei.analyze_id' -> selectedTaishoHaniSentei.analyze_id, code = 'propertyNotFound', error = true, errorCause = org.springframework.binding.expression.PropertyNotFoundException: Property not found, originalValue = '', mappedValue = [null]], [Success@107799e mapping = parameter:'selectedTaishoHaniSentei.joruiNo' -> selectedTaishoHaniSentei.joruiNo, code = 'success', error = false, originalValue = 'null', mappedValue = 'null'], [TargetAccessError@1c1a5d6 mapping = parameter:'execution' -> execution, code = 'propertyNotFound', error = true, errorCause = org.springframework.binding.expression.PropertyNotFoundException: Property not found, originalValue = 'e19s1', mappedValue = [null]]]
    any example that may i refer to... thanks
    Last edited by eros; Mar 16th, 2010, 07:20 AM. Reason: tag as SOLVED

  • #2
    I think we'll need more information than this. You're only posting your ajax event decoration code, but your error is being thrown server-side. If you could post the relevant portion of your flow definition (at least the view-state) that should help.

    Comment


    • #3
      Originally posted by InverseFalcon View Post
      I think we'll need more information than this. You're only posting your ajax event decoration code, but your error is being thrown server-side. If you could post the relevant portion of your flow definition (at least the view-state) that should help.
      sorry for delayed response..i am trying to resolve it but unfortunately didn't succeed..

      for updates: just wondering, why the eventId is trying to bind with my model.. and ofcourse my model doesn't have the eventId_view-rltRosenka member...

      please see the below codes for reference...

      here's the error from console:
      Field error in object 'rosenkaSanshutsuView' on field 'eventId_view-rltRosenka': rejected value [null]; codes []; arguments []; default message [evaluationException on eventId_view-rltRosenka]
      jsp:
      Code:
      <%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8" %>
      <form:errors path="*" ></form:errors><br/>
      <form:form modelAttribute="rosenkaSanshutsuView">
      <table style="margin: 10px; border: 0px; border-style: solid; border-color: red">
      	<tr>
      		<td>
      		<tiles:insertAttribute name="view-taishoHaniSentei"/>
      
      		</td>
      	</tr>
      	<tr>
      		<td style="padding-top: 20px;">
      
      		<table style="border: 0px; border-style: solid;"">
      			<tr align="">
      				<td>
      				</td>
      				<td>
      				<input style="width: 135px;" type="submit" name="_eventId_view-rltRosenka" value="Go to Rosenka Screen"/>*
      				</td>
      			</tr>
      			<tr>
      				<td>
      				
      				</td>
      				<td align="right">
      				<input style="margin-top: 20px;" type="submit" name="_eventId_modoru" value="Back"/>*
      				</td>
      			</tr>
      		</table>	
      		
      		</td>
      	</tr>
      </table>
      </form:form>
      flow def
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <flow xmlns="http://www.springframework.org/schema/webflow"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	xsi:schemaLocation="http://www.springframework.org/schema/webflow
              http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
      	
      	<input name="simulationAnalyzeId" required="true" />
      
      	<view-state id="enterRosenka" view="view-rosenka" model="rosenkaSanshutsuView">
      
      		<on-entry>
      			<evaluate expression="rosenkaService.createRosenkaSanshutsuView(flowScope.simulationAnalyzeId)"
      						result="viewScope.rosenkaSanshutsuView"></evaluate>
      		</on-entry>
      
      		<transition on="updateTaishoHaniSenteiByAnalyzeId">
      			<evaluate expression="rosenkaService.updateTaishoHaniSenteiByAnalyzeId(viewScope.rosenkaSanshutsuView)" result="viewScope.rosenkaSanshutsuView" />
      			<render fragments="view-taishoHaniSentei" />
      		</transition>
      
      		<transition on="updateTaishoHaniSenteiByJoruiNo">
      			<evaluate expression="rosenkaService.updateTaishoHaniSenteiByJoruiNo(viewScope.rosenkaSanshutsuView)" result="viewScope.rosenkaSanshutsuView" />
      			<render fragments="view-taishoHaniSentei" />
      		</transition>
      
      		<transition on="view-rltRosenka" to="enterRltRosenka"/>
      		
      		<transition on="modoru" to="shuryo">
      		</transition>
      		
      		<on-exit>
      			<set name="requestScope.rosenkaSanshutsuAnalyzeId" value="viewScope.rosenkaSanshutsuView.selectedTaishoHaniSentei.analyzeId"></set>
      			<set name="requestScope.rosenkaSanshutsuJoruiNo" value="viewScope.rosenkaSanshutsuView.selectedTaishoHaniSentei.joruiNo"></set>
      			<set name="requestScope.rosenkaSanshutsuRosenNo" value="viewScope.rosenkaSanshutsuView.selectedTaishoHaniSentei.rosenNo"></set>
      		</on-exit>
      	</view-state>
      
      	<view-state id="enterRltRosenka" view="view-rltRosenka">
      		<transition on="view-adjustRosenka" to="enterAdjustRosenka">
      		</transition>
      		
      		<transition on="modoru" to="enterRosenka">
      		</transition>
      	</view-state>
      	
      	<end-state id="shuryo" view="externalRedirect:/simulation/simulation-flow" />
      </flow>
      I am cheking the below method of DefaultMapping class
      Code:
      	/**
      	 * Execute this mapping.
      	 * @param context the mapping context
      	 */
      	public void map(DefaultMappingContext context) {
      		context.setCurrentMapping(this);
      		Object sourceValue;
      		try {
      			sourceValue = sourceExpression.getValue(context.getSource());
      		} catch (EvaluationException e) {
      			context.setSourceAccessError(e);
      			return;
      		}
      		if (required && (sourceValue == null || isEmptyString(sourceValue))) {
      			context.setRequiredErrorResult(sourceValue);
      			return;
      		}
      		Object targetValue = sourceValue;
      		if (sourceValue != null) {
      			if (typeConverter != null) {
      				try {
      					targetValue = typeConverter.execute(sourceValue);
      				} catch (ConversionExecutionException e) {
      					context.setTypeConversionErrorResult(sourceValue, e);
      					return;
      				}
      			}
      		}
      		try {
      			targetExpression.setValue(context.getTarget(), targetValue);
      			context.setSuccessResult(sourceValue, targetValue);
      		} catch (EvaluationException e) {
      			context.setTargetAccessError(sourceValue, e);
      		}
      	}

      Comment


      • #4
        here7s the mapping result
        [TargetAccessError@afeb08 mapping = null -> eventId_view-rltRosenka, code = 'evaluationException', error = true,
        errorCause = org.springframework.binding.expression.EvaluationE xception:
        An OgnlException occurred setting the value of expression 'eventId_view-rltRosenka' on context
        [class xx.xx.xxxx.webproj.domain.simulation.RosenkaSanshu tsuView] to [null]
        ,
        originalValue = [null], mappedValue = [null]]
        Last edited by eros; Mar 16th, 2010, 06:18 AM.

        Comment


        • #5
          anybody can enlighten me on which part am I missing...

          it seems that I set the multiple eventId with a form by setting the name="_eventId_eventNameExecute"..

          please guide me on...

          Comment


          • #6
            i found my mistake

            i removed the hyphen with my transition on

            view-rltRosenka → viewrltRosenka

            Code:
            <?xml version="1.0" encoding="UTF-8"?>
            <flow xmlns="http://www.springframework.org/schema/webflow"
            	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            	xsi:schemaLocation="http://www.springframework.org/schema/webflow
                    http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
            	
            	<input name="simulationAnalyzeId" required="true" />
            
            	<view-state id="enterRosenka" view="view-rosenka" model="rosenkaSanshutsuView">
            
            .......
            
            		<!-- <transition on="view-rltRosenka" to="enterRltRosenka"/> -->
            		<transition on="viewrltRosenka" to="enterRltRosenka"/>
            		
            ......
            	</view-state>
            
            ......
            	<end-state id="shuryo" view="externalRedirect:/simulation/simulation-flow" />
            </flow>
            but still wondering, why it cannot be executed normally if I add the hyphen..

            Comment

            Working...
            X