AEM touch ui dialog 6.3 - Validation Error Icon is overlapping Description icon - dialog

I have a title component(touch-ui) in my project and made the title field mandatory by setting required(boolean) – true at the title property level. Now, when we save the dialog with an empty title field, validation fires up, but the triangular icon overlaps the description icon in the component. See the screenshot attached. Is there any way to resolve this?
Seeing the same behavior in We.retail title component.

It's the same in AEM 6.4. I've kind of assumed this was by design, so that more attention is drawn to the error.
If you look at the JavaScript behind the validation logic, you'll notice that the description icon receives the u-coral-screenReaderOnly CSS class as soon as a validation error appears, which results in its disappearance. It's not that the error icon overlaps the info one. The latter is explicitly hidden from sight.
This appears to be part of the Coral UI 2 client library. This isn't something you could fix on your own (an attempt to do that would be tricky and not maintainable). If you need this behaviour changed, you could try your luck contacting Day Care. It does look like a deliberate feature though.

Related

Are InputComponents and Dialogs incompatible?

In the simple Dialog below:
// choice of layout has no impact:
Container cont=new Container(new TextModeLayout(3, 1));
//Container cont=new Container(new BoxLayout(BoxLayout.Y_AXIS));
TextComponent firstName=new TextComponent().label("First Name").text(person.firstname);
TextComponent lastName=new TextComponent().label("Last Name").text(person.lastname);
TextComponent cost=new TextComponent().label("Cost per Session").text(person.getCostString());
cost.getField().setConstraint(TextArea.DECIMAL);
// NOTE HERE
// doesn't work: // works:
cont.add(firstName); // cont.add(firstName.getField());
cont.add(lastName); // cont.add(lastName.getField());
cont.add(cost); // cont.add(cost.getField());
Dialog.show("Edit Client", cont, new Command(CANCEL), new Command(OK));
Nothing appears in the Dialog unless I add the TextField instead of the TextComponent to my container at the NOTE HERE comment. This means I lose the nice appearance of the labelled input fields (yes I know I could label them myself, but they wouldn't look as good on different devices). My choice of layout manager at the top does not affect this issue (I've tried several). I can't find evidence online to conclude there's an incompatibility here, adding TextComponents and other InputComponents works fine on a Form, just not in a Dialog.
I'm having the same problem in another Dialog that uses PickerComponents. The PickerComponent doesn't appear unless I add the Picker itself, and then the Picker spawned from a Dialog looks all wrong. I'm hoping the simpler code question above will answer this quandary as well.
It's worth noting I've made no theme changes and this problem is noted in both the Android and Apple skins as well as on an actual Android phone. Thanks in advance for any help!
You shouldn't do input in a Dialog as it creates a very problematic user experience. If you would like things to look like they are in a dialog you can use styles and layouts to make a Form feel like a Dialog but you shouldn't use a Dialog.
The reason this fails is a bit complicated but here are the high level problems with using a dialog:
Dialogs don't grow implicitly - This is a huge problem for text input as the component needs space to resize with input and even more so for the animated TextComponent which needs to shift things around. The size of a Dialog is determined when it's shown and that's a big problem
This becomes a bigger problem on Android where the screen resizes during input and distorts the dialog completely. It's one of those things you'll only see on the device because it's really hard to simulate the virtual keyboard.
Scrollability is hard in a Dialog and text components need a scrollable parent so you can scroll between the various edit components
Picker component uses a form of Dialog to show input and this can collide with your dialog
Dialogs are hard to get right for suspend/resume behavior. Suspend/resume happens when the app is minimized or sent to the background. E.g. say you have an incoming call while typing in the dialog. When you go back to the app we want to show the last form. If we show the dialog it will block and we won't know which parent form to show anyway. So when an app is suspended dialogs are just disposed in the default code generated in the main class. It makes more sense.

BluePrism Spy element uniquely

