Table Metadata XML Mutliple Attributes in UpdateUrl

LabKey Support Forum
Table Metadata XML Mutliple Attributes in UpdateUrl trent  2011-10-13 21:17
Status: Closed
 
Is table metadata designed more for custom modules that would only require one URL parameter. I ask because:

1. Create a list
- person_id PK
- name
- age
2. Create a page to display the data
- name: person
- source:

<script type="text/javascript">

Ext.onReady(function(){
  console.log(LABKEY.ActionURL.getParameter('person_id'));
});


</script>

(just for testing purposes)

3. Go to schema browser: lists: Person.
4. Edit MetaData
5. Edit Source
6. XML Metadata tab
7. Specify (just to verify it works)
<ns:tables xmlns:ns="http://labkey.org/data/xml">
  <ns:table tableName="Person" tableDbType="NOT_IN_DB">
    <ns:updateUrl>/wiki/page.view?name=person</ns:updateUrl>
  </ns:table>
</ns:tables>
8. Save and go to Data Tab. Verify Edit link. Yep works.
9. XML Metadata tab
10. Specify (add pk field)
<ns:tables xmlns:ns="http://labkey.org/data/xml">
  <ns:table tableName="Person" tableDbType="NOT_IN_DB">
    <ns:updateUrl>/wiki/page.view?name=person&person_id=${person_id}</ns:updateUrl>
  </ns:table>
</ns:tables>
11. Save and go to Data Tab. At this point, no data is returned due to an error:

error: Unexpected character encountered (lex state 3): 'p' (line 3, column 47)
Metadata XML error: Unexpected character encountered (lex state 3): 'p' (line 3, column 47)

So it obviously doesn't like having 2 parameters.
 
 
marki responded:  2011-10-13 21:33
Title: Is Table Metadata XML Not intended for wiki pages?
The & character needs to be encoded in the XML. I think it might need to be &amp in your URL.
 
marki responded:  2011-10-13 21:35
That is &amp; with the semicolon
 
trent responded:  2011-10-13 21:42
oh yep! I was trying the percentage encoding, but of course that just makes the name attribute have the & characer. Thanks :-)
 
trent responded:  2011-10-19 17:52
There seems to be a bug with tableUrl and gridUrl in that it doesn't allow you to leave them blank and just results in an Unexpected Exception.

Actually, im not sure what gridUrl is for? I thought it would be for the details link, but i think that's what tableUrl is for. anyway, i tried to leave it blank, but it just results in an 'Unexpected exception'. Tried multiple places, different projects, all resulting in the same error.