Skip to main content

Help debugging issue with yahoo.tabbedview: "a is undefined"

8 replies [Last post]
mlejter
Offline
Joined: 2007-05-02

Hi! I am trying to use a yahoo.tabbedview widget from within a JSF web app to show several pages. The page frament looks like this:

If the file employeeTab.jsp does not exist, I get an error about being unable to load the page, as expected. If the file does exist, and its content is as simple as the word "testing" alone, I get an error "a is undefined" inside the tab (and it does not seem to matter what the content is) - and I don't think I have an "a" variable anywhere in my web app...

I am using NetBeans 6.5 with jMaki, and Firefox as my default browser. On Safari, I get "Undefined value" instead of "a is undefined".

If the content of employeeTab.jsp is in fact a JSP, and I put in code to print a line to stdout, then the line does appear in the console output - which suggests that my JSP is being run - but somehow the page output does not make it into the tab.

Does anyone know what this might be, or if not, how I would go about debugging it?
I changed "jmaki.debug=true" in glue.js, but I don't get any more output anywhere I can find...

Thank you!

Moises

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
jamesy123
Offline
Joined: 2009-02-27

Hi guys, I was having the same problem :)

and came to a similar solution as vicente_plata, my updated section looks like this,

var wf = getExtension("widgetFactory");

if (wf) {
wf.findAndAdd(injectionPoint.id);
}
processNextTask();

null and undefined are a bit odd in javascript but if(wf) will check for both

Thanks,
James

hibbon
Offline
Joined: 2009-06-04

I, also, was having this problem but with the dojo.drawer widget.

This fix worked for me but I had to modify the lines to:

var wf = getExtension("widgetFactory");

if (wf) {
wf.findAndAdd(injectionPoint.id);
}
processNextTask();

in both jmaki-min.js and jmaki.js

lennie
Offline
Joined: 2009-03-05

I too am having this same issue. This all seemed to be working fine when I was using Netbeans 6.1. I now have 6.5 and now there seemed to be some major issues. I believe this is a JavaScript bug with jmaki version 1.8.1. I tried to get netbeans 6.5 to work with an earlier version of jmaki but had no luck. My next attempt is to code it by hand with the new 1.8.1 and see what happens but I suspect the same result.

vicente_plata
Offline
Joined: 2006-10-05

Had the same issue with an accordion but found another workaround.

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);
}

Now I can use the "include" property and it works all right ;-) .

It solved the problem in FF3 (OS/X) and IE7 (WinXP). I think it should have some kind of collateral damage but I haven't seen anything til now.

Hope when the project ends, I can debug the whole jmaki-min.js script and check what's wrong there...

BR,

Vicente.

groverblue
Offline
Joined: 2006-06-23

I'm getting the same error. Below is the code for my page:


[b]page1.jsp[/b]

[code]
onclick="jmaki.publish('/jmaki/dcontainer/setInclude', { value : '/MyApp/faces/currentQuote/page2.jsp?Id='});dijit.byId('listDialog').show();"/>

[/code]


[b]page2.jsp[/b]


test

groverblue
Offline
Joined: 2006-06-23
lalbertme
Offline
Joined: 2006-10-08

I have the same problem but with the Dojo Accordion, using NB 6.5, Firefox, Glashfish, Struts 2.1.6

value="{items :
[
{label : 'Books', content : 'Book content'},
{id : 'bar', label : 'Magazines', include : 'datosGeneralesAspiranteSecundaria.action', lazyLoad : false},
{label : 'Newspaper', content : 'Newspaper content', selected : true}
]}" />

mlejter
Offline
Joined: 2007-05-02

Hi!

I could not figure this out - but I found a workaround:
I don't use include: for my tabs. Instead, I use content: and the content is an