VL Web error

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
atostaine
Posts: 395
Joined: Wed Jan 20, 2016 7:38 am

VL Web error

Post by atostaine » Wed Nov 16, 2016 11:25 am

I'm working on some code originally created using the application layout template.

Things were going along fine until I stripped a bunch of code out, now I can't load my web page locally using my IDE or running from the IBM i. I see this error. I don't see joblogs on the i when running it there.

Where can I find more details on this error?

Fatal Error:

Uncaught TypeError: b.gJa is not a function
Reported By:

http://localhost:8080/a4dds/lansa_14_1_ ... sa_prim.js, line 166

I will submit an incident to USA support tonight once I quit.


*EDIT* I don't get a chance to debug either.
Art Tostaine

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

Re: VL Web error

Post by MarkD » Wed Nov 16, 2016 11:48 am

Try recompiling everything in and around the problem area + clear browser cache.

atostaine
Posts: 395
Joined: Wed Jan 20, 2016 7:38 am

Re: VL Web error

Post by atostaine » Wed Nov 16, 2016 12:38 pm

Thanks for the reply. I've tried that and everything compiles.

I wish I could see an error somewhere :D
Art Tostaine

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL Web error

Post by Stewart Marshall » Wed Nov 16, 2016 2:06 pm

Errors of the type "Uncaught TypeError: b.gJa is not a function" are almost certainly VL runtime issues, and something we need to fix. What you're seeing is the equivalent of a Windows application crashing. This means we've either generated the wrong code, or we haven't catered for a particular RDMLX scenario.

Either way, it's almost certainly a LANSA issue to resolve, and won't be related to caching.

The reason you're seeing no log is that the app is still initializing, so there's no log to see.

With regards to the specific crash, it relates to the Source property of a List column. Some combination of factors to do with a particular field has stopped the run time creating the DataClass instance. We (clever technical people - NOT ME) had a think about this and the only scenario we can come up with that might cause a similar situation would be if there was a Define_Com of the same name as the field used in the column.

You can use any other name for the Define_com and it won't crash.

Code: Select all

Begin_Com Role(*EXTENDS #PRIM_WEB)
Define_Com Class(#PRIM_LIST) Name(#List1) DisplayPosition(1) Left(16) Parent(#COM_OWNER) TabPosition(1) Top(32) RowHeight(22)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnSTD_TEXT1) DisplayPosition(1) Parent(#List1) Source(#STD_NUM)

Define_Com Class(#STD_NUM) Name(#STD_NUM)

End_Com
Now that we know this is a way through the logic, we'll fix it up for the next EPC.

Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

atostaine
Posts: 395
Joined: Wed Jan 20, 2016 7:38 am

Re: VL Web error

Post by atostaine » Wed Nov 16, 2016 2:22 pm

Thanks Stewart. This is a good clue. Hopefully I can find my problem.
Art Tostaine

atostaine
Posts: 395
Joined: Wed Jan 20, 2016 7:38 am

Re: VL Web error

Post by atostaine » Wed Nov 16, 2016 2:34 pm

Stewart Marshall wrote:Errors of the type "Uncaught TypeError: b.gJa is not a function" are almost certainly VL runtime issues, and something we . We (clever technical people - NOT ME) had a think about this and the only scenario we can come up with that might cause a similar situation would be if there was a Define_Com of the same name as the field used in the column.
So you're not a clever technical person? :D

Before this all started, I recall adding a dataclass to a drop down list. Not sure why just yet. After reading your reply, my code was almost yours exactly. My prim_list.number had a dataclass(#ACCT), SOURCE(#ACCT), and there was a DEFINE_COM for #ACCT. I don't think I added the DEFINE_COM.

My web page loads, with errors that I can find now.

Thanks for this
Art Tostaine

User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: VL Web error

Post by Stewart Marshall » Wed Nov 16, 2016 2:45 pm

The Define_Com for the DataClass would have been added when you set the DataClass property for the DropDown. You'll only need one of these if the DropDownStyle property is Dropdown and you want to apply limits to how the data can be entered in the edit portion.

Good to know you're moving forward again.
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au

atostaine
Posts: 395
Joined: Wed Jan 20, 2016 7:38 am

Re: VL Web error

Post by atostaine » Wed Dec 07, 2016 11:01 am

I have another uncaught error. When a user selects a shipper in a Dropdown list I send the shipper# to another component. I see this in my browser...
Fatal Error:
Uncaught TypeError: Cannot read property 'setPSHIPPERNO' of null
Location:
Reusable Part: VAS001R, line 424
Call Stack:
1. Evtroutine Handling(#ShipperDD.itemGotSelection): VAS001R, line 424
Reported By:
vas001r.js, line 4603
The 3rd line is failing, though the debugger only stops on the previous line.

Code: Select all

Evtroutine Handling( #ShipperDD.itemGotSelection)
#wkShipperNo #WOHCUSTNO #Application.activeShipper := #shAcco002
#lcBillCatg.pShipperNo := #shAcco002
Endroutine
My property in lcbillcatg looks like this.

Code: Select all

define_pty pShipperNo set(pSetShipper)

ptyRoutine pSetShipper
define_map for(*input) class(#wkShipperNo) name(#pShipperNo1)

#wkShipperNo := #pShipperNo1

#com_Self.mLoad
endRoutine
Art Tostaine

dannyoorburg
Posts: 152
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: VL Web error

Post by dannyoorburg » Wed Dec 07, 2016 11:06 am

Hi,

it's just telling you that your reference #lcBillCatg is *NULL. (And that it can't set the pShipperNo property on a NULL reference)

Is it correct that that's a dynamic reference? Does it make sense that it could be *NULL?

Cheers,
Danny

atostaine
Posts: 395
Joined: Wed Jan 20, 2016 7:38 am

Re: VL Web error

Post by atostaine » Wed Dec 07, 2016 11:10 am

Ah yes. Thanks for clearing that up for me.
Art Tostaine

Post Reply