IBM Case Manager Script Adapter and Widget? - ibm-content-navigator

I am a newbie in IBM Case Manager and currently exploring case builder and case navigator. I am stuck with the Script Adaptor and widget parts of this. I googled it but unable to find anything that might be really helpful for me to start with Script Adaptor.
Can anyone help me to understand this or where can I get details about script adaptor and Wiring the Widgets?

I believe this explanation of the script adapter widget and it's use-cases is what you're looking for. Basically a script-adapter allows you to execute javascript-code upon triggering by 'a wire'.
You'd want to use script-adapters for "small" manipulations or logic that can be done with only a few lines of javascript-code (for readability and maintainability purposes). As your scripts get larger you might want to consider transforming it to a widget.
A widget (typically) is a html/javascript component that can be placed anywhere on the page(just like the out of the box widgets). Unlike scriptadapters (that are to be 'build' on the page itself), a (custom)widget is to be compiled and installed before it can be used on a page. The easiest way is by using the Eclipse IDE with this plugin, alternatively here's a DIY guide.

Related

GWT Image Cropping

I'm building a website using GWT and would like to add Image Cropping capability so users can upload their profile image and then crop it as they need to. I'm looking for something similar to Jcrop but in GWT.
I found THIS and THIS code samples how to crop an image on the client side but there is no UI part where user can select part of their image that needs to be cropped.
There were also couple of similar questions on SO (for example and this GWT with Jcrop) but nobody gave an example of the selection part of the image that uses pure GWT.
If you have an idea how to do it please share and I'm sure other people will leverage from this in the future.
Here is the example of what I'm looking for:
I recommend that you take route #1. I've been working full time in GWT for awhile and spend a lot of time looking for libraries, and this is one that I just don't think exists yet.
Here are your options:
Wrap Jcrop using a JSNI interface.
Pros: You have to include JQuery and JCrop, which are small and robust
Cons: Learning how to build your first JSNI wrapper can be a pain
Build your own from GWT Drag and Drop
Pros: "Pure GWT"
Cons: You probably won't handle all the edge cases that JCrop has figured out over time, nor be as featureful.
Port JCrop to GQuery
Pros: JCrop is open source and only around ~1600 lines of code
Cons: It's ~1600 lines of code, which is likely to be much bigger when ported to Java
If you decide to do any of the above, please open source it! I'd be happy to contribute, and it looks like something that I could use in my GWT projects as well.
GWT Cropper is a widget that allows cropping an image.
https://code.google.com/p/gwt-cropper/
Edited in 2015: as long as Google Code is about to be closed, the project has been moved to GitHub. The new address is https://github.com/w32blaster/gwt-cropper

UI Automation Verify v/s UISpy - The way they find UI elements

I am trying to automate UI interactions for a C++ MFC application. I tried to find elements' automation ID using UISpy and UIAVerify tools. I am on win2k3.
There is a tab control, the automation ID of which is visible to UISpy but not to UIAVerify.
The issue is - it is not visible even to the C# code that I write using Project White framework or ui automation framework of .net 3.0.
I want to get handle to this control the way UISpy gets it. Is there any way I can find out how UISpy does it?
Thanks!!!
UISpy is likely using Microsoft UI Automation under the covers. You can see how this works from this example*. There are all kinds of conditions on AutomationElement which you can use to locate them.
I've only worked with WPF tabs, but found it really, really hard to locate them by Automation Id. Instead I've been using the AutomationName property, with the title on the tab as the value. Not sure if White supports this, but I'm pretty sure you can get the original AutomationElement out and use it as per the example.
You'll also probably be looking for something supporting the SelectionItemPattern (there's a SelectionItemIsSupportedProperty), and you'll need to use the pattern to select the tab and make it active before you can see anything in it.
Please comment if you need any more info. It might help to know what the structure of your container with tabs in is.
*Declaration of interest since I wrote this.

Windowbuilder Pro - selectedElement binding not working

Following a tutorial trying to learn Windowbuilder Pro and running into some problems.
I have a list of an object, and want to create a binding function so that that when I've selected an object in the list, the corresponding objects name will appear in a button.
This type of operation never works for me. No object-specific options appear in the "selectedElement" column, just .
If I try to bind say a button to a specific beans property, it works well.
The documentation for Windowbuilder is so sparse I didn't think of anywhere else to turn.
Greatly appreciate any help with solving the problem or resources for learning Windowbuilder indepth.
I should point out the WindowBuilder docs on Swing Data Binding are expressly intended to document how to use the WB tools and not how to use the Swing Data Binding API itself. In fact, WindowBuilder expects you to have a fairly good grasp of Swing Data Binding fundamentals before you can effectively use the tools it provides.
Based on your question, it sounds like you need to create an as described in the WB docs here. To understand what an is and how to use it, you should refer to the Swing Data Binding docs themselves.
The bottom line is that, if you know how to create the Swing Data Bindings that you need by hand (in source), you should be able to more rapidly create then using WindowBuilder. WB strives to expose the Swing DB API in as pure a form as possible (warts and all). We have intentionally tried to expose the full power of the DB API without adding any simplification layer on top of it. The downside is that, if you are new to the Swing DB API and don't know how it all is intended to work, WB will not help you or teach you how to use it.

What UI is used on this pictures? (node based ui)

I'm wondering what UI library is used on the images below (it's from CityEngine). Does anyone know other UI libraries with similar capabilities (free floating, connected nodes with arbitrary UI elements)?
I think it might be a part of Eclipse/JFace/SWT toolkit.
or:
In particular from your second sample it does indeed seem to be Eclipse/JFace/SWT. To be sure about how it gets that particular graph-like look you'd have to see the source, but my guess is it might use GEF: http://eclipse.org/gef
While the surrounding UI is implemented with Eclipse/JFace/SWT, the editor is not implemented with SWT or GEF but with a custom non-public library based on OpenGL.
I found a stack trace where you can clearly see that no SWT/GEF/Draw2D code is involved:
http://forums.esri.com/CityEngine/forum-30031.html.txt
The rendering code lives in the package org.corebounce.lib3d2.

Developing a GUI Builder Application

I am looking for a nice framework for developing a GUI builder Application. We have an application where 100Os of custom data entry forms and their print formats are required and each client will need some modifications on these. We have a developed a product using java based open source templatnig frameworks so that the layout and field definition are stored in database and rendered dynamically to the user. We also have an appication to design these forms but cannot do visual design.
Now I am trying to make a Visual Form Designer application for generating these forms. Can any one suggest some open source frameworks than can be used? Can I use Eclipse Visual Editor? Or is it better to develop some kind of parser for HTML using AntLR and then parse the HTML output from already existing GUI builders like Dreamweaver to get the desired output?
Thanks and Regards,
-- Kannan
Oooh, great question!
I wouldn't know any readily availble framework that you can use. Depending on your needs however, I think rolling your own shouldn't be too hard.
First of all, you probably wouldn't want to give the users too much freedom. Freedom only gives them the opportunity to mess things up and make the resultant forms hard to use. I think from your description that the fields are pre-defined, so that the user only needs to customize which fields appear on a given form, and in what order. Order can be a simple thing like top-to-bottom. Some semi-intelligent automatic layouting could be used to conserve screen space. Adding a feature to group fields together would probably also be useful, and grouping would lead to some kind of standard "group" widget.
Accepting simplified functionality like this, you don't really need the flexibility of a full gui editor. A couple of listviews, maybe a property sheet and a preview window will be enough to give your users the functionality they need.
Of course, this only holds for screen forms. Print forms may be trickier to layout, as people may want to cram as many fields as possible into very little space so the entire form can fit on a single page or something. I really don't have any suggestions for you there, but maybe a similar "simplified" approach with some intelligent auto-layouting could work.
Overall, my advice would be: Keep It Simple! (S... ;)