I am spying one button from one browser based application. But I am getting the error saying more than one item found.
I am able to spy it only under the Accessibility Mode.
Although,I can see in my page that there is only one element in my page.
How to refer my element uniquely under Accessibility Mode as there is no exact path to specify.
If you are not able to see the elements, but Blue Prism is saying that there is more than one element found, then you may have unchecked these two attributes:
Visible
Screen Visible
Try setting them as "True", and please check if that will help with your problem.
Different approach would be to use one of these two:
Match Index
Ordinal
In a nutshell, they tell Application modeller about which item should be used, if there are multiple similar object visible.
I think it happens when you are having two fields having same properties like in a login page, username & password have same properties when you spy these elements using Blue Prism it shows the error.So, to get rid of that error, check the box ordinal in the application modeller popup(which opens after clicking ctrl+left click) after you've spied the element.I hope you got it.
Whenever we spy elements it is recommended to uncheck few attributes like parent url, input identifier, title etc.
"if there is an error stating that more than one matching window found" then at this point we have to uncheck "windows text" and check the ordinal attribute.
Please try below in Application module
Uncheck the checkbox with empty values
Uncheck the ParentURL.
You just need to check the Match Index and Ordinal property of the spied element. Ordinal will always gives you the unique element on the screen.
This is even mentioned in Blue Prism's Training module.
For Browser/Web-based application, Ordinal Attribute cant not be found.
To Spy the exact element, you can also use "Application Navigator" or UI Automation Navigator.

calling validation on tab click ( jQuery-Validation-Engine )

I have set up the jQuery-Validation-Engine addon (https://github.com/posabsolute/jQuery-Validation-Engine) and it works great on the submit button.
However, since i invoked a tab-based interface, it doesn't really bring the user back to the proper tab with the error fields.
As a work around, i've decided its better to validate each tab when leaving to the next one (as it is a step-wise tab) so that the button click at the end will only 'really' need to correct any errors on the currently displayed tab.
I'm using a simple anchor to call some div swaps (using negative margins for content off-page).
I'd like to invoke the validation method to this as well.
Documentation says it can only be attached to a form element.
Any ideas?
Update- i ditched the tab idea and am now using one big form so this no longer really applies.
No support led to going after a different approach. No longer needed.

Show alert with Indeterminate progress indicator Nokia Full Touch j2me

Does anyone know how to show a spinner for progress bar in a j2me alert?
Here is my piece of code so far:
loadingDialog = new Alert("Please Wait","Please Wait.",null,AlertType.INFO);
Gauge gau = new Gauge( null, false,
Gauge.INDEFINITE,
Gauge.CONTINUOUS_RUNNING );
loadingDialog.setIndicator(gau);
loadingDialog.setTimeout(500000);
displays.setCurrent(loadingDialog);
I am getting a horizontal line (like a slider). What I want is a spinner in place of it.
http://www.developer.nokia.com/Resources/Library/Full_Touch/ui-components/progress-indication.html
The second image (labelled non interactive gauge) of the link is what I am looking for:
The way how you create Gauge looks about right, in accordance with instructions given at Nokia page you refer as well as with Gauge API javadocs (available online):
CONTINUOUS_RUNNING
The value representing the continuous-running state of a non-interactive Gauge with indefinite range.
...
INDEFINITE
A special value used for the maximum value in order to indicate that the Gauge has indefinite range.
Explanation at Nokia page (somewhat vague) suggests the most likely reason for the issue you describe is that Nokia shows spinner only in forms, not in alerts:
- Indefinite gauge in Java Form uses spinner.
- An Alert uses a "barber shop roll" (animated bar of fixed length).
The way to test above assumption is to put Gauge like yours into the Form instead of Alert and see how device / emulator displays it.
If Form shows spinner, then the most straightforward workaround is to use Form instead of Alert. In this case, since Form lack "dismissal" feature provided by Alert, you would have to implement it yourself - eg by using TimerTask to schedule form replacement with previous screen.
Hehehe, the clue is in the link you gave --
Java Alerts do not use spinners due to layout constraints.
So it's not possible!

LWUIT Wrong size of scrollbar recalculate?

I'm using LWUIT on a Nokia Device.
The Form which is displayed contains several different LayoutManagers(), Flow+Y_AXIS and many Labels. Those get added in a Class which parses an XML file. This class gets returned and is displayed by another Class.
The scrollbar is sometimes "too short", meaning there's still text on the form which is cutoff, or hidden under the soft buttons.
Is there a function to have the layout recalculated?
I tried form.getContentPane().layoutContainer(); and form.invalidate(); form.revalidate();
Thanks in advance
Revalidate is enough to layout, it is invoked implicitly when showing a form. If you are using the scrollbar in SVN should be pretty accurate for all lengths of data, if you have a compiling working test case where the scrollbar isn't accurately calculated you can use the LWUIT issue tracker ( http://java.net/jira/browse/LWUIT ) to submit a bug report and attach said test case.

Resources