Configure OpenCAF Applications

Hi,

a few days ago I tried my hands on our first OpenCAF app, built with Angular JS.
It works nicely, but the URIs for our REST calls are hardcoded for now.

If I build a regular CAF app and use WSDs from IntegrationServer, I can configure the ws-endpoint via sysadmin/CAF Application Runtime Configuration and provision it using vs files with Deployer.

But how to do the same for OpenCAF? I do not have the enviroment settings at all, as I did not use WSDs in Designer.

Can I introduce custom properties? if so, how? and how do I access them?
Or should I manually add the ws-endpoint stuff to the web.xml? If so, can I configure it via GUI/Deployer? And how do I access these settings from Javascript in OpenCAF?

thanks a lot
Bernhard

Hi Bernhard,

I tried to get the content from this way. Or using hidden property control and then you can do what you want we data.

Best regards

Ismael

— Example:

<h:body ng-app=“helloApp”>
<mws_ui:pre_body />


<caf_f:design-time-attribute name=“portlet” value=“userDetails”></caf_f:design-time-attribute>
<caf_h:formattedMessages id=“messages”></caf_h:formattedMessages>
<caf_h:form defaultFocus=“_first” id=“defaultForm”>
<caf_h:panelPropertyLine id=“propertyLine” label=“PrincipalDN”>
<caf_h:inputText id=“ttt” onclick=“toto()”
value=“#{UserDetailsDefaultviewView.userModel.principalDN}” ng-model=“jsf:defaultForm:ttt”></caf_h:inputText>

</caf_h:panelPropertyLine>
<caf_h:panelPropertyLine id=“propertyLine1” label=“PrincipalID”>
<caf_h:outputText raw=“true” id=“htmlOutputText1”
value=“#{UserDetailsDefaultviewView.userModel.principalID}”></caf_h:outputText>
</caf_h:panelPropertyLine>
</caf_h:form>

{{name}}



</h:body>

Hi,

that works great, thanks a lot!

I just put the ws entries in the web.xml manually, so I can configure them in a similar way to traditional CAFs and resolving it with

<input type="text" name="fname" value="#{environment['wsclient-endpointAddress']}"/>

in java script works as it should :slight_smile:

:smiley: