Distingush between actual result value after redirecting

13 views
Skip to first unread message

Rejith R Krishnan

unread,
Jun 19, 2014, 2:33:10 AM6/19/14
to model...@googlegroups.com
<results>
<result name="Bad"       do="survey.studenttrackingduplicatequestion" append="surveyid" redirect="true"/>
<result name="Duplicate"     do="survey.instantsupport" redirect="true" />
<result name="Support"       do="survey.instantsupport" redirect="true" />
<result name="Safety"        do="survey.instantsupport" redirect="true" />
<result name="Good"          do="survey.instantsupport" redirect="true" />
<result name="StudentAdd"   do="survey.studenttrackingduplicatequestion" append="surveyid" redirect="true"/>
<result name="SiteAssociation" do="survey.takesurveywithsiteassociation" append="surveyid" redirect="false" />
</results>


Here you can see I am doing redirects to same page for different result values. After redirection is there any way I can Identify value of the result?

Dan Wilson

unread,
Jun 19, 2014, 4:30:59 PM6/19/14
to model...@googlegroups.com
I should think you would be able to set something in the event, and put that event value name in your append attribute, like below.

However, without knowing a whole lot about your code, these redirecting results look very granular and all point to the same page. Perhaps you should be handling this in a different way besides the result? Like rather than passing the name of the result, you should be passing that into some model object to handle the work you need done.

DW




<results>
<result name="Bad"       do="survey.studenttrackingduplicatequestion" append="surveyid,ThingINeedToKnowAboutTheResultInTheNextPage" redirect="true"/>
<result name="Duplicate"    append="surveyid,ThingINeedToKnowAboutTheResultInTheNextPage"   do="survey.instantsupport" redirect="true" />
<result name="Support"      append="surveyid,ThingINeedToKnowAboutTheResultInTheNextPage"   do="survey.instantsupport" redirect="true" />
<result name="Safety"        append="surveyid,ThingINeedToKnowAboutTheResultInTheNextPage"  do="survey.instantsupport" redirect="true" />
<result name="Good"       append="surveyid,ThingINeedToKnowAboutTheResultInTheNextPage"     do="survey.instantsupport" redirect="true" />
<result name="StudentAdd"  append="surveyid,ThingINeedToKnowAboutTheResultInTheNextPage"   do="survey.studenttrackingduplicatequestion" append="surveyid" redirect="true"/>
<result name="SiteAssociation"  append="surveyid,ThingINeedToKnowAboutTheResultInTheNextPage"  do="survey.takesurveywithsiteassociation" append="surveyid" redirect="false" />
</results>
 
Thursday, June 19, 2014 2:33 AM
--
--
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
 
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to model...@googlegroups.com
To unsubscribe from this group, send email to
model-glue+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
---
You received this message because you are subscribed to the Google Groups "model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send an email to model-glue+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Rejith R Krishnan

unread,
Jul 10, 2014, 1:42:17 AM7/10/14
to model...@googlegroups.com
I don't want to sound silly, but appending while redirection, we can only append strings, just like url request, no structures or other complex datatypes are allowed, right? 

Dan Wilson

unread,
Jul 10, 2014, 2:42:47 PM7/10/14
to model...@googlegroups.com
That is correct. It has to be something you can pass over the URL for a redirect.

However look into the PreserveState option. You can hold on to complex objects that way.

https://github.com/modelglue/modelglue-framework/wiki/ModelGlueXmlReference#result
Thursday, July 10, 2014 1:42 AM
Reply all
Reply to author
Forward
0 new messages