Skip to content

Commit

Permalink
impl, docu
Browse files Browse the repository at this point in the history
Issue #506
  • Loading branch information
rsoika committed Nov 23, 2022
1 parent 24ef934 commit fa32db9
Show file tree
Hide file tree
Showing 5 changed files with 128 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ yearly=Jährlich
daily=Täglich
hourly=Stündlich
type=Typ
summary=Zusammenfassung



Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">




<ui:remove>
<!-- WorkitemLink Component
Requires that the subform workitemlinkSearch is places at once in the ui:form
NOTE: The Input Item is fixed to the item name '$workitemref'
-->
</ui:remove>

<f:subview id="workitemlink-view">
<!-- show external references -->
<h:panelGroup id="reference_box" layout="block"
class="marty-workitemlink-referencebox">
<c:forEach var="workitem"
items="#{workitemLinkController.getExternalReferences(options)}">
<div class="marty-workitemlink-referencebox-entry">
<h:link outcome="/pages/workitems/workitem">
<h:outputText escape="false" value="#{workitem.item['$WorkflowSummary']}"
rendered="#{!empty workitem.item['$WorkflowSummary']}" />
<h:outputText value="#{suggest.item['$created']}"
rendered="#{empty workitem.item['$WorkflowSummary']}">
<f:convertDateTime timeZone="#{message.timeZone}"
pattern="#{message.dateTimePatternShort}" />
</h:outputText>
<f:param name="id" value="#{workitem.item['$uniqueid']}" />
</h:link>
<br />
<span class="marty-workitemlink-entry-abstract">
<h:outputText value="#{workitem.item['$workflowgroup']}: " />
<h:outputText value="#{workitem.item['$workflowstatus']}" />
</span>
</div>
</c:forEach>
</h:panelGroup>

</f:subview>


</ui:composition>

Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:pt="http://xmlns.jcp.org/jsf/passthrough">




<ui:remove>
<!-- WorkitemLink Component
Requires that the subform workitemlinkSearch is places at once in the ui:form
NOTE: The Input Item is fixed to the item name '$workitemref'
-->
</ui:remove>

<f:subview id="workitemlink-view">
<!-- show external references -->

<table style="width: 100%; margin: 5px;">
<tr>
<th style="text-align: left;">#{message['edited']}</th>

<th style="text-align: left;">#{message['form.subject']}</th>
<th style="text-align: left;">Status</th>
</tr>
<ui:param name="refworkitems"
value="#{workitemLinkController.getExternalReferences(options)}"></ui:param>
<ui:repeat value="#{refworkitems}" var="refworkitem">
<tr>
<td>
<h:outputText value="#{refworkitem.item['$modified']}">
<f:convertDateTime timeZone="#{message.timeZone}" type="both"
pattern="#{message.dateTimePattern}" />
</h:outputText>
<h:outputText value=" #{message.by} #{userController.getUserName(refworkitem.item['$Editor'])}" title="#{refworkitem.item['$Editor']}" />
</td>
<td><h:link outcome="/pages/workitems/workitem">
#{refworkitem.item['$workflowsummary']}
<f:param name="id"
value="#{refworkitem.item['$uniqueid']}" />
</h:link></td>

<td><h:outputText
value="#{refworkitem.item['$workflowstatus']}" /></td>
</tr>
</ui:repeat>
</table>
</f:subview>


</ui:composition>

28 changes: 16 additions & 12 deletions src/site/markdown/forms/parts-custom.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,22 +150,26 @@ The custom tag 'workitemlink' provides the following attributes:
Note: the references displayed by the widget are bound directly to the workitem managed by
the workflowController bean. This is independet from the property 'workitem'

### Display external references
It is also possible to display workitems referred by the current workitem using the widget _workitemExternalReferences_
## Display external references

<marty:workitemExternalReferences workitem="#{workflowController.workitem}"
filter="$processid:9..." />
It is also possible to display workitems with a referrence to the current workitem:

External references can not be edited by the current workitem.
<item name="payment.ref"
type="custom"
path="workitemref"
options="($workflowgroup:Payment) "
label="Payments" />


## The Marty Tag Libray
External references can not be edited by the current workitem.

The WorkitemLink component requires that the subform workitemlink_resultlist is places at once in the ui:form

<ui:include src="/pages/workitems/parts/workitemlinkSearch.xhtml" />


The references can also be displayed in a table layout.

<item name="payment.ref"
type="custom"
path="workitemreftable"
options="($workflowgroup:Payment) "
label="Payments" />



## Layout and CSS
Expand Down
5 changes: 5 additions & 0 deletions src/site/markdown/forms/parts.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ The various input item definitions are called 'input parts':
<item name="invoice.date" type="date"
label="Date" />

### Currency Input

<item name="invoice.amount" type="currency"
label="Amount" />

### Select Boxes

You can also create different type of select boxes with predefined values:
Expand Down

0 comments on commit fa32db9

Please sign in to comment.