Skip to content

Commit

Permalink
fixed read mode, added doc
Browse files Browse the repository at this point in the history
issue #584
  • Loading branch information
rsoika committed Jun 6, 2024
1 parent fdb739a commit 38a8e2b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<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}">
<ui:param name="space_ref"
value="#{default_selection ? teamController.setDefaultSpace(workflowController.workitem):''}" />
<!-- (DO NOT REMOVE) default selection = #{space_ref} -->
<h:selectOneMenu style="width:20em;" required="#{empty required?false:required}"
value="#{workflowController.workitem.item['space.ref']}">
<f:selectItem itemLabel=""></f:selectItem>
Expand All @@ -33,10 +33,9 @@
</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>
value="#{workflowController.workitem.item['space.parent.name']} ⇒ "></h:outputText>
<h:outputText value="#{workflowController.workitem.item['space.name']}"></h:outputText>
</ui:fragment>
</f:subview>

Expand Down
13 changes: 7 additions & 6 deletions src/site/markdown/forms/spaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Imixs-Office-Workflow provides a set of custom input parts to assign a workitem to a section (space).


## The spacreref Input
## The spaceref Input

The item part `spaceref` can be used to select a section from the organization matrix.

Expand All @@ -13,10 +13,9 @@ The item part `spaceref` can be used to select a section from the organization m
label="Department:" />
```

<img class="screenshot" src="teams/spaceref-01.png" />
<img class="screenshot" src="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)
**Note:** 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

Expand All @@ -29,11 +28,11 @@ The component can also be displayed in read mode:
readonly="true" />
```

<img class="screenshot" src="teams/spaceref-02.png" />
<img class="screenshot" src="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:
To allow only the selection of a subset of sections, assigned to the current process, the option `byprocess` can be set:

```xml
<item type="custom"
Expand All @@ -42,6 +41,8 @@ To allow only the selection of a subset of section assigned to the current proce
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.
Expand Down
File renamed without changes
File renamed without changes
1 change: 1 addition & 0 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<item name="Input Parts" href="forms/parts.html" />
<item name="Workitem Linking" href="forms/workitemlinking.html" />
<item name="User Input &amp; Selection" href="forms/userinput.html" />
<item name="Sections" href="forms/spaces.html" />
<item name="Countrycodes" href="forms/countrycodes.html" />
<item name="Validation" href="forms/validation.html" />
<item name="Autocomplete" href="forms/autocomplete.html" />
Expand Down

0 comments on commit 38a8e2b

Please sign in to comment.