How does openrasta work out the action for a page? -


i have 2 routes configured:

    resourcespace.has.resourcesoftype()                   .aturi("/patient")                   .and                   .aturi("/patient/cardid/{cardid}")                   .handledby()                   .asjsondatacontract()                   .and                   .renderedbyaspx("~/views/patient.aspx");                   resourcespace.has.resourcesoftype()                     .aturi("/product")                     .and                     .aturi("/product/tagvalue/{tagvalue}")                     .handledby()                     .asjsondatacontract()                     .and                     .renderedbyaspx("~/views/product.aspx");  

when using code

   using (scope(xhtml.form(resource).id("addpatientform").method("post"))) {   

for patient translate action to

action="/patient"

and product

action="/product/tagvalue"

what doing wrong? can hint it, had quick in source , action uri can't set via action.

any appreciated!

for patient, if resource has cardid should select uri first. if doesn't, it's bug.

for product, that's definitly bug (unless product class has tagvalue of null / empty) please fill bug report on new bug tracker @ http://youtrack.codebetter.com/issues/or

in meantime, can xhtml.form().action(resource.createuri()) if has properties set or xhtml.form().action(resource.createuri(new{ cardid = value });


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -