cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

The community will undergo maintenance on October 16th at 10:00 PM PDT and will be unavailable for up to one hour.

XUI and Java

berard
1-Newbie

XUI and Java

We do this sort of thing all the time, though you might just want to do it
all in Java and avoid ACL altogether.
That said, the XUI dialog is just XML, so you can use the standard DOM
objects to manipulate it.

Here's an example of one of ours:

this.listBox = this.xuiDoc.createElement("listbox");
this.listBox.setAttribute("fontsize","8");
this.listBox.setAttribute("height","150px");
((EventTarget)this.listBox).addEventListener("DOMActivate",this,false);
this.containerBox.appendChild(this.listBox);

this.insertButton = this.xuiDoc.createElement("button");
this.insertButton.setAttribute("label","Insert at Cursor");
((EventTarget)this.insertButton).addEventListener("DOMActivate",this,false);
buttonBox.appendChild(this.insertButton);

Then, all you need to do is handle the events:

public void handleEvent(Event e) {


if (e.getTarget() instanceof Element)
{
Element targetElement = (Element)e.getTarget();

if (targetElement.equals(this.listBox)) {

String selectedText = this.listBox.getAttribute("value");

Let me know if you would like a more specific example, or more information
about creating the entire XUI on the fly without using an XML file on the
filesystem.

keith

On Tue, Jul 21, 2009 at 11:20 AM, Niki Patel
<niki.patel@wolterskluwer.com>wrote:

> I’m hoping to get some XUI and Java related guidance.
>
>
>
>
> I want to populate a list control in a XUI dialog using Java. I don’t know
> which java object to use to manipulate the XUI dialog.
>
>
>
>
> I’m planning to do -
>
>
> Open XUI dialog from ACL.
>
>
> When click the Search button on the dialog – A Java method (I’m thinking to
> pass XUI dialog ID and list box ID as arguments) is called that talks to the
> database and retrieves records from it based on information provided in the
> XUI dialog. I want this Java method to populate the list box with the
> retrieved records.
>
>
>
>
> Any help will be greatly appreciated.
>
>
>
>
> Thank you,
>
>
> Niki Patel
>
>
>
>
3 REPLIES 3
berard
1-Newbie
(To:berard)

I should also point out that there is a good archive of code snippets and
the like from the adepters list at:
lfraley
6-Contributor
(To:berard)

Hi Keith,

I was just thinking yesterday that I should add your snippet from
yesterday to the repository.

Cheers!

Liz

berard
1-Newbie
(To:berard)

Liz,
Great to hear that you're still maintaining the site. I also always forget
to look there and post since I've been on the adepters list so long, and can
easily search my gmail archive. That said, I might be doing some new
development in the near future, so if I come up with any new tricks, I'll be
sure to get them in a format suitable for the site.

keith

On Thu, Jul 23, 2009 at 8:43 AM, Liz Fraley
<liz.fraley@single-sourcing.com>wrote:

> Hi Keith,
>
> I was just thinking yesterday that I should add your snippet from
> yesterday to the repository.
>
> Cheers!
>
> Liz
>
>
Announcements

Top Tags