| Summary: | Configuring Fields invisible on certain Devices | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Ralph Steiner <steiner.ralph> | ||||||||
| Component: | Scout | Assignee: | Stephan Leicht Vogt <stephan.leichtvogt> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | enhancement | ||||||||||
| Priority: | P3 | CC: | claudio.guglielmo, ivan.motsch, zimmermann | ||||||||
| Version: | unspecified | Flags: | zimmermann:
juno+
|
||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 207350 [details]
Example patch how UI could test on minimum size
Suggested Patch is ok save for one issue. Please use getter/setter for the minimumSizeForVisibility like the other properties. And next time you create a patch-file: please activate the bullet "Workspace" in the "Patch-Root" Box. Created attachment 209378 [details]
Modified Suggested Patch on AbstractForm/IFormField
Added the setters to the patch.
Fixed by introducing UserAgent, UserAgentUtility, IUiDeviceType and IUiLayer.
The UserAgent holds information about the kind of user interface used on the client side. With this information it's easy to make a field invisible. To make it even more easy one can use the UserAgentUtility.
Example:
@Override
protected void execInitField() throws ProcessingException {
if (UserAgentUtility.isMobileDevice()) {
setVisibleGranted(false);
}
}
The UserAgent is stored on the client as well as on the server session. This even allows to access the ui data on the server. The SessionView already takes advantage of this feature and displays the UserAgent as separate column (http://localhost:8080/#project#/process?actionId=tab.SessionsView).
Btw: This gives more flexibility than the proposed solution, thats why it has been preferred.
MIGRATION:
If you would like to use this feature with the swing ui you need to make a little adjustment in your SwingApplication. When creating a new session just add the UserAgent as second parameter and your fine.
@Override
protected IClientSession getClientSession() {
return SERVICES.getService(IClientSessionRegistryService.class).newClientSession(ClientSession.class, initUserAgent());
}
If you are using the other ui layers (rap or swt) you don't have to do anything.
Comment on attachment 209378 [details]
Modified Suggested Patch on AbstractForm/IFormField
added iplog flag
Comment on attachment 209378 [details]
Modified Suggested Patch on AbstractForm/IFormField
Removed iplog flag because patch has not been used.
verified ticket closed. deliverd as part of eclipse scout 3.8.0 (juno release train) |
Created attachment 207349 [details] Suggested Patch on AbstractForm/IFormField On formfields one needs an easy way to configure them invisible for certain environments. For example, a 'detail' groupbox should not be visible on iPhones. I suggest here something like 'int getConfiguredMinimumSizeForVisibility()'. UI's can then now access this information and render fields invisible, depending on the environment.