Skip to content

Instantly share code, notes, and snippets.

@jwebgordon
Last active October 14, 2015 00:28
Show Gist options
  • Save jwebgordon/4279689 to your computer and use it in GitHub Desktop.
Save jwebgordon/4279689 to your computer and use it in GitHub Desktop.
dropdownHTML
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>Update Country and State Properties</title>
<link rel="stylesheet" type="text/css" href="css/hubspot.css" />
<link rel="stylesheet" type="text/css" href="css/main.css" />
</h:head>
<h:body>
<h:form class="hs-form" style="margin-bottom: 30px;">
<div class="field" ><label>HubID</label><div class="input" ><h:inputText class="hs-input" value="#{bakedBean.portalId}" /></div></div>
<div class="field" ><label>hapikey</label><div class="input" ><h:inputText class="hs-input" value="#{bakedBean.hapikey}" /></div></div>
<h:commandButton class="hs-button primary large" action="#{bakedBean.getCurrentProps()}" value="Get Properties" />
</h:form>
<div class="divider" ></div>
<h:form class="hs-form" style="margin-top:20px;" >
<div class="field" ><label>Property Labels</label><div class="input" ><h:inputTextarea value="#{bakedBean.rawLabels}" style="width: 200px;" /></div></div>
<div class="field" ><label>Property Values</label><div class="input" ><h:inputTextarea value="#{bakedBean.rawValues}" style="width: 200px;" /></div></div>
<div class="field" >
<label>Which Property?</label>
<div class="input" >
<h:selectOneMenu value="#{bakedBean.propName}" >
<f:selectItems value="#{bakedBean.existingProps}" />
</h:selectOneMenu>
</div>
</div>
<div class="field" >
<label>Make it a...</label>
<div class="input" >
<h:selectOneMenu value="#{bakedBean.selectedPropOption}" >
<f:selectItems value="#{bakedBean.propOptions}" />
</h:selectOneMenu>
</div>
</div>
<h:commandButton class="hs-button primary large" action="#{bakedBean.getExistingProp()}" value="Get Existing" />
<h:commandButton class="hs-button primary large" action="#{bakedBean.updateProp()}" value="Update" disabled="#{bakedBean.updateButtonDisabled}" />
</h:form>
<h:form >
<h2>Existing JSON for prop <small>PLEASE SAVE THIS</small></h2>
<h:inputTextarea value="#{bakedBean.existingJson}" />
</h:form>
</h:body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment