<!--
~ Copyright 2016 Red Hat, Inc. and/or its affiliates
~ and other contributors as indicated by the @author tags.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
--><!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"xmlns:ui="http://java.sun.com/jsf/facelets"xmlns:h="http://java.sun.com/jsf/html"
><body><h1>Third Party App That Pulls Data Using OAuth</h1><h:form>
#{userData.accessTokenAvailabilityMessage}
<br /><h:commandButtonid="retrieve_token"value="Retrieve/refresh access token"action="#{databaseClient.retrieveAccessToken}"/><h:commandButtonid="products_request"value="Load products list"action="#{databaseClient.sendProductsRequest}"/><h:commandButtonid="customers_request"value="Load customers list"action="#{databaseClient.sendCustomersRequest}"/></h:form><ui:fragmentrendered="#{userData.hasProducts}"><hr /><h3>Products data available</h3><ui:repeatvalue="#{userData.products}"var="product">
#{product}<br/></ui:repeat></ui:fragment><ui:fragmentrendered="#{userData.hasCustomers}"><hr /><h3>Customers data available</h3><ui:repeatvalue="#{userData.customers}"var="customer">
#{customer}<br/></ui:repeat></ui:fragment><divstyle="color: red">
#{messagesChecker.checkMessage}
<h:messagesglobalOnly="true"/></div></body></html>