Menus and Forms

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
1/15/2008 2:19:25 PM
Gravatar
Total Posts 30

Menus and Forms

Can someone guide me on where I could more information on creating menus and forms in mojo? Thanks for the help.

1/15/2008 2:32:00 PM
Gravatar
Total Posts 18439

Re: Menus and Forms

Hi,

Can you clarify the tasks you are trying to accomplish?

In ASP.NET there can only be one html form on a page. When you say create forms I'm thinking you really mean create a page with some inputs that can be captured by submitting the page? There are really several ways to do it. If you want to create a re-useable feature that plugs into the content system then you would implement a user control that inherits from mojoPortal.Web.SiteModuleControl.

If you just want a quick and dirty single page type of form you can create a page that inherits from mojoBasePage and then just add your controls and logic to capture your data. Here is a hello world example. You can then create a content page (which creates a menu item) and then just set the url to point to your custom page using ~/yourcustompage.aspx syntax for the url where ~/ will resolve the site root for you.

So the existing menus are driven by the content pages. If you need custom menus for custom features there are several server controls that you can use including the asp.net Menu and Treeview controls.

Hope it helps,

Joe

 

1/15/2008 2:41:35 PM
Gravatar
Total Posts 30

Re: Menus and Forms

That works, thank you

1/15/2008 2:41:51 PM
Gravatar
Total Posts 30

Re: Menus and Forms

That works, thank you

1/15/2008 3:16:07 PM
Gravatar
Total Posts 18439

Re: Menus and Forms

Another thing I'd like to mention in terms of rapid development. We use Code generation to jump start most development. I highly recommend Codesmith Tools. In our svn you can find a .zip containing the older 2.6 freeware version which doesn't time out. There are a number of templates for mojoPortal development that I have written and continue to evolve located in the CodeSmithTemplates folder in svn. Most of them work even with the older freeware version but a few don't so I've put adapted alternatives in a sub folder. I use the newest version myself and highly recommend it.

I mention this because I have templates that can:

1. Stub out pages, modulecontrols, some ui databinding code for grids

2. Point it at a MS SQL db table and it can generate data access code for any of our supported dbs.

3. generate table scripts for the other dbs by using MS SQL

4. generate stored procedures for MS SQL and PostgreSQL for basic CRUD as well as optimized page selection of data.

5. generate a starter business class from a table that can consume the code generated by the data access template above

The new version of Codesmith also has a driver for MySQL so you can generate from MySQL or MS SQL. You can also author your own templates starting from mine or there are tons of templates included with it and also available online from others.

It really helps me be productive to use these scripts but I review all the code carefully after generation and most features require some cusomization.

Hope it helps,

Joe

You must sign in to post in the forums. This thread is closed to new posts.