Database Application and Wizards

6 views
Skip to first unread message

baer

unread,
Nov 27, 2009, 8:06:09 AM11/27/09
to AribaWeb (aribaweb.org)
hello

i have a database application (option 5), connected to a MySQL
database ... this works just fine... maybe one question about that:

- I have a class "Book" that has a lot of members. I'm displaying the
list of books besides the "inspect" view (just like in [1]).
is it possible to hide some columns in the list, but not in the
"details" view?
I think I have seen this before in a video or read it in a document of
yours, but I can't find it anymore

well, then I tried to add a Wizard to it...I created the wizard just
like in [2], to keep it very simple. at this point I encountered some
difficulties:

1. although defining to display just a view members on the different
steps in the wizard, each time everything is displayed. see [3] for
the content of app/rules.oss...

2. when exiting to the home page without saving I encountered problems
with the code displayed in [4]...then I tried the Demo application and
it works fine when using
[code]
public AWResponseGenerating homeAction () {
return MetaNavTabBar.getState(session()).gotoHomeModule(requestContext
());
}
[/code]
I assume that's because I use metaUI?

3. but when using homeAction displayed in the previous point, I can't
use "public WizardActionTarget actionClicked (WizardAction action)"
anymore and so I can't alter the behaviour of "Save" in the last step

4. furthermore, when writing my own saveAction, the Book, that should
be created isn't stored into the database. I pass a new Book object to
the wizard, and at the end I tried to invoke ObjectContext.get().save
() but nothing happens (and I couldn't find a method to save the
context). what do I have to do in order to store the Book into the
database?

thanks for your help

best regards

[1] http://www.vimeo.com/2685671
[2] http://aribaweb.org/Documentation/Wizard/Wizard.htm
[3] app/rules.oss
frame class=model.Book field { after:zNone; }
frame=infoFrame class=model.Book { field=(title,author,edition)
{ after:zLeft; } }
frame=contentFrame class=model.Book { field=description
{ after:zLeft; } }
[4] http://aribaweb.org/Documentation/Wizard/Wizard.htm#wizard_actions_and_wizard_action_targets

baer

unread,
Dec 3, 2009, 10:50:46 AM12/3/09
to AribaWeb (aribaweb.org)
> i have a database application (option 5), connected to a MySQL
> database ... this works just fine... maybe one question about that:
>
> - I have a class "Book" that has a lot of members. I'm displaying the
> list of books besides the "inspect" view (just like in [1]).
> is it possible to hide some columns in the list, but not in the
> "details" view?
> I think I have seen this before in a video or read it in a document of
> yours, but I can't find it anymore

well, I think that's not possible only with metaui

> well, then I tried to add a Wizard to it...I created the wizard just
> like in [2], to keep it very simple. at this point I encountered some
> difficulties:
>
> 1. although defining to display just a view members on the different
> steps in the wizard, each time everything is displayed. see [3] for
> the content of app/rules.oss...

had to add the rules to model/rules.oss

> 2. when exiting to the home page without saving I encountered problems
> with the code displayed in [4]...then I tried the Demo application and
> it works fine when using
> [code]
> public AWResponseGenerating homeAction () {
>         return MetaNavTabBar.getState(session()).gotoHomeModule(requestContext
> ());}
>
> [/code]
> I assume that's because I use metaUI?
>
> 3. but when using homeAction displayed in the previous point, I can't
> use "public WizardActionTarget actionClicked (WizardAction action)"
> anymore and so I can't alter the behaviour of "Save" in the last step
>
> 4. furthermore, when writing my own saveAction, the Book, that should
> be created isn't stored into the database. I pass a new Book object to
> the wizard, and at the end I tried to invoke ObjectContext.get().save
> () but nothing happens (and I couldn't find a method to save the
> context). what do I have to do in order to store the Book into the
> database?

now I found it: ObjectContext.get().recordForInsert(someObject); (this
also works for objects that are already in the database, and it just
stores the updates on the record/object)
and before leaving the wizard just: ObjectContext.get().save(); and
it's stored into the database

so the points 2 and 3 are solved too, at least for the moment, as I
don't need to overwrite the save action ... but it would be good to
know if it's possible anyway ... if the question is not clear enough
please tell...
thanks

> thanks for your help
>
> best regards
>
> [1]http://www.vimeo.com/2685671
> [2]http://aribaweb.org/Documentation/Wizard/Wizard.htm
> [3] app/rules.oss
> frame class=model.Book field { after:zNone; }
> frame=infoFrame class=model.Book { field=(title,author,edition)
> { after:zLeft; } }
> frame=contentFrame class=model.Book { field=description
> { after:zLeft; } }
> [4]http://aribaweb.org/Documentation/Wizard/Wizard.htm#wizard_actions_an...
Reply all
Reply to author
Forward
0 new messages