3.87 KB, text/plain
4.42 KB, text/plain
4.67 KB, patch
|Details | Diff | Splinter Review|
4.42 KB, patch
|Details | Diff | Splinter Review|
4.52 KB, patch
|Details | Diff | Splinter Review|
From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; m18) Gecko/20001127 BuildID: 2000112720 Build ID: 2000112720 on Win2Kpro 5.00.2195 SP1 IE5.5, and WinMe 4.90.3000 IE5.5 There is no indication as to whether the Java plug-in is installed. The menu item |Tasks|Tools|Java Console| is NOT disabled when the plug-in is not installed. When it is chosen, nothing happens. As there is no documentation or instruction available to a user, no hint that a plug-in is needed for an Applet to access Java, and given that all browsers in the past have installed their own JVM which gave automatic access to Java, the user is left with no idea as to what could be wrong or what to do about it. Two solutions are needed. 1. All UI functions which depend on an installed component must visually indicate that the function is unavailable if the component is absent. 2. The release notes available from the |Help|Release Notes| menu item for each release must contain a list of the optional components that are not installed by default, what browser functions they affect or enable, and instructions and/or links as to how to install them. A better remedy: My preferred solution to this type of situation is to design the UI with a proactive stance and not depend on the documentation. For menu items I define a visual state seperate from disabled to indicate that the function would be available but for a missing component. The visual cue I use is to display the menu item as enabled and stricken (with the font attribute "strike-through" which adds a horizontal line through each letter). The menu item also displays a tooltip to indicate the missing component (An MSWindows thing, the status bar might be used if a tooltip system is not available). If the menu item is chosen, a dialog box comes up describing the missing component(s) and providing a link or button to an installation instruction or process for the missing component(s). This allows your UI to still work clearly, independent of any missing documentation, but it should never be seen as an excuse to lower the priority of or not provide the related documentation. I submitted this bug after being verbally backhanded when I misinterpreted it in a related bug report as a Java Console failure in the presence of a working Java environment since I had no idea, reference, or indication that a plug-in was needed or missing. I only managed to finally confirm the true source of this problem through a third-party FAQ via a general web search. Reproducible: Always Steps to Reproduce: Close all the instances of the Mozilla browser. Remove the Java plug-in DLLs (like npjava11.dll, npjava12.dll, and npjava3s.dll) from the installation "plugins" directory (typically "c:\Program Files\Mozilla\Seamonkey\plugins"). Start a new browser instance. Note the state of the |Tasks|Tools|Java Console| menu item. Actual Results: The menu item |Tasks|Tools|Java Console| is still normally enabled. When you choose it, nothing happens. In the absense of any related documentation in the release notes, the user is left with no clue as to what is wrong. Expected Results: At the very least, any UI function disabled by the lack of an optionally installed component or a failed or disabled component should be visually indicated. Optional components, their default state, and access and installation instructions should be present in a file available from the Help menu, such as the release notes.
*** Bug 61473 has been marked as a duplicate of this bug. ***
Status: UNCONFIRMED → NEW
Ever confirmed: true
As of 12/6/2000, the Mozilla 0.6 release notes now include, under the Installation Notes section, the fact that Mozilla needs a JRE plug-in installed before it can run Java and a link to the Sun J2 plug-in. (Yay!) The |Tasks|Tools|Java Console| menu item still appears enabled and does nothing when there is no installed Java plug-in. (Boo!) But at least there is a buried clue now <grin>.
Assignee: edburns → xiaobin.lu
This suggests an interesting complication. Are all JREs or Java plug-ins required to provide a Java Console? What would happen if an installed plug-in to an installed JRE did NOT provide a Java Console? Would the menu item stay disabled, or would it be enabled and either do nothing or cause unexpected behavior? If the menu item stayed disabled, how would the user know if a working JRE plug-in was installed and correctly running? I've seen no list of installed components or plug-ins and their status in the UI as of yet.
Curtis, you brought up a very interesting issue and it is a very good question. To answer your fisrt question: Q: Are all JREs or Java plug-ins required to provide a Java Console? A: I am not sure they are *required*,but they do exist for all Java Plug-in release from Sun. Basically the vendor who wants to provide a Java plug-in to the clients must be aware that they need to implement some interfaces under mozilla/modules/oji/public. Among these interfaces,there are 2 methods called "isJavaEnabled" and "showJavaConsole". I think it is necessary for a good plugin provider to implement the "isJavaEnabled" method. At that time if Java plugin is installed and Java is enabled, the Java Console menu will not be greyed out. If the plug-in vendor provide the implementation of showJavaConsole, then click the Java Console will make you see the Java Console, otherwise, you will see nothing. I am not sure I have answered your question or not and I am very glad that you could give us some useful clue and suggestion. Thanks very much!
If the JRE plug-in is installed but the ShowJavaConsole() function returns an error (the console is not provided or there was some other problem bringing it up), will Mozilla at least provide an error dialog informing the user of the problem and/or suggested resolution? My point is: There should be no circumstance in which a UI action is not successfully accomplished and no feedback is given to the user as to what happened or what they should do to resolve the problem. Clicking a menu item and simply having nothing happen would be an example of this.
Based on Curtis's suggestion, I add an alert when the showJavaConsole returns an error or some exception were caught. Thanks a lot, Curtis!
Hi,Ed: Would you review the fix for me? Thanks very much and happy new year! Xiaobin Lu
Hi Xiaobin, please accept this bug. Your fix looks good. When my build completes, I'll test it and check it in to the trunk.
Xiaobin, I have tested this on win32 RTM branch and Solaris Trunk and it works. Please get sr=brendan or sr=waterson and I'll check this into the trunk. Perhaps we can put it in the OEM branch too.
Created attachment 21899 [details] [diff] [review] Use "oncreate" instead of "onclick", use windows.open instead of alert
Hi,Ben: I have created a new attachment for the fix of this bug.I used "oncreate" instead of "onclick" and now I can see the java console becomes grey even I do not clcik the Task menu. I used the "windows.open" instead of alert. Please give me review of the fix. Thanks for your guys suggestions and help! Xiaobin
you don't need to say 'new Boolean(false)' in js, var foo = false; is sufficient. other than that, email@example.com
Okay, r=blake, but there's some bad indentation in there and the grammar for the error message isn't correct (neither is the html outputted), but I'll fix it assuming you don't you have a cvs account. Do you need me to check this in?
+ doc.write("<HTML><HEAD><TITLE>Warning!</TITLE></HEAD>"); + doc.write("<B>Some error happens with your java plugin!</B>"); please fix this to include <BODY>, </BODY> and </HTML> also, please attach your fixed patch for review before committing. thanks.
Thanks for your guys' suggestions! I've corrected the mistakes and posted the new patch. Blake: I don't have cvs check in permission right now even I have applied weeks ago.Please feel free to correct some mistakes about the indentation and check in the patch. Thanks again! Xiaobin
Fix checked in, with these modifications: * no need to try/catch for the service retrieval, and thus no need for that warning message (which is good, since that text wasn't localizable anyways). * simplification of patch * proper indentation * change function name * move check to Tools popup creation * make the reference to the jvm manager service global Thanks for the patch!
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED
timeless: fwiw, <html> and <body> are optional, the DOCTYPE (missing) is not. Not that I have a clue what I'm talking about, but isn't this patch going to proove difficult to localize? What with the hardcoded error message and all. Seems like the whole bit that opens a window and stuff should be XUL not HTML. But like I said, I'm not an expert, I'll rely on blake's obviously superior knowledge in this area and assume that this is ok.
oops, i'm a moron; I didn't see blake say that he'd got rid of that part of the patch anyway! sorry! :-)
yes, i realized that and paniced yesterday. so i asked someone to design a xul window. i need to see what blake actually checked in.
Hi, Blake: Thanks very much for your help! Regards! Xiaobin
checked this on windows,mac and linux trunk. Are we going to get this in the branch as well or has this been already done ? Also ,I notice that the very first time you open the Tools submenu(with java plugin absent), "Show Java Console' is not greyed out. But it grays out once I click on it and then revisit the submenu. Is that the required behaviour or would we want to disable it even before the user clicks on it the first time ? Pls comment !
If you applied the new patch, the java console will grey out (without java plugin) even when the user does not click it. For example, you click File menu and then use mouse to go to Task, even you don't click the Task, the java console will grey out.
Yeah, I noticed this also. Can you file a new bug on me to investigate this? It sounds like a problem with oncreate possibly not firing.
Hi, Blake: I am not sure what you have noticed. I changed onclick to oncreate so that no click is to made java console become grey when java is not installed. I don't think there is any problem of oncreate. Am I lost here? Please comment. Thanks! Xiaobin
Am marking this verified since I have logged another bug for the new problem I saw while verifying this bug.
Status: RESOLVED → VERIFIED
*** Bug 56124 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.