X

Geertjan's Blog

  • February 22, 2016

ojTable and ojTree in an Oracle JET Application

Geertjan Wielenga
Product Manager

The City Info app I've been working on is great for showcasing a range of JET components. Below, notice the ojTable and ojTree on the left side of the application:

The interesting thing is that each is provided by a distinct JET module, i.e., "cityTable" and "cityTree", which you see here:

The HTML side of the "ojTable" is like this: 

<h1>City Table View</h1>
<table
data-bind="ojComponent: {component: 'ojTable',
beforecurrentrow: currentRowListener,
data: datasource,
columns: [
{headerText: 'City', field: 'city'},
{headerText: 'Country', field: 'country'}
]}">
</table>

The HTML side of the "ojTree" is like this:

<h1>City Tree View</h1>
<div data-bind="ojComponent: {component: 'ojTree',
before: currentRowListener,
data: datasource
}">
</div>

Does anyone know of a JSON file that contains all the cities/countries of the world? That would be a useful basis in terms of the data for this application.

Join the discussion

Comments ( 2 )
  • Vasilis Souvatzis Monday, February 22, 2016

    Regarding the json countries file, I'm using this one for my tests...

    https://gist.github.com/Keeguon/2310008


  • Geertjan Monday, February 22, 2016

    Hey, thanks! Now what I really need is a file like that with cities.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha