Last active
August 29, 2015 14:10
-
-
Save nicolas-despres/38f8a4df7915f879dd3a to your computer and use it in GitHub Desktop.
Created via API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; aWF_RT_Formule (aWFFieldDescRuleEngine) (Def Version:5) (Implem Version:1) | |
uses aWFActionLog, aPF_HttpServletRequest | |
procedure WFCalculate(inOut Result : Boolean) | |
uses PT_wPortal | |
var ActionLog : CString | |
var theLog : aWFActionLog | |
ActionLog = self.GetRequest.GetParameter('theBuid') | |
theLog = PT_wPortal.UIdAsBusinessObject(ActionLog) | |
if theLog <> Nil | |
;=myModule.GenerateWydeWebPage(theProduct) | |
if theLog.Interact(Nil, Consultation, True) = rValid | |
endIf | |
endIf | |
endProc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; aWF_RT_Formule (aWFFieldDescRuleEngine) (Def Version:5) (Implem Version:1) | |
uses aPF_HttpServletResponse | |
procedure WFCalculate(inOut Result : Boolean) | |
self.GetResponse.AppendDefaultCssToHtmlHeader('timeline_styles.css') | |
endProc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; aWF_RT_Formule (aWFFieldDescRuleEngine) (Def Version:3) (Implem Version:1) | |
uses aPF_HttpServletResponse | |
procedure WFCalculate(inOut Result : Boolean) | |
var theProduct : CString | |
;theProduct=getrequest.GetParameter('ProcutBUID') | |
;motor.ThingFromFullId(theFullId) | |
; | |
Write(self.Response.OutText, 'Product', theProduct) | |
;=myModule.GenerateWydeWebPage(theProduct) | |
;product.interact() | |
endProc | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; aWF_RT_Formule (aWFFieldDescRuleEngine) (Def Version:28) (Implem Version:1) | |
uses aWFActionLog, aPF_HttpServletResponse, aPF_HttpServletRequest, aClassDef | |
procedure WFCalculate(inOut Result : Boolean) | |
uses aOST_CLI, aWFApplicationUserWithAuthorization, aPF_Url, PT_wPortal, aEXT_ConfiguredPageContent, | |
aWFOfferedEntity | |
var theRequest : Text | |
var myOST_Motor : aOST_CLI | |
var RequestResponse : Text | |
var actionLog : aWFActionLog | |
var Url : aPF_Url | |
WriteLn(self.GetResponse.OutText, '<h1>Hello World!!</h1>') | |
WriteLn(self.GetResponse.OutText, 'This page is fully configured') | |
WriteLn(self.GetResponse.OutText, '<h2>I can retrieve data using an OQL request</h2>') | |
; | |
new(myOST_Motor) | |
; | |
;Hello world | |
; | |
theRequest := 'OQL Select top 10 x.date, x.actiontitle from x in aWFActionLog++' | |
myOST_Motor.ExecuteWithResultAsText(theRequest, 1, RequestResponse, False) | |
theRequest := '' | |
;adding a comment | |
WriteLn(self.GetResponse.OutText, RequestResponse) | |
RequestResponse := '' | |
dispose(myOST_Motor) | |
WriteLn(self.GetResponse.OutText, '<h2>I can add a static resource such as a CSS file</h2>') | |
;pt_wportal.HtmlEntitiesText(inText) | |
self.GetResponse.AppendDefaultCssToHtmlHeader('timeline_styles.css') | |
WriteLn(self.GetResponse.OutText, ' GetResponse.AppendDefaultCssToHtmlHeader(''timeline_styles.css''') | |
WriteLn(self.GetResponse.OutText, '<div class="timeline animated">') | |
; | |
forEach actionLog in OQL Select top 8 * from x in aWFActionLog++ order by x.Date descending | |
WriteLn(self.GetResponse.OutText, ' <div class="timeline-row active">') | |
WriteLn(self.GetResponse.OutText, ' <div class="timeline-time">') | |
WriteLn(self.GetResponse.OutText, ' <small>', Concat(actionLog.Date), '</small>', | |
Concat(actionLog.Time)) | |
WriteLn(self.GetResponse.OutText, ' </div>') | |
WriteLn(self.GetResponse.OutText, ' <div class="timeline-icon">') | |
WriteLn(self.GetResponse.OutText, ' <div class="bg-primary">') | |
if (actionLog.OnObject <> Nil) and member(actionLog.OnObject, aWFOfferedEntity) | |
WriteLn(self.GetResponse.OutText, ' <i class="icon-briefcase"></i>') | |
else | |
WriteLn(self.GetResponse.OutText, ' <i class="icon-time"></i>') | |
endIf | |
WriteLn(self.GetResponse.OutText, ' </div>') | |
WriteLn(self.GetResponse.OutText, ' </div>') | |
WriteLn(self.GetResponse.OutText, ' <div class="panel timeline-content">') | |
WriteLn(self.GetResponse.OutText, ' <div class="panel-body">') | |
new(Url) | |
;Url.SetIcon(cIcon_ExternalLink) | |
Url.SetBusinessObject(self.GetRequest.BusinessObject) | |
Url.SetServletClassDef(MetaModelEntity(aEXT_ConfiguredPageContent)) | |
Url.SetParameter('thePage', 'ActionLog') | |
Url.SetParameter('theBuid', PT_wPortal.BusinessObjectAsUId(actionLog, True)) | |
; | |
WriteLn(self.GetResponse.OutText, '<a class="navlink" href="', Url.AsHtml, | |
'">') | |
dispose(Url) | |
WriteLn(self.GetResponse.OutText, ' <h2>', actionLog.ActionTitle, '</h2> </a>') | |
WriteLn(self.GetResponse.OutText, ' <p>', actionLog.LastUser.Name, '</p>') | |
WriteLn(self.GetResponse.OutText, ' </div>') | |
WriteLn(self.GetResponse.OutText, ' </div>') | |
WriteLn(self.GetResponse.OutText, ' </div> ') | |
endFor | |
WriteLn(self.GetResponse.OutText, ' </div> ') | |
endProc | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment