Grrrr, I'm under the assumption that this is pretty trivial, but I can't quite figure it out. I'm sure you're all familiar w/ the Movies example(s). I'm trying to implement some functionality similar to that, i.e. the part where they bind a WODisplayGroup to a WORepetition of hyperlinks and the display groups selected object to some text fields. So when you click a hyper link, the text fields update w/ the data for the selected object in the display group.

Well I'm trying to replace the repetition - list of hyper links - w/ a WOPopUpButton. This way the user chooses an entry from the pop-up and the text fields update accordingly. As I understand, there's two ways I can do this, both of which I'd like to figure out.

The first is to add an "Update" button that would invoke an action, similar to selectObject in the examples, which simply sets the display groups selected object to the new selected object in the PopUp. The code snippets are like this...

// * * * * * PhoneNumbers.wod
PhoneNames: WOPopUpButton {
displayString = selectedPhone.Name;
item = selectedPhone;
list = phoneNumberDisplayGroup.displayedObjects;
}
UpdateButton: WOSubmitButton {
action = updateView;
value = "Update View";
}
PhoneNumber: WOTextField {
value = selectedPhone.Number;
}
// etc. w/ the text field bindings.

// * * * * * PhoneNumbers.java
public void updateView() {
phoneNumberDisplayGroup.selectObject(selectedPhone);
}

Now, I've noticed two things of interest. The first time the page loads, the popup displays the Name of one entry in the display group, but the text fields have the data for another entry. Second, the popups selected item never changes. Consequently, everytime I update the view, the selected object for the display group is set to the same object, regardless of what I tried choosing in the popup. Crazy... huh? What am I doing wrong here?

And now onto the second method of doing this. I'm under the impression that I can write some
"client-side, java/web script" stuff - enough buzz words there - which will a) recognize when the popup has changed and automate the update of the display group back on the server, or b) store the display group data, etc. on the client, updating to the server only in the cases of inserts/deletes/saves. Unfortunately, the java clinet stuff in the examples is pretty cryptic to me, and the books online stuff is just too theoretical. (Can you tell I'm a newbie?) Am I right about the two options above, or are they essentially the same thing? Also, is there a better reference for building java-client functionality, either shipped w/ WO or otherwise obtainable?

Hmmm, I think that's all I had.
thanks.
mx.

Michael G Xenakis PLATINUM technology, inc
[EMAIL PROTECTED] 800.365.7528 x43007


"Anyone who isn't confused here doesn't really understand what's going on!"

Reply via email to