Skip to main content

tabbed view - a is undefined

7 replies [Last post]
lennie
Offline
Joined: 2009-03-05
Points: 0

I have been unable to get this work

Static content appears just fine but any attempt to load another jsp with the include fails. basically the first time the tab is access the included jsp page flashes briefly the is replaced with text "a is undefined" The above code is from the template created inside Netbeans 6.5 with jMaki version 1.8.1. I tried a number of different property arrangements, written the code by hand, look several tutorials, the jmaki documentation, on glassfish 2 and 3 aswell as tomcat 6, but nothing seems to work. I'm not sure what I am missing here but this appears to be a javascript bug

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
rayo
Offline
Joined: 2008-06-12
Points: 0

it seems that you have a problemn with the name of the events.
I am doing that without any problem.
Try ti identify your evens setting true in the glues file to to the variables
// uncomment to turn on the logger
jmaki.debug = false;
// uncomment to show publish/subscribe messages
jmaki.debugGlue = false;

once you identify the events may you will detect a problem in your javascript code if any or a mistake in the event names or logic.

lennie
Offline
Joined: 2009-03-05
Points: 0

This is what the logger is spitting out and it is showing the undefined error. It apparently isn't recognizing the "include" type. (' type : undefined')

Publish : Topic: /jmaki/runtime/intialized message {}
Publish : Topic: /jmaki/runtime/extensionsLoaded message {}
Publish : Topic: /yahoo/tabbedview/undefined message {widgetId : 'yahoo_tabbedview1' , type : undefined
...
[X]
Publish : Topic: /yahoo/tabbedview/undefined message {widgetId : 'yahoo_tabbedview1' , type : undefined , targetId : 'yahoo_tabbedview1_tab_2'}
Publish : Topic: /jmaki/runtime/widget/loaded message {id : 'yahoo_tabbedview1'}
Publish : Topic: /jmaki/runtime/widgetsLoaded message {}
Publish : Topic: /jmaki/runtime/loadComplete message {}
Publish : Topic: /yahoo/tabbedview/undefined message {widgetId : 'yahoo_tabbedview1' , type : undefined
...
[X]
Publish : Topic: /yahoo/tabbedview/undefined message {widgetId : 'yahoo_tabbedview1' , type : undefined , targetId : 'bar'}

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Lennie,

Does your included JSP page include the tag direction:

<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsp" %>

It would be good to verify the individual tabs outside of the scope of the tabbed view.

If you can view them then we can look more into the Yahoo tabbed view.

-Greg

lennie
Offline
Joined: 2009-03-05
Points: 0

Hi Greg

Thanks for the response. I do have the tag library declaration included. I can assess the test.jsp with no error by appending it to the url. You can actually see the page content very briefly after a refresh the first time the tab is accessed then content is replaced with "a is unidentified". So I am sure it is not a problem with the included content.

I did try something else and got some strange results. In the test.jsp page I added another jMaki widget, Calender. The page then displays the added widget and the static text that was originally added. This test app uses 3 tabs with the include tab in the middle as tab 2. Tab one has static content. it always loads fine tab 2 with the include content has problems, tab 3 also has static content and normally loads fine. When I added the other widget to the include page, test.jsp, that page now loads but tab three now has a problem, there is a static message that says loading and it never completes the loading process. This doesn't change unless I remove the widget from test.jsp in tab 2. Then tab 1 and 3 load fine but the a is undifined error returns to tab 2.

piosystems
Offline
Joined: 2008-09-29
Points: 0

Hi,

I am having exactly the same problem and the experience is the same as that of Iennie. I am using netbeans 6.5 which is up to date with jmaki pluggins.
In addition, I also tried jmaki.dcontainer. The experience is practically the same as that of tabbed view. It only loads the first Content (only when there is a widget in it) and never loads the others. If there is no widget in the included content, I get the 'a is not defined' message. It looks like a bug!

Any way out?

Regards,
Pius

lennie
Offline
Joined: 2009-03-05
Points: 0

I did get a response else where relating to this problem and there was the following work around, I haven't yet had a chance to test this, so I don't know if it works

1. Comment all the contents in jmaki-min.js file (under resources folder).
2. Copy the contents from jmaki.js to jmaki-min.js .
3. Comment this line:

var wf = getExtension("widgetFactory");
if (wf !== null) {
// wf.findAndAdd(injectionPoint.id);
}

if you get a chance to try it, please let us know the results

piosystems
Offline
Joined: 2008-09-29
Points: 0

Hi lennie

I followed your suggestion and it worked fine.

Thanks!
Pius