Using the debugger in Netbeans 6.1, I'd like to step into a method of the JSF library (specifically method saveSerializedView of class StateManager), but I cannot figure out how to specify through the IDE the location of the source code for the JSF library. I'm even having trouble determining which jar file or files Netbeans is using for JSF.
This answer applies to Netbeans 6.1 circa September 2008:
It sounds as if you need to explore the "Libraries" dialog. Select "Tools" from the menu bar and "Libraries" from the menu. If you select "JSF" on the left, you'll see an association of jar files, sources (currently none in my Netbeans 6.1) and javadoc (which shows javaee5-doc-api.zip in my Netbeans).
What you need to do is add a new zip or jar of source files under the "Sources" tag.
An example of a fully populated library is the "Swing Layout Extensions" which has a jar file, sources and javadoc.
I take it your jars don't include the source, since you can't "step into."
In cases like these what I do is find the appropriate source (just StateManager.java in this case, if it's available, or jars that include source), taking care that it is the version I'm using. Inside my project tree, I create the package hierarchy to that specific class, and put that source in there. Even if the class exists in a jar, I can use this source to set breakpoints, etc.
Example for Netbeans7 and Mojarra 2.0.3
Create a new library(Tools->Libraries), call it for example Mojarra-2.0.3.
In the classpath tab add the 2 mojarra jars:
jsf-api.jar
jsf-impl.jar
In the sources tab, add two paths:
..\mojarra-2.0.3-FCS-source\jsf-api\src\main\java\
..\mojarra-2.0.3-FCS-source\jsf-ri\src\main\java\
Add the new created library to the project
download the jsf source and point to the working folder for source lookup..
It will dig into the code
Related
I have been working to find out this problem however with no success. I have a project that uses primefaces and .xhtmls, .javas etc. I am using Weblogic server in Intellij IDEA. I am trying to see changes from my browser when I change the .xhtml file and use "update classes and resources". However, I am not successful for that. By the way, this works when I changed the .java file. For .xhtml file there is no success.
PS: I use exploded artifact for that.
PS2: When I use "Update classes and resources" button, I see that ear is updated from windows explorer.
PS3: I used On 'Update' action with 'Update classes and resources' option, I used On frame deactivation with 'Update classes and resources' option and with different options, but no, nothing, no success.
I have similar setup and this works for me:
Deploying an exploded artifact;
Exploded artifact should be build on make (Ctrl+F9) - go to File > Project Structure > Artifacts and check "Build on make";
Build/make with IDE compiler (e.g not with maven) in order the IDE to understand that there is a changed file and to replace it.
The above is enough to update the xhtmls on every build/make of the project (Ctrl+F9), I do not use "Update classes and resources" neither manually nor automatically (e.g on frame deactivation)
To update resources on your server you need to press (Ctrl+F10).
For me the trick was to check "Unpack nested archives" of the .ear in the File->Project Structure:
(Noob alert!)
I want to add an SQLite component to a simple (one Java source file) app and would like to put it in a separate file. I was hoping to find something that would let me click a couple check boxes and creae the file using a template with the standard overrides and class declarations (e.g. ... MyClass extends SQLiteOpenHelper {...} and so on. Instead I can't even figure out how to add an empty .java file to the project. Google's Android Studio Tips 'n Tricks suggest navigating to the 'appropriate directory in the Project pane' and hit N. That gets me a dialogue that rejects my class name and seems to open a header file if I enter the name if the class I wish to extend (and without apparently adding anything to my project.)
I do not even see a way to add an existing file to the project. OK... I now see that if I create the .java file in the app directory (along side the MainActivity.java file) that Android Studio automatically includes it.
Is this Standard Operating Procedure? It leaves me feeling like I'm not leveraging the capabilities that Android Studio provides.
I'm using AS 0.5.2, openJDK 1.7.0
Thanks!`
If you're creating a new Java class from the Project pane, you don't need to add the ".java" to the name; you're specifying the name of the Java class, not the source file. It will figure out the filename automatically.
I've found this interesting bit of code link which implements a ViewController in the the Extension Library.
How can a programmer access this class from a managed bean. I have the Extension Library (8.5.2) installed. But com.ibm.xsp.extlib.data.ViewController can't be resolved. I may be in over my head here, but willing to take a plunge.
Thanks,
-- Jeff
Right click on Project in Java perspective/Package Explorer view. Use Build Path\Configure Build Path... menu. Use fourth tab Order and Export. Tick Plug-in Dependencies item. Now you will get access to ExtLib classes in Java code.
Unfortunately, class you found sources for is not part of the ExtLib distribution (package com.ibm.xsp.extlib.group), so you won't find it.
Is it possible to add the Primefaces component library to IntelliJ IDEA 11 so I can use autocompletion on those tags too? In Eclipse it automatically supports this, but I don't know why it does so or how it works so I am not able to fix this.
Here are two images on how it looks:
UPDATE and FIX
In order to fix this you have to go to project settings | libraries and then add the component library.
Set your cursor on the "http://primefaces.org/ui" text and ATL+ENTER. Choose 'Manually setup external resource'. 'Map External Resources' popup will appear. Choose 'Explorer' tab and select 'primefaces-p.taglib.xml' from primefaces.jar file.
You need to add a technology (I think it's called - might be a facet).
When you create a Web Module Project, you have the option of selecting additional technologies. JSF is an option for Web. Under the JSF node is a sub-node with 4 faces technologies - one of which is Primefaces (others are IronFaces, RichFaces, and another).
When you select the required support option, IntelliJ IDEA will download the required libraries and add them to an existing or new lib.
I believe this functionality is only available in the full version; i.e., not Community Edition.
To add primefaces to your project in Intellij, add the dependency i.e
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>4.0</version>
</dependency>
to your pom.xml. and compile your project.
After that, add primefaces URI to the list of tags usable on that page such as xmlns:p="http://primefaces.org/ui" and you will be fine.
We are using the default Oracle ADF Faces 10g default skin. It looks super nice, but we want to make tweaks to it (changing the CSS and also how certain components are rendered -- for example the table component will place buttons above and below the table component-- we want them only on the bottom-- this appears to require a programmatic change in order to change this behavior).
Has anyone had success creating their own ADF Faces skin? Please post what you had to do to change component behavior.
we followed this documentation for webcenter spaces:
http://www.oracle.com/technetwork/middleware/webcenter/owcs-r11-extend-spaces-wp-132596.pdf
The documentation makes use of an already existing oracle extension (how to download the source is in the document).
Once we add the application, we simply added a new entry in the META-INF\trinidad-skins.xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<skins xmlns="http://myfaces.apache.org/trinidad/skin">
<!-- Previous skins here ... -->
<skin>
<id>myskin.custom.desktop</id>
<family>My Skin</family>
<render-kit-id>org.apache.myfaces.trinidad.desktop</render-kit-id>
<style-sheet-name>custom/spaces/skins/myskin/myskin.css</style-sheet-name>
<extends>default.desktop</extends>
</skin>
</skins>
and added the css and img files inside the MET-INF directory in the specified paths (e.g. META-INF/custom/spaces/skins/myskin/myskin.css).
For custom applications on ADF the procedure should be the same.
Since Oracle 11g, Oracle prodives the so called 'skin editor' for your ADF applications.
Until 11.1.7.0, the skin editor was only available as an external application. In the current versions, you can choose for which application version you want to create the skin for your ADF Application (the wizard will give you an option for that when creating a new skin project).
Download Skin Editor:
http://www.oracle.com/technetwork/developer-tools/adf/downloads/index.html
Install instructions:
https://docs.oracle.com/middleware/1212/skineditor/ADFSI/adfsi.htm#ADFSI102
However, since 11.1.7.0 the skin editor is integrated with the Oracle JDeveloper IDE. I already used it for a couple of projects. Although it is easy to get into it and to configure your custom skin, you have to keep in mind that you have to do a lot of manual work to "fully" replace the default skin. There are some components which rely on icons - therefore you have to replace them one by one, using graphical editors (e.g. adobe photoshop or another comparable editor that suits you).