Page 1 of 1

Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 12:12 pm
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 1:45 pm
by MarkDale
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

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 2:08 pm
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 2:11 pm
by Kingston
Thanks Mark, no that example did not work either. Same error

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 2:13 pm
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 2:43 pm
by MarkDale
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 2:48 pm
by bark
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

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 2:58 pm
by bark
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 4:03 pm
by Kingston
Thanks guys. Total beginners question then: How do I run in localhost mode?

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 5:07 pm
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 5:24 pm
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Wed Aug 09, 2017 5:45 pm
by MarkDale
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

Re: Tutorial WAD050 – Using Tiles

Posted: Thu Aug 10, 2017 9:39 am
by MarkD
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Thu Aug 10, 2017 1:32 pm
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Thu Aug 10, 2017 1:39 pm
by Kingston
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:

Re: Tutorial WAD050 – Using Tiles

Posted: Thu Aug 10, 2017 5:06 pm
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Fri Aug 11, 2017 8:42 am
by Kingston
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.

Re: Tutorial WAD050 – Using Tiles

Posted: Fri Aug 11, 2017 2:12 pm
by John
JUST Testing notifications and emails...