html - How to combine REST Api and xhtml page? -


i read several tutorial restful web services , understood main target of it. don't understand how combine rest , xhtml pages.

usually, have pages

<h:form>  <p:tabview orientation="left" id="maintabid">  	<p:tab title="user information">  		<h:panelgrid columns="2" columnclasses="column" cellpadding="5"  			styleclass="datatablestyle" border="2" cellspacing="5">  			<h:outputlabel value="first name:" />  			<p:inputtext id="firstname" value="#{user.firstname}"  				validatormessage="length should 3 or more" required="true"  				requiredmessage="this field can not empty">  				<p:ajax event="mouseout" update="firstnamemsg"></p:ajax>  				<f:validatelength minimum="3"></f:validatelength>  			</p:inputtext>  			<p:message id="firstnamemsg" for="firstname" />  			<f:facet name="footer">  				<p:commandbutton id="brnid" value="save changes"  					icon="ui-icon-document" action="savefuckingdata"  					onstart="statusdialog.show()" onsuccess="statusdialog.hide()" />  			</f:facet>  		</h:panelgrid>  	</p:tab>  </p:tabview>  </h:form>

in case, have static page dynamically fill.

how can similar page via rest api? should return whole web page in java method?

i mean, know how json/xml via request. web page like:

<subjectslist>    <subject>      <coef>4</coef>      <name>some data</name>      <score>71</score>    </subject>  </subjectslist>

but need page contains many buttons, tables, text fields , other elements, not json/xml text presentation.
hope understand want)


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -