[rules-dev] Attach custom editor on guided decision table cell
Esteban Aliverti
esteban.aliverti at gmail.com
Tue Jan 18 07:35:06 EST 2011
I'm not involved with Decision Table, but I think it should be relatively
easy (and useful) to implement what you need. If you need some guidance, you
can take a look at ConstraintValueEditor. These are the steps needed to get
a custom form open reusing WS configuration:
To get the configuration for a given *package.factType.fieldName* from the
active WS:
*CustomFormConfiguration customFormConfiguration =
WorkingSetManager.getInstance().getCustomFormConfiguration( packageName,
factTypeName, fieldName );*
(If not configuration is present, this method returns null)
To open the custom form popup:
*final CustomFormPopUp customFormPopUp = new CustomFormPopUp(
images.newexWiz(), constants.FieldValue(), customFormConfiguration );*
(The first argument is the icon, the second is the title and the third is
the configuration you get from the previous step)
Then you need to setup a handler for Popup's OK button:
*customFormPopUp.addOkButtonHandler( new ClickHandler() {*
* public void onClick(ClickEvent event) {*
* //here you can use: *
* //customFormPopUp.getFormId() -> to get the selected Id
*
* //customFormPopUp.getFormValue() -> to get the selected
Value *
* }*
* } );*
And, of course, remember to open the Popup:
*customFormPopUp.show( currentId, currentValue );*
*
*
I think you have enough material to start working.
Best Regards,
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com
On Tue, Jan 18, 2011 at 9:03 AM, c3310082 <c3310082 at pjjkp.com> wrote:
>
> Hi,
>
> We would like to render a custom editor when a user double-clicks on a cell
> that is present in web guided decision table in Guvnor 5.1 (or later). The
> custom editor needs to be invoked for cells that represent a particular
> fact
> model attribute only.
>
> This is somewhat similar to WS custom forms functionality available for
> guided business rules.
>
> So far we have seen the
> org.drools.guvnor.client.decisiontable.GuidedDecisionTableWidget class that
> contains implementation for:
> public void onCellDblClick(GridPanel grid,
> int rowIndex,
> int colIndex,
> EventObject e)
> in the GridCellListenerAdapter class that opens up text editor or drop down
> editor.
>
> We're new to GWT and Guvnor so would appreciate it if anyone can provide
> the
> high level steps.
>
> Thanks
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/Attach-custom-editor-on-guided-decision-table-cell-tp2279477p2279477.html
> Sent from the Drools - Dev mailing list archive at Nabble.com.
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110118/b3876945/attachment.html
More information about the rules-dev
mailing list