JSF :: Element Is Not Rendering / Parsing While Migrating
Jan 24, 2014
I m trying to migrate JSF 1.2 project with myfaces to JSF 2.0 with myfaces 2.0 jars on weblogic10.3 server. Found some problem related build and publishing after resolving them when i hitting my application all JSF html tags are coming in browser as it is they are parsed to html tags. all h: tages are coming as it is on my browser they are not converted to html tags for browser display.
I want to run a program to add an element as the third element of stack without changing rankings, I am trying to use two stack and I don't know how to push the top of first stack in the second: push(top(); this line
public void ADD(int element,int i ){ if(isEmpty(true)){ push(element);} else{ makeNull(); while((i<=3) && (isEmpty(false))){ push(top(); }
I have a student class with fields names and Gender. Now, I have a students' array. such that I can create multiple students' classes: student a, student b, student c e.t.c and store them into the students' array. Now, I store this students' array in a JComboBox and want to only display the names of these students in the array. Such that the JComboBox lists only the names of student a, student b and student c. . When a user clicks on a selected Item on the JComboBox, even though, it was a student's name that was selected, I want the selectedItem to be a object of the Student class. This, I have learnt works with JList by writing your own custom JList models and then DefaultListCellRenderer. Is there anyway, one could also do this with JComboBox?
//Main Method import StudentList; import Student; import ViewGui; import Controller; public class SwingMainMethod {
I have 4 Primefaces bar charts which sometimes renders, sometimes not. In one of them, I inject a http user session attribute and use it to render the chart (the idea is to show only the data that corresponds to the (logged in) user department).
There are 4 session beans which I'm using the javax.enterprise.context.RequestScoped. Sometimes, the Glassfish destroys the instance as expected, but sometimes not.Based on Exception below, how can I resolve it?
The xhtml below shows the main code for only 2 of the 4 bar charts:
<p:tab title="Horas de Treinamento (por Funci)" closable="true" > <p:barChart id="horasBars" value="#{chartHorasFunci.modelHoras}" legendPosition="ne" orientation="horizontal" seriesColors="AA5555, 00438F" xaxisLabel="Horas" yaxisLabel="Funcis" title="34 Horas de Treinamento (Orçado/Realizado) por Funci"
[Code] .....
The Exception:
SEVERE: Error Rendering View[/capacitacao/capacitacao/index.xhtml] javax.el.ELException: /WEB-INF/include/capacitacao/capacitacao/List.xhtml @145,38 value="#{chartHorasFunci.modelHoras}": org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke private void br.com.bb.upb.diage.atb.capacitacao.beans.ChartHorasFunci.initialize() on br.com.bb.upb.diage.atb.capacitacao.beans.ChartHorasFunci@3e9c727c at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
I have a problem I must solve and could not find an answer after a couple weeks of research, so here I am. I have created a custom Table Cell Renderer than extends DefaultTreeCellRenderer. The mission of this renderer is to set the branch icons depending on conditional statements. There are 3 conditions, and each one should render a different icon. These conditions must be tested against all branches in the tree. This means that using something like setOpenIcon() and setClosedIcon() will not work since it seems as though these methods set all branches to a specific icon (I could be wrong about that though). Below is the code for my custom. I made comments so it is easier to understand what I want to happen and what is not happening.
/**Custom Cell Render that will set the icons for the tree branches and the leafs*/ private TreeIconCellRenderer extends DefaultTreeCellRenderer{ public Component.getTreeCellRendererComponent(JTree tree, Object value,boolean selected,boolean expanded, boolean leaf, boolean row, boolean hasFocus){ //Get defaults in case there is no need to renderer
[Code] ...
What I really need to know is why the renderer is not differentiating between the leaves and branches. The logging statements I have added confirm that the branch block of code does not execute.
I'm currently working on a project which requires to have text displayed along a curve. If found this entry a good starting point. It works fine for me on my develompment machine, however the customer on his machine noticed some issues.
The basic idea is to define a path for the text, explode the text into the separate characters and animate them along the path the fraction of the character of the whole lenght. So with a animation duration of 10 seconds and a label of ten characters, the first character would be animated along 1 second, the second 2, and so forth.
This is done by jumping to the designated time in the animation, start the animation and stop it immediately.
Now the problem as I see it, for stopping the animation a separate timer is used, so it can happen that at the time the animation is actually stopped, the animation moved further than the first frame. The effect is that the last characters of the text appear in front (wrapped around).
As I have no evidence to prove or disprove my theory, what do you think is this plausable? I can see a workaround for this issue by defining a path for each character and then let the animation run to the end. While I can set the duration of the animation to 1 ms which should not be visible to the human eye, I'm not able to make the characters invisible and turn the visiblity on when the animation finishes, they always become visible at the start.
Or create my own animation/transition for placing the characters.
I am fairly new to FX but well experienced with Swing. Since I am familiar with the Swing concept of rendering a let's say JTree I got problems with the FX model of - in this case - TreeView.
I read several documentations about FX. From the API doc of TreeItem I adapted the file browser example to create an own class like this :
But this did not change anything. I try to override toString() in both classes but even this did not change anything.
What I wonder so far:
Why is item in PathNodeTreeCell always null?What is the difference between the item I get in the updateItem method and the one I get from getItem() (line 10)How can I connect the PathTreeItem class to the PathNodeTreeCell classShould I always call super() in the constructors? (I delved a little bit in the sources of TreeItem and TreeCell and I found some setup code there )Is it ok to extend TreeItem in the way I does for my custom PathTreeItem class? ( I wonder if this is a cyclic dependency when I extends TreeItem in this way )How can I sort the nodes? I added the Comparable interface but this not change the sorting of the nodesAre ther some tutorials of TreeItem/TreeCell with no trivial objects like String ?
I want to adapt an well running Swing application to FX. In the Swing app I used a mechanism to load the child path's of a directory in a separate thread to avoid freezing if the UI if there are much child elements. I guess in FX I should use the Properties pattern to achieve this should I?
I'm new to JavaFX and I'm exploring its 3D capabilities, and in particular the TriangleMesh visualisation.
I have developed a very basic application, based on the Molecule Sample Application provided in the examples, that read a mesh file generated by an external tool (Gmsh) and displays it. Pretty basic.
My problem is that the rendering is not what I expected (see attachement)
My guess is that I got something wrong with the texture coordinates or the triangles orientation.
- I don't what to have textures attached to my meshes. These are 3D meshes used for scientific simulation purposes. I thus have set all texCoords to 0. - I don't control the orientation of my triangles, they are generated by Gmsh. Their orientation is also not interesting for my end users so I would like to display all triangles the same way. I used the meshView.setCullFace(CullFace.NONE); method.
I would like users in an application to be able to access and edit their user profiles (Application A). The problem is that the user objects (entities, dao, beans) are handled in a separate application (Application B) which is specifically for managing user accounts. Importing the java sources for App B into App A could be messy and might need configuration of the persistence unit and connection. I'm thinking it would be better to inject an EJB from App B to App A to query the user DB and return the results so a user profile form is rendered in App A.
I know how to inject EJBs within the same application, but I'm not so sure about how it's done across different applications or even if that's the most advisable way to achieve what I want. it's better practice to inject an external EJB into App A or simply import the classes from App B and use those.
@Stateless public class UsersDaoImpl implements UsersDAO { @PersistenceContext private EntityManager em;
The problem is from "perspective" in -webkit-transform. Without it's ok. But with this one, the result is different from a standard browser like chrome or safari.
Untitled.jpg I have been working over this game lately, and i have managed to render multiple images from an array. in this fashion. I created a Main() class with the following in it:
public Main() { for (int i = 0; i < fuel.length; i++) { Random r = new Random(); changef = r.nextBoolean(); y = (-600 * i) + r.nextInt(300); if (changef) fx = 325; else
[Code]...
Also, this is the Fuel image class and Obstacle image class:
public void tick(Player2 p2) { y += dy; Random r = new Random(); if(x >= p2.getH()) { y = -40 - r.nextInt(700);
[Code]...
(Fuel and obstacle class are identical but separate for better accessibility) I even have player class with an image listening to key events and also a scrolling background. The problem is when i run the game, the images of obstacles render themselves as i want, except for that they overlap each other, i need to prevent over lapping of this images. The fuel is read and obs is black. Heres a glance of how it looks.
As implied by the title, when I am rendering images of the type "BufferedImage" unto a Swing application, the images' pixels are not consistent in size. Some might be larger than other, and some might be smaller than other.
Here is a screenshot of what I am talking about (you might need to zoom in a bit because the image is so small): [URL] ....
And here is also some code for you. The images are actually from a sprite sheet, which I first load in its entirety and then split up in an array.
Java Code:
public static BufferedImage sprites[]; ... public void loadSprites(){ try{ BufferedImage bigImage = ImageIO.read(new File("SOURCE/BLA/BLA/THIS/IS/ACTUALLY/NOT/THE/REAL/SOURCE/IN/CASE/YOU'RE/WONDERING/I/JUST/DON'T/WANT/YOU/TO/FIND/ME/AND/RAPE/ME")); sprites = new BufferedImage[16 * 16];
I've been staring at my code for the past few days and I just can't get it to work out. I'm trying to parse a DOM object with the following XML loaded:
I'm trying to get all of the attributes that I care about out of the <record> tags (date, event, etc ...) and stick the data in a wrapper class (DocumentData). If you run this, you'll see that it is close to working, but I'm having trouble getting the attributes in the <subject> and <return> tags (I need to get the errval and uid attributes).
I'm simulating temp/humidity values and want to separate the string value reported and parse each part (left and right) for their respective values. However, I'm having trouble figuring out how to parse the right hand side of this string value, I can get the left using split (shown below), but I think split removes the right hand side of the string value.
ERROR: 'No more DTM IDs are available' javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.dtm.DTMException: No more DTM IDs are available at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:716) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313) at com.TestXSLT.main(TestXSLT.java:34) Caused by: com.sun.org.apache.xml.internal.dtm.DTMException: No more DTM IDs are available
So the following is my code for the Terrian Generation of my game, however the way i have it rendering all the tile rectangles as opposed to just rendering whats visable on my JFrame causes lots of lag.
These are the variables and Rectangles inside _TerrianGen.class
//CHUNK static int chunkx =2048; static int chunky =2048;
//RECTANGLES public static Rectangle[][] tile = new Rectangle[64][64]; static int[][] blockType = new int[64][64]; //0=Grass 1=Dirt 2=Stone 10=Brick 11=Coal 12=Iron 21=Gold 22=Diamond -1=null
This is the Init() code
for (int x =0; x < chunkx-32; x+=32){ for (int y=0; y < chunky-32; y+=32){ tile[y/32][x/32] = new Rectangle(x, y, 32, 32); blockType[y/32][x/32] = -1;
I am suppose to display some information from some text files I tried to do that but the output gives me information from one text file and not information from all text files.
public static void main(String args[]) throws IOException { String occupations; double unemployRate_By_Occupations_2008; double unemployRate_By_Occupations_2009; double unemployRate_By_Occupations_2010; //declare the file object and open the file "occupations.txt"; File myFile = new File("occupations.txt");
[code]....
The first text file is:
2.5 3.3 2.6 3.1 2.4 2.7 2.6
[code]....
the second text file is:
4.6 5.7 5.2 6.9 4.5 4.3
[code]....
The third text file is :
4.8 5.6 5.2 6.2 4.6 4.6 2.7
[code]....
Reason for edit:: Renamed title to be more descriptive, added code tags, and removed font formatting
public class DemoBlock{ public static void main(String[] args){ System.out.println("Demonstrating block scope"); int x = 1111; System.out.println("In first block x is " + x);
[code]....
this is the error I'm getting..reached end of file while parsing. I think this is referred to as either an extra curly brace or that I am missing a curly brace but I'm not 100% sure.
I have to read this CSV file into an arraylist. Arraylist i call weight. The data in the csv file has 200 double values which is the weight of all the 200 bananas. Since the csv file is a string i guess I cannot create an double arraylist from scratch, but i have to parse the csv file afterwards, right? Well this does not work and ill show you the code in a bit, just need to state all my issues.
My second issue is how to be able to print out the the weight items (in this case bananas) next to the weight of the bananas taken from the array? This has to be done by constructor i assume? I just dont know how constructors work with arraylists.
Id like it to look something like this in the output window.
Banana 34,55 Banana 43,55 Banana 23,74
and so on (200 times)
so these are my issues, how to parse and how to print the arraylist weights and the item banana in the output window with constructor. Here is the code.
I have a String formated in the same way as package names:"com.darkchanter.code.NameValue"..Now I need to extract "NameValue" - the problem doesn't actually block my stuff, but before I write my own code, I Wonder if there is a function already available...
I'm having some kind of weird problem reading input from a file. It says that my scanner object I'm using to hold an item of information isn't initialized, when I do try to initialize it, it says error variable already initialized. I'm using the scanner to read input from a file whose contents are this
import java.util.*; import java.io.*; public class QudratullahMommandi_3_07 { Toolkit_General toolKit = new Toolkit_General(); public static void main (String[]args)throws IOException
[Code] .....
This is the error message
QudratullahMommandi_3_07.java:34: error: variable holder2 might not have been initialized String holder2 = holder2.trim(); ^ 1 error
----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete.