-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #584
- Loading branch information
Showing
5 changed files
with
98 additions
and
23 deletions.
There are no files selected for viewing
60 changes: 38 additions & 22 deletions
60
imixs-office-workflow-app/src/main/webapp/pages/workitems/parts/spaceref.xhtml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,43 @@ | ||
<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" | ||
<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"> | ||
|
||
<ui:fragment rendered="#{!readonly}"> | ||
<h:selectOneMenu style="width:20em;" | ||
required="#{empty required?false:required}" | ||
value="#{workflowController.workitem.item['space.ref']}"> | ||
<f:selectItem itemLabel=""></f:selectItem> | ||
<c:forEach | ||
items="#{byprocess?teamController.getSpacesByProcessId(workflowController.workitem.item['process.ref']):teamController.spaces}" | ||
var="space"> | ||
<f:selectItem itemLabel="#{space.item['name']}" | ||
itemValue="#{space.item['$UniqueID']}"> | ||
</f:selectItem> | ||
</c:forEach> | ||
</h:selectOneMenu> | ||
</ui:fragment> | ||
<ui:fragment rendered="#{readonly}"> | ||
<h:outputText value="#{workitem.item['space.name']}"></h:outputText> | ||
</ui:fragment> | ||
<ui:remove> | ||
<!-- Selection by space | ||
USAGE: options=default-selection; | ||
pre select the current users default section (first section the user is member of) | ||
</ui:composition> | ||
options=byprocess; | ||
only sections assigned to the current process are displayed. | ||
--> | ||
</ui:remove> | ||
|
||
<f:subview id="spacerefinput-view"> | ||
<ui:param name="byprocess" value="#{options.indexOf('byprocess') ge 0}"></ui:param> | ||
<ui:param name="default_selection" value="#{options.indexOf('default-selection') ge 0}"></ui:param> | ||
<ui:param name="space_ref" | ||
value="#{default_selection ? teamController.setDefaultSpace(workflowController.workitem):''}" /> | ||
<!-- (DO NOT REMOVE) default selection = #{space_ref} --> | ||
<ui:fragment rendered="#{!readonly}"> | ||
<h:selectOneMenu style="width:20em;" required="#{empty required?false:required}" | ||
value="#{workflowController.workitem.item['space.ref']}"> | ||
<f:selectItem itemLabel=""></f:selectItem> | ||
<c:forEach | ||
items="#{byprocess?teamController.getSpacesByProcessId(workflowController.workitem.item['process.ref']):teamController.spaces}" | ||
var="space"> | ||
<f:selectItem itemLabel="#{space.item['name']}" itemValue="#{space.item['$UniqueID']}"> | ||
</f:selectItem> | ||
</c:forEach> | ||
</h:selectOneMenu> | ||
</ui:fragment> | ||
<ui:fragment rendered="#{readonly}"> | ||
|
||
<h:outputText rendered="#{! empty workitem.item['space.parent.name']}" | ||
value="#{workitem.item['space.parent.name']} ⇒ "></h:outputText> | ||
<h:outputText value="#{workitem.item['space.name']}"></h:outputText> | ||
</ui:fragment> | ||
</f:subview> | ||
|
||
</ui:composition> |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Sections | ||
|
||
Imixs-Office-Workflow provides a set of custom input parts to assign a workitem to a section (space). | ||
|
||
|
||
## The spacreref Input | ||
|
||
The item part `spaceref` can be used to select a section from the organization matrix. | ||
|
||
```xml | ||
<item type="custom" | ||
path="spaceref" | ||
label="Department:" /> | ||
``` | ||
|
||
<img class="screenshot" src="teams/spaceref-01.png" /> | ||
|
||
No `name` is required here as a section is always assigned to the item `space.ref`. This is an internal data item to be resolved by the | ||
[Team Controller](../teams/teams.html) | ||
|
||
## Read Mode | ||
|
||
The component can also be displayed in read mode: | ||
|
||
```xml | ||
<item type="custom" | ||
path="spaceref" | ||
label="Department:" | ||
readonly="true" /> | ||
``` | ||
|
||
<img class="screenshot" src="teams/spaceref-02.png" /> | ||
|
||
### Selection by Process | ||
|
||
To allow only the selection of a subset of section assigned to the current process the option "byprocess' can be set: | ||
|
||
```xml | ||
<item type="custom" | ||
path="spaceref" | ||
options="byprocess;" | ||
label="Department:" /> | ||
``` | ||
|
||
### Default Selection | ||
|
||
It is also possible to pre-select a default value for this component. In this case the first section where the current user is member of will be assigned. | ||
|
||
Example: | ||
|
||
|
||
```xml | ||
<item type="custom" | ||
path="spaceref" | ||
options="default-selection;" | ||
label="Department:" /> | ||
``` | ||
|
||
**Note:** If the workitem is assigned to a process (`process.ref`) than sections assigned to this process will be fetched first! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.