Tutorial WAD050 – Using Tiles

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Tutorial WAD050 – Using Tiles

Post by Kingston » Wed Aug 09, 2017 12:12 pm

First post here, maybe in the wrong place. I'm a complete Visual LANSA newbie and I'm working my way through the Tutorials.

When I get to the last step of tutorial WAD050 - Using Tiles and Compile and execute the web page I get this error:

Fatal Error:

Failed to load xdemo_25.js

xdemo_25.js is a reuseable part xDemoWebDropDown. I've tried compiling that and then compiling my webpage again but keep getting that error. I have removed the dropdown and all references to it from my program and the webpage loads without any errors but the Employee Information tiles don't load either.

So not sure what is going on and I don't know how to debug to find out (maybe debug should be tutorial 001).

The LANSA support people who trained us have suggested these Forums might be a good source of information when they are too busy to help (which is often these days) so I'm hoping someone can help.

MarkDale
Posts: 106
Joined: Wed Dec 02, 2015 10:06 am

Re: Tutorial WAD050 – Using Tiles

Post by MarkDale » Wed Aug 09, 2017 1:45 pm

Hi,

Its as good a place as any to ask a question.

I don't have your complete example, but using a simplified version like this seems to work ok:

Begin_Com Role(*EXTENDS #PRIM_WEB) Layoutmanager(#Layout1)
Define_Com Class(#PRIM_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#Layout1) Height(0.26)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row2) Displayposition(2) Parent(#Layout1) Height(1.74)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Alignment(CenterLeft) Column(#Column1) Manage(#Direction) Parent(#Layout1) Row(#Row1) Sizing(None) Flow(Right)

Define_Com Class(#xDemoWebDropDown) Name(#Direction) Parent(#COM_OWNER) Top(30)

Evtroutine Handling(#Com_owner.Initialize)
#Direction.Add( LeftToRight "Left to Right" )
#Direction.Add( RightToLeft "Right to Left" )
#Direction.Add( TopToBottom "Top to Bottom" )
#Direction.Add( BottomToTop "Bottom to Top" )
#Direction.Find( LeftToRight True )
#com_self.Load
Endroutine

Evtroutine Handling(#Direction.ItemGotFocus)

Endroutine

Mthroutine Name(Load)
Endroutine
End_Com

If you create a web page, and use that source, compile it and run it, does it run ok?

Regards
Mark Dale

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Wed Aug 09, 2017 2:08 pm

One mystery solved: It wasn't displaying the tiles because when I commented out the #Direction.Add lines I accidently commented out the #COM_SELF.Load line too. The the program was very obediently doing absolutely nothing.

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Wed Aug 09, 2017 2:11 pm

Thanks Mark, no that example did not work either. Same error

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Wed Aug 09, 2017 2:13 pm

I suspect that these xDemo objects are supposed to be installed on the iSeries when LANSA is first set up and that didn't happen with us. I'm starting to think we ran into this problem earlier with running some of the Demo apps.

I'll go back through my emails and see if I can work out what I'm supposed to do. I think it might have been "log on as superuser, check out the objects, check them in" or something like that.

MarkDale
Posts: 106
Joined: Wed Dec 02, 2015 10:06 am

Re: Tutorial WAD050 – Using Tiles

Post by MarkDale » Wed Aug 09, 2017 2:43 pm

I'm assuming that you are using the iSeries as the webserver.

If thats the case, then you have to check in and compile the xdemo objects from your PC. Start with just that one that causes the problem. (xdemo_25)

Most people find its more convenient to use the localhost webserver on your PC to run your examples, but the iSeries should also work.

bark
Posts: 26
Joined: Thu Jan 05, 2017 9:56 am

Re: Tutorial WAD050 – Using Tiles

Post by bark » Wed Aug 09, 2017 2:48 pm

Hi Kingston

I'd revert back to basics.
1. perform a partition init and elect to import a) mandatory partition init and b) the demonstration material.
2. Once that's done, navigate to reuseable part xDemoWebDropDown in the repository, right click and select cross references. From the list of web pages that use this reusable, right click on one of them and execute, for example xdemow_48. If that executes OK in the browser, then you can be confident that the reuseable part xDemoWebDropDown is OK. You could try the same test for other reusables to see if its specific to this one or a generic failed to load issue.
3. If that's all OK, review your tutorial steps again to see if you've missed anything.
4. When you elect to compile check that you don't have the compile only if necessary ticked.

If you still can't make any headway, I'd suggest raising with lansa support in your region.

cheers,
barry

bark
Posts: 26
Joined: Thu Jan 05, 2017 9:56 am

Re: Tutorial WAD050 – Using Tiles

Post by bark » Wed Aug 09, 2017 2:58 pm

my advice was based on you executing locally. Your talk of the iSeries suggests you may not be running these locally (ie. localhost) but against an IBM backend. In which case, the reusable part may not exist on the IBM. Right clicking on the RPs properties will tell you the master repository state.
You would have to checkin and compile.
If that is the case, in the long term, you might be better off executing the tutorials locally as each time you interact with a demo object that doesn't exist on the IBM I you will encounter the same issue.

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Wed Aug 09, 2017 4:03 pm

Thanks guys. Total beginners question then: How do I run in localhost mode?

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Wed Aug 09, 2017 5:07 pm

PS I had tried Checking in and Compiling xdemo_25 but checking in is not an option because "This object is supplied by LANSA...you can only open in Read Only mode...". There is a way to get these objects over to the iSeries though and I think it revolves around logging in as user DCXPGMLIB and that gives me the needed authority. Trying that but running into another problem... Hopefully support will get back to me soon about it.

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Wed Aug 09, 2017 5:24 pm

In the meantime I have got around the problem by copying the xDemoWebDropDown into a new Reuseable Part and pointing my webpage to that instead.

MarkDale
Posts: 106
Joined: Wed Dec 02, 2015 10:06 am

Re: Tutorial WAD050 – Using Tiles

Post by MarkDale » Wed Aug 09, 2017 5:45 pm

ok thats good.

If you want to use localhost, its usually configured automatically during the lansa install on your PC.

In the IDE, if you look at the File --> Options --> Web panel, there is a property called Base URL. If its http://localhost/ or similar, try the test button next to it to see if its available.

http://docs.lansa.com/14/en/LANSA012/Co ... f181932244


If localhost is available then you should be able to select any web page component in the IDE, right mouse click and execute, and it will run that web page in the browser using a URL like:

http://localhost/lansa/dem/myweppage.ht ... eloper=yes

MarkD
Posts: 630
Joined: Wed Dec 02, 2015 9:56 am

Re: Tutorial WAD050 – Using Tiles

Post by MarkD » Thu Aug 10, 2017 9:39 am

Does running the examples from localhost, directly from your PC, work for you?

If you get that working its a much simpler way to use them than running them from you IBM i server - and certainly much simpler to set up.

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Thu Aug 10, 2017 1:32 pm

Hi Mark

No the Base URL is not set up as Localhost but as our Iseries: http://***.***.*.**:****/dcxpgmlib/

But Tech Support have contacted me and are going to do a GoTo session to try to sort things out for us with this and the DCXPGMLIB not being able to start the Host Monitor.

I'll let you know how we get on.

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Thu Aug 10, 2017 1:39 pm

Actually what I posted was the contents of the Web Page Base URL.

We don't have a pure Base URL field like they show in the screenshot on the page you linked or a lot of the other fields on that "Web General Tab". We don't even have a General and Design tab, just one tab with three fields on it Web Page base URL, Web Page Base URL 2 and Web Page Base URL 3 :lol:

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Thu Aug 10, 2017 5:06 pm

OK so just an update: I had a Goto meeting with Support and they got my File=>Options=>Web panel working properly (had to rebuild the partition I think it was)

After that, we could only get half of the Localhost thing working so they decided my IDE installation needs to be Repaired so I'm going through that process now and Support will catch up with me tomorrow.

Kingston
Posts: 50
Joined: Tue Aug 08, 2017 5:25 pm

Re: Tutorial WAD050 – Using Tiles

Post by Kingston » Fri Aug 11, 2017 8:42 am

Localhost is now working and I have completed this tutorial. All subsequent ones will be done in Localhost mode.

Excellent support from LANSA with a couple of long and thorough GoTo meetings and Brain Trusts thrown at it to get things resolved.

Thanks to everyone here for their help too.

John
Posts: 24
Joined: Thu Aug 10, 2017 3:21 pm

Re: Tutorial WAD050 – Using Tiles

Post by John » Fri Aug 11, 2017 2:12 pm

JUST Testing notifications and emails...

Post Reply