<div dir="ltr">&gt;<span style="font-family:arial,sans-serif;font-size:13px">Is it possible to combine pathParam and queryParam ?</span><div style><span style="font-family:arial,sans-serif;font-size:13px">Yes, it is possible to combine like your example shows. Though, I did discovered a bug if the query parameter is not specified in the request but has a default value. I&#39;ll add a test for this situation which is obviously not covered :(</span></div>
<div style><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div style><span style="font-family:arial,sans-serif;font-size:13px">Thanks! </span></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On 3 January 2013 16:12, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Other question :<div>Is it possible to combine pathParam and queryParam ?</div><div>i.e</div><div>/classroom/12?sex=male </div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">

<br><br><div class="gmail_quote">On Thu, Jan 3, 2013 at 4:07 PM, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr"><div>On Thu, Jan 3, 2013 at 4:03 PM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br></div><div class="gmail_extra">

<div class="gmail_quote"><div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>&gt;<span style="font-family:arial,sans-serif;font-size:13px">About the &quot;location&quot; I have a bit the same feeling as Matthias but like him I have no better idea for the moment.</span></div>


<div><span style="font-family:arial,sans-serif;font-size:13px">Sounds like this need to change this :)</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">Perhaps somethings like </span></div><div><span style="font-family:arial,sans-serif;font-size:13px">param(&quot;name&quot;).default(&quot;value&quot;)</span></div>



<div><span style="font-family:arial,sans-serif;font-size:13px">Not sure if this is possible but just throwing it out there.</span></div><div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div>


</div></div></blockquote></div><div>I like this syntax ! +1 </div><div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr"><div><div><span style="font-family:arial,sans-serif;font-size:13px"></span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">&gt;You said that for now, without any defaults, we have to overload the target method but is it not possible to just pass null if no values and no default is provided ? </span><span style="font-family:arial,sans-serif;font-size:13px"><br>



</span></div></div><div><span style="font-family:arial,sans-serif;font-size:13px">Yeah, I think that would work. So, just specify the params as done and if the param is missing from the request then pass null instead of generating an exception? My concern here would be that it might be a little more difficult to troubleshoot the application. </span></div>


</div></blockquote><div><br></div></div><div>Yes, I&#39;m also not really happy with passing null and we have to find a better solution</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


<div dir="ltr">
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>



</span></div><div><font face="arial, sans-serif">/Dan</font></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">



On 3 January 2013 15:30, Sebastien Blanc <span dir="ltr">&lt;<a href="mailto:scm.blanc@gmail.com" target="_blank">scm.blanc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div dir="ltr">Hi,<div><br></div><div>About the &quot;location&quot; I have a bit the same feeling as Matthias but like him I have no better idea for the moment.</div><div>You said that for now, without any defaults, we have to overload the target method but is it not possible to just pass null if no values and no default is provided ? </div>




<div>Because in your example that would mean that must have 2 differents routes defined if I want to retrieve all the cars or filtered cars based on the request params.</div><div><br></div><div>Seb</div>
<div><br></div><div><br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jan 3, 2013 at 1:12 PM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>&gt;<span style="font-family:arial,sans-serif;font-size:13px">Yeah, not exactly sure about the &quot;location&quot;.</span></div>




<div><span style="font-family:arial,sans-serif;font-size:13px">Ah, I think this is a good point. When writing this it makes sense as I expect most people have code completion and you can understand that this is a default value that is expected. But reading them afterwards it is not obvious which is a bad thing.</span></div>




<div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">&gt;</span><span style="font-family:arial,sans-serif;font-size:13px">Let&#39;s go with the current version. I was just not sure, when I took an initial look :)</span></div>





</div><div><span style="font-family:arial,sans-serif;font-size:13px">Lets see what the others think and perhaps change this if needed, or like you said, go with this for now and revisit. </span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>





</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">Thanks!</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div></div><div><div><div class="gmail_extra">
<br>
<br><div class="gmail_quote">On 3 January 2013 13:07, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<br><br><div class="gmail_quote"><div>On Thu, Jan 3, 2013 at 12:57 PM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>&gt;<span style="font-family:arial,sans-serif;font-size:13px">Hrm, not sure if I like having the default values for the parameters inside of the routing definition.</span></div><div><font face="arial, sans-serif">Would you prefer not having support for default parameters values, </font></div>






</div></blockquote><div><br></div></div><div>Nope, I am OK with default values</div><div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



<div dir="ltr">
<div><font face="arial, sans-serif">or would you like default parameter values but in a different form?</font></div></div></blockquote><div><br></div></div><div>Yeah, not exactly sure about the &quot;location&quot;.<br></div>





<div>
<br></div><div>I am fine with the current approach, but thought it may not be the best to define them in the routing section.</div><div>But on the other hand, that&#39;s a very simple (and centralistic) solution right now, so I am 99% OK with it :-)</div>





<div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">
<div><font face="arial, sans-serif"><br></font></div><div>In the example above we are passing query parameters and might not make sense to have default values in this case, but these parameters could also be header, form, or cookie parameters. </div>






</div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Not sure if this makes a different but I&#39;m thinking that there might be situations where one might consider a header parameter or a cookie parameter as optional and would like a default value for it. Without defaults, we would need to have overloaded target methods as the current implementation needs an exact match for arguments -&gt; parameters (but I&#39;m sure we could look into different solutions).</div>






</div></blockquote><div><br></div></div><div>Let&#39;s go with the current version. I was just not sure, when I took an initial look :)</div><div><div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">






<div dir="ltr">
<div><br></div><div><br></div><div>/Dan</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On 3 January 2013 11:35, Matthias Wessendorf <span dir="ltr">&lt;<a href="mailto:matzew@apache.org" target="_blank">matzew@apache.org</a>&gt;</span> wrote:<br>







</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><br><br><div class="gmail_quote"><div>


On Thu, Jan 3, 2013 at 11:24 AM, Daniel Bevenius <span dir="ltr">&lt;<a href="mailto:daniel.bevenius@gmail.com" target="_blank">daniel.bevenius@gmail.com</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><span style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif">We&#39;ve pushed a version of AeroGear Controller with support for request parameters</span><span style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif"> (</span><a href="https://issues.jboss.org/browse/AEROGEAR-671" style="font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px;color:rgb(65,131,196);text-decoration:initial" target="_blank">AEROGEAR-671</a>)<span style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif"> </span><span style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif">to</span><span style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif"> </span><a href="http://controllerdemo-danbev.rhcloud.com/aerogear-controller-demo/" style="font-family:Helvetica,arial,freesans,clean,sans-serif;font-size:14px;line-height:22px;color:rgb(65,131,196);text-decoration:initial" target="_blank">openshift</a><span style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif">.</span><div>









<div><p style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px">This demo has the following new route added to it:</p><div style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif;padding:0px;border:none">









<pre style="font-size:13px;line-height:19px;font-family:Consolas,&#39;Liberation Mono&#39;,Courier,monospace;word-wrap:break-word;margin-top:15px;margin-bottom:15px;background-color:rgb(248,248,248);border:1px solid rgb(204,204,204);overflow:auto;padding:6px 10px;border-top-left-radius:3px;border-top-right-radius:3px;border-bottom-right-radius:3px;border-bottom-left-radius:3px">
<span>route</span><span style="font-weight:bold">()</span>
      <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">from</span><span style="font-weight:bold">(</span><span style="color:rgb(221,17,68)">&quot;/cars&quot;</span><span style="font-weight:bold">)</span>
      <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">on</span><span style="font-weight:bold">(</span><span>RequestMethod</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">GET</span><span style="font-weight:bold">)</span>
      <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">produces</span><span style="font-weight:bold">(</span><span>MediaType</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">JSON</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">toString</span><span style="font-weight:bold">(),</span> <span style="color:rgb(221,17,68)">&quot;application/custom&quot;</span><span style="font-weight:bold">)</span>
      <span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">to</span><span style="font-weight:bold">(</span><span>Home</span><span style="font-weight:bold">.</span><span style="color:rgb(0,128,128)">class</span><span style="font-weight:bold">).</span><span style="color:rgb(0,128,128)">get</span><span style="font-weight:bold">(</span><span>param</span><span style="font-weight:bold">(</span><span style="color:rgb(221,17,68)">&quot;color&quot;</span><span style="font-weight:bold">,</span> <span style="color:rgb(221,17,68)">&quot;pink&quot;</span><span style="font-weight:bold">),</span> <span>param</span><span style="font-weight:bold">(</span><span style="color:rgb(221,17,68)">&quot;brand&quot;</span><span style="font-weight:bold">,</span> <span style="color:rgb(221,17,68)">&quot;mini&quot;</span><span style="font-weight:bold">));</span>
</pre></div><p style="line-height:22px;font-size:14px;font-family:Helvetica,arial,freesans,clean,sans-serif;margin:15px 0px"></p></div></div></div></blockquote><div><br></div><div><br></div></div><div>Hrm, not sure if I like having the default values for the parameters inside of the routing definition.</div>







<span><font color="#888888">
<div><br></div><div>-Matthias</div><div><br></div><div><br></div></font></span></div><span><font color="#888888">-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>








sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</font></span><br></div></div>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div></div></div><div><div><br><br clear="all"><div><br></div>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>





sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div></div></div><br></div></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br>
<br></blockquote></div><br></div>