cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1253
Views
5
Helpful
2
Replies

How to use the 'next' softkey in XML Directory - SPA504G

damianivereigh
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

Dan Lukes
VIP Alumni
VIP Alumni
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.

 

View solution in original post

2 Replies 2

Dan Lukes
VIP Alumni
VIP Alumni
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.

 

Thanks very much, just what I needed!