My mistake, thought it was working with amountTextInput.getWindow(). For now
I'll leave it to my flag solution
Nope - the prompt is showing over it's owner window, which is the editor
popup. I'm still trying to think about how to get it to show up over the
main window but work properly...
On Sat, Oct 3, 2009 at 12:00 AM, Vicente de Rivera III <
thirdy.deriv...@gmail.com> wrote:
> AWESOME! The Prompt even
AWESOME! The Prompt even showed @ the TextInput. Works great now.To improve
it more, can I get the Prompt to show below the TextInput? Currently it
shows over the TextInput
thanks Todd
Out of curiosity Vicente, what happens if you open the prompt with the
editor popup as its owner? Instead of passing 'window' as the owner, pass
'amountTextInput.getWindow()'. My guess is that this will work, but I'm not
at a terminal in which I can test this.
-T
On Fri, Oct 2, 2009 at 6:04 PM,
Just looked into this. The issue isn't so much that previewSaveChanges is
being called too many times, but that clicking the OK button in the prompt
to dismiss the prompt is causing the row editor to try to save its changes
*again* (and again, ...). You can see this by hitting ENTER or SPACE to
d
yeah you're right mr.Todd, haha sorry.btw, I think this is a bug with the
TableRowEditor. I tried it with the tableroweditor demo, added a validation
that will prompt if the amount text input is empty
tableViewRowEditor.getRowEditorListeners().add(new
TableView.RowEditorListener.Adapter() {
That's really what the preview event is for though. We wouldn't want to
code the alert or any error message into the validator, because it's too
app-specific. So if we had a changes validator, it'd look exactly like the
preview event does (where it passes you the changes, and you return ALLOW or
> I guess that's why I did a Prompt error message solution.
>
How about tableViewEditor.setChangesValidator(
TableViewEditorChangesValidator );
where the isValid method of TableViewEditorChangesValidator accepts the
object/row from the TableData
I guess that's why I did a Prompt error message solution.
btw, ButtonPressListenter.buttonPressed attribute is really cleaning a lot
of my code, really cool
although not much of a big deal, when a user would create a new record/row
in the TableView, all the TextInput which should not be empty will all be
colored red.
I tried doing a simple boolean firstTimeInputFlag trick in the validator but
failed.
Any solution to this? thanks
On Wed, Sep 30, 2009
Why not just attach the appropriate validators to your text inputs? Then,
when they're invalid, they'll paint themselves to look invalid, which should
save you the burden of alerting the user as to why the edit is being
denied. Then your previewSaveChanges() method becomes a simple deny vs.
appro
I'm using TableViewEditor a lot and I noticed in my code that for all
TableViewEditor, I have
tableViewRowEditor.getRowEditorListeners().add(new
TableView.RowEditorListener.Adapter() {
private boolean shown = false;
private boolean invalid = false;
@Override
12 matches
Mail list logo