03-17-2015 12:07 AM - edited 03-21-2019 08:34 AM
I have the basic XML Directory stuff working (CiscoIPPhoneDirectory) on the SPA504G. However I realise I can only display 32 entries and I note that there is a "next" softkey enabled, however it seems to not do anything. How can I link this button press to fetching a new url with the next page of 32 results - I am ok dealing with the server side of this.
Looking at the xsi_dev_guide (which I am not sure is applicable to the SPA504G), talks about adding a Refresh HTTP Header, however it is a bit vague and whenever I add it to the HTTP response, the spa504 barfs (invalid response).
Do I need to program the next softkey to send a URL or something?
Solved! Go to Solution.
03-17-2015 05:07 AM
Do I need to program the next softkey to send a URL or something?
Yes, definitely. The "Next" soft key is not magic key of any kind. It just standard "request a page from HTTP server" key. It should issue a HTTP request for next page. Like "Prev" key is asking for previous page content.
So you need something like:
<SoftKeyItem> <Name>Next</Name> <URL>https://.../Cisco/Directory.php?page=2</URL> <Position>3</Position> </SoftKeyItem>
Note that you should NOT claim Next key on last page. Phone will choke on empty CiscoIPPhoneDirectory (e.g. no entry). For same reason you should not declare Prev key on first page.
Looking at the xsi_dev_guide (which I am not sure is applicable to the SPA504G), talks about adding a Refresh HTTP Header, however it is a bit vague and whenever I add it to the HTTP response, the spa504 barfs (invalid response).
Yes, xsi_dev_guide apply to SPA504G as well. Although Refresh is not claimed by a formal standard, it's de-facto standard recognized by many browsers already. Thus it's not documented in detail heres. In the context of example above you should emit ...
Refresh: 0; url=https://.../Cisco/Directory.php?page=2
... header here.
Rate useful advices. It will help others to found solutions.
03-17-2015 05:07 AM
Do I need to program the next softkey to send a URL or something?
Yes, definitely. The "Next" soft key is not magic key of any kind. It just standard "request a page from HTTP server" key. It should issue a HTTP request for next page. Like "Prev" key is asking for previous page content.
So you need something like:
<SoftKeyItem> <Name>Next</Name> <URL>https://.../Cisco/Directory.php?page=2</URL> <Position>3</Position> </SoftKeyItem>
Note that you should NOT claim Next key on last page. Phone will choke on empty CiscoIPPhoneDirectory (e.g. no entry). For same reason you should not declare Prev key on first page.
Looking at the xsi_dev_guide (which I am not sure is applicable to the SPA504G), talks about adding a Refresh HTTP Header, however it is a bit vague and whenever I add it to the HTTP response, the spa504 barfs (invalid response).
Yes, xsi_dev_guide apply to SPA504G as well. Although Refresh is not claimed by a formal standard, it's de-facto standard recognized by many browsers already. Thus it's not documented in detail heres. In the context of example above you should emit ...
Refresh: 0; url=https://.../Cisco/Directory.php?page=2
... header here.
Rate useful advices. It will help others to found solutions.
03-18-2015 04:02 AM
Thanks very much, just what I needed!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide