0
votes

I have used this to chain dynamic data drop downs in an Orbeon application using the following services:

  1.  /xforms-sandbox/service/zip-states
  2.  /xforms-sandbox/service/zip-cities?state-abbreviation={../state}
  3.  /xforms-sandbox/service/zip-zips?state-abbreviation={../state}&city={../city}

I have few questions:

  1. I also want to create the same, so can you please point me the code where this services are present. How I should write the service in this case?
  2. {../state} - How it retrieve the state value when it changed?
  3. What is the use of state-abbreviation?
1

1 Answers

1
votes
  1. This specific test service is implemented in XPL and XSL, in zip-states.xpl. But it really just is a service that gets called with an HTTP GET by Orbeon Forms, and returns XML. BTW, you can easily test it from your browser, and it could be implemented with any technology.
  2. Whenever the value of the control named state changes, {../state} will return a different value, so the URL for the service will change, so the Dynamic dropdown will load again that URL to retrieve potentially new data.
  3. In this particular example, we want the "abbreviation" to be stored in the data (e.g. "CA"), and the full name (e.g. "California") to be shown in the UI. Again, in this particular examples, values come from states.xml.