Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, November 23, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Platform & Application Architect
Forum to discuss the use of the SalesLogix Web Platform, Client and Customer Portals, and the Application Architect (For version 7.2 and higher only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Platform & Application Architect | New ThreadView:  Search:  
 Author  Thread: Creating a Custom Web Page Trouble
Lee Owen
Posts: 46
 
Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 10:37 AM
I'm trying to follow the exercise in the App Arch Help section called Creating a Custom Web Page. This guide has you create a table for MagicCarpets and it walks you through setting up a form in SLX web 7.2. There are 7 steps to do this. The documentation works fine until Step 5 which is Adding a Grid Form. Then the things they tell you to click in the instructions don't match the options I have on screen. I've spent some time trying to examine other Grids in SLX Web and see if i could figure this out. No luck. Has anyone followed the Help topic and created this page for MagicCarpets? Can anyone help me get through their Step 5 text? Specifically, i have trouble starting at #6 on that page.

Thanks for any input anyone can provide.
Lee
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 11:09 AM
I don't have the docs handy, could you post what those steps tell you?

BTW, I do remember there being something that doesn't match up with 7.2 release in those steps (they were originally written for a beta build)
[Reply][Quote]
Lee Owen
Posts: 46
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 12:39 PM
HERES THE TEXT FROM THE STEP 5 DOCUMENTATION. THESE STEPS DON'T MATCH MY OPTIONS IN 7.2.
THANKS!!!


Creating a Custom Web Page - Step 5
The following example details how to add a grid form to the Main view tabbed workspace.

To add a grid form

In Project Explorer, browse to the Contact entity, expand the node, right-click Forms, and then click New Form.

In the Properties dialog box, click, and set the Number of columns to 1, and then click OK.

In the Properties pane for the new form, set the Name to ContactCarpets.

Right-click an empty cell on the form, point to Insert, and then click Data Grid.

In the Properties pane, click the DataBindings property ellipsis button.

In the Collection Editor, set the following:

If necessary, remove any auto generated members.

Click the Add button drop-down arrow and select QuickFormCollectionDataBindingCollection.

ControlItemName = DataSource

DataItemName = MagicCarpets
This points the binding to the MagicCarpets property of the Contact.

EntityTypeName = MagicCarpet

In the Properties pane, click the Columns ellipsis button to open the Collection Editor.

In the Collection Editor, click the Add button drop-down arrow and select QFDataGridCol. Set ColumnHeading to Name and DataField to CarpetName.

Repeat the previous step to add columns for Capacity, Length, and Width.

In the Collection Editor, click the Add button drop-down arrow and select QFDataGridCol.
This column will provide a link to edit the carpet using the detail form created in Step 3.

In the Collection Editor for the QFDataGridCol, set the following:

ColumnHeading = Edit

Text = Edit

Expand DialogSpecs and set EntityType to MagicCarpet and Smart Part to MagicCarpetDetails.
This is the name of the form we created for editing/adding.

In the Properties pane for the Data Grid, set the following:

DataKeyNames = Id
This property indicates we’re using Id as the keynote instead of MagicCarpetId. The base entity class that all of our entities derive from provides an Id property that is mapped to the actual ID field for the entity.

EmptyTableRowText = No Magic Carpets Found…
This string to displays in an empty grid if there are no Magic Carpets associated with the current contact.

EnablePaging = True

PageSize = 10

Select the form, and then click the Toolbar property ellipsis button.

In the Toolbar Editor, select Right, click Add, and then click Button.

In the Properties pane, set the following:

ButtonType = Icon

ControlId = btnAddCarpet

Image = Click the Image ellipsis button, and in the Select Image Resource Image Editor, click the plus_16X16 image, then click Select. The image file is shipped with the support files for the Sage SalesLogix portal.

Expand the OnClickAction propery, click the Action ellipsis button, and in the Action Item Designer select Dialog Action. Then, set EntityType to MagicCarpet and Smart Part to MagicCarpetDetails and click OK.

IsDialogCloseAction = False

Save the form.

On the Build menu, click the Build Web Platform button on the toolbar.
This builds the Web version of the quick forms as user controls (ascx files) and their corresponding resource (resx) files.

Continue with step 6.

[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 1:05 PM
The steps that start with "In the Properties pane, click the DataBindings property ellipsis button" are wrong. Instead, just go to the Columns editor fro the grid and add the columns. When done, just slect the datasource for the grid, set that in the DataSource property.

Make sense?

Post back here if you get stuck again.
[Reply][Quote]
Lee Owen
Posts: 46
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 1:37 PM
Forgive my ignorance but i'm still having problems.
I added my columns in the column editor per your instructions. Then I have troubles.
When i set the datasource for the datagrid in the properties pane, i choose, the only option which is MainEntity. Then i move through the rest of the instructions and try to build the project. This form crashes with huge errors when building.

can you walk me through this?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 1:55 PM
Your form with the grid needs two things on it. A DataSource and a DataGrid.

Get rid of everything in your form now and let's start clean. This is from memory so hopefully I don't miss any steps

1) Add a DataSource component.
2) Select the DataSource control and set the following properties:
........EntityType - set to your entity that you want to show in the grid
........GetByProperty - set to the child property on the entity from the relationship from your form's entity to the child entity you want to shot in the grid
........IsCollection - True
3) Add a DataGrid and set the following properties:
........DataSource - the name of the DataSource you created in step #2
........Open the Columns collection and add a column for each field you want in the grid
................The default column type is BoundField (which shows as something like QFDataGridCol), once you add one you can select the field name from teh dropdown for DataField
................Add a Link column or Edit column for the hyperlink column to launch the "edit" form or go to the record. Use a Link column if you want to move to that entity when clicked, use an Edit column if you want your edit form to launch in a dialog (which means you've also added the edit form into the Dialog Workspace for the page as well)

Hope that makes better sense.

-Ryan
[Reply][Quote]
Lee Owen
Posts: 46
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 4:07 PM
First. You're my freakin HERO!.
Second. I twisted my brain trying to get this.
Quote:
GetByProperty - set to the child property on the entity from the relationship from your form's entity to the child entity you want to shot in the grid

whew!!!
So I can now Build and Deploy successfully.
When I go to view MoreTabs and try to see my grid, I get this:
error CS0117: 'Sage.Platform.WebPortal.Binding.WebEntityListBindingSource' does not contain a definition for 'focus'

any ideas on that?

THANKS FOR ALL YOUR HELP RYAN!!!
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 04 Oct 07 4:25 PM
Does "focus" mean anything to you? Are there any properties for the DataSource (or fields bound for columns in your grid) that might be named this? Did you add any LoadActions or code for Toolbar items?
[Reply][Quote]
Lee Owen
Posts: 46
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 08 Oct 07 8:47 AM
I didn't create anything called Focus. I didn't add any loadactions or toolbar items. When i go look in the code where this is happeneing, its where the Databinding occurs. Something is wrong with my databinding. I"m playing with it trying to figure out what i've done wrong. If you have any additional ideas, please post them.

thanks,
Lee
[Reply][Quote]
Lee Owen
Posts: 46
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Oct 07 9:45 AM
Ok, I've made progress. I really have no idea what i'm doing and i'm just playing with things until i get it going. Nice method. Anyway, I now have a custom tab for MAGIC CARPETS that shows up. When i add a new one, it goes to the database, but the ContactID doesn't end up in the database. Furthermore, when i manually add ContactID in the data table, i still don't see the records in my grid when i navigate to that Contacts record.
I feel like the breakdown is on the creation of the Relationship that links my ContactID in Contacts to my ContactID in MAGICCARPETS. I of course have followed the instructions in the help section about creating the relationship, but nothing i do seems to make it work.

Is there any way you can post some instructions about how to create the relationship? I'm basically just trying to link a custom table (MagicCarpets) to my Contact record so that when i navigate through the contacts, i can see their grid of MagicCarpets in the Tabs pane. I feel like i'm close since i can now view the grid and add to the database. I just can't seem to have the added recs, get assigned a ContactID and i can't get the ones with ContactID (Manually added) to show up in my grid.

Any help is greatly appreciated.
Lee
[Reply][Quote]
Lee Owen
Posts: 46
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 09 Oct 07 1:29 PM
OK... more progress. I keep posting here hoping someone will jump on with me and go through this.
I now have my grid and i can add new recs and they go to the database. I'm now able to also associate the COntactID with the MagicCarpets table. So all i have left is for the records i created to show up in the grid i created. They go to the database, but the grid says no records found. So if anyone knows what i could be missing or where the specific part of the code is that calls up the MagicCarpet records for a certain ContactID, please let me know.

Thanks to all.
Lee
[Reply][Quote]
Lee Owen
Posts: 46
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 11 Oct 07 11:50 AM
I got this working. One key step is that the documentation i was following from 7.2 help has you create a relationship that should go both ways. So in the interface, the top and bottom are filled out. Didn't work. I saw a tip to try creating two separate relationships and it worked. So i created a one way under contact back to magiccarpet and a one way under magiccarpet back to contact. In each one way, the top half of the form was filled in only.
Not sure why this made a difference but it did.

Hope this helps someone else.

I'm still fighting issues with toolbar buttons in these pages, but that's in another thread.


[Reply][Quote]
Alex G
Posts: 1
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Oct 07 10:51 AM
Hi Lee,
I had the same problems figuring out how to get the Relationship Properties working for this example. In my case the scenario works when I am cheating 1:M from Contact and having the "bottom part" filled out for "both way" relationships.

However is it not strange that the "reverse" relationship is created in the class (MagicCarpets.cs) but not shown under the "relationship properties"? Undocumented feature?


[Reply][Quote]
Bob (RJ)Ledger
Posts: 1103
Top 10 forum poster: 1103 posts
 
Re: Creating a Custom Web Page TroubleYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Oct 07 10:00 AM
SP1 for v72 is now available.. it will really help you when it comes to dealing with relationships..

There were some nasty bugs here and they ahve been fixed.

rjl
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/23/2024 1:03:16 AM