I'm a first timer at jsf, and right now I'm learning how to use ajax in jsf. i got a problem when i click a command link i want to change in a content, but when i run my web and i click the command link it didn't do anything. This is the source :
<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
[Code] ....
In this code when i click the Home button it suppose to change the ouput text to a string that store in my bean. This is my bean:
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package UI;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;
[Code] .....
At first the output text value is the same as the string i store in the bean. but when i click the commandlink, it didn't do anything, is there something wrong with my code?
I'm dealing with, change the content pane color of jFilechooser. Color has been changed but the problem is when I open the subdirectory leads errors; Note : It also trigger error when I set default directory; like chooser.setCurrentDirectory(file);
The following error is the result:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException at javax.swing.plaf.metal.MetalFileChooserUI$IndentIcon.getIconWidth(MetalFileChooserUI.java:912) at javax.swing.SwingUtilities.layoutCompoundLabelImpl(SwingUtilities.java:961) at javax.swing.SwingUtilities.layoutCompoundLabel(SwingUtilities.java:888) at javax.swing.plaf.basic.BasicLabelUI.layoutCL(BasicLabelUI.java:94) at javax.swing.plaf.basic.BasicLabelUI.getPreferredSize(BasicLabelUI.java:239)
I am currently working on a project where I have a dataTable, containing some of the information for a specific database table, with commandLinks at the side which I need to bring me to a new page(another jsf file that I have to display the relevant information there) and display only the row of data selected. I've been racking my brain about this and have been unable to figure out a way to do it.
One of my official site is not disaplying the content in machine#1 IE10 browser.And the same site is showing data in another machine#2. I compared the both machines JRE and JDK settings but no difference found.
I am trying to read a content of file downloaded from ftp and return it as a String. This is what I use:
Java Code:
import java.io.BufferedInputStream; import java.io.IOException; import java.io.InputStream; import org.apache.commons.net.ftp.FTPClient; public class Test { public static void main(String [] args) throws IOException{ FTPClient ftp = new FTPClient();
[code]....
The code does not work, although all the links are correct.
I am working on a little project to create an App that can read contents from a website and return it back to my app. What protocol to use for that. Just the reading/retrieving content from a website.
I am fallowing programming tutorials on youtube.And this code is for reading zip files content.I did the same things like in the video.But Code dosent work
String contentType = fi.getContentType(); gives text/plain when my file is.txt file and gives image/jpeg when my file is .jpeg file but when my file is .jar or .docx it will return application/octet-stream and application/vnd.openxmlformats-officedocument.wordprocessingml.document respictively so what to do to get exact mime type.
I was trying to store the content JTextField on char..... Here's the instruction of program--->>create a GUI program that convert letter into corresponding no. EXAMPLE:
if user enter "c" then it will output "3"...... like a=1,b=2,c=3,......
Here's my code
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class convert extends JFrame { private static final int width = 400; private static final int height = 300; private JLabel EN,EQN;
I have a text file which contains to integer values I need to retrieve for each item (total of 56 items in the file). One is an item number, the other the weight ("Item: " + number + "Weight: " + weight). I am trying to build an array list that will add each set of data to it. I know that when I add the item array to the arraylist it is storing the array variable and not its contents, so is there a way to easily copy that data array to the array list?
I am trying to make a program to go on a stock website find the value a particular stock is at and display it to the user. Then repeat at your selected timeframe.
I can get my code to read the entire source of the page or open a page but I cannot seem to get it to find something within the source.
What It would do when completed. Get input from the user on what stock and sight to search and how often to check it. Once the run button is clicked I would like it to take the input from the user and run in the back ground going on the website searching the stock and display the numbers back to the user. I have only been able to have it display the entire source code though, not just the stock numbers.
I have a main class AddressBook where I use ArrayList<Contact> addressBook = new ArrayList<>(); to add information such as name and phone numbers in my Contact class. How do I go about accessing all the information (names, and phone numbers) that is stored in my Contact class? What happens when I print it out is it only prints out the last input of name and phone number and not the entire collection of names and phone numbers. How do I print out the contents of ArrayList?
I am creating a webapp project , in which i have loaded my JSP page having JSTL tags in a DIV tag successfully but when user clicks on a radio button a jquery fires which loads that perticular div tag , and the html content in that div tag is then loaded again but not the JSTL content..
Is there an existing way to bind the content of a ListProperty? Consider the following:
private final ListProperty<Worker<?>> workers = new SimpleListProperty<>(FXCollections.observableArrayList()); public ListProperty<Worker<?>> workersProperty() {return workers;} public ObservableList<Worker<?>> getWorkers() {return workers.get();} public void setWorkers(ObservableList<Worker<?>> workers) {this.workers.set(workers);}
[Code]...
What I want to do is bind the content of the stateWatchedWorkers list to workers. If the entire workers list is replaced, I want stateWatchedWorkers to be updated to match the content of the new list. Put another way, I want the stateWatchedWorkers list to be mapped to the current list being held by the workers property.
I have 4 small applets on a page that simply prints out the quadratic equation for values passed in. There are 4 applets on a page that have different values assigned. They display fine.... sometimes.... if I refresh or generate new numbers sometimes one applet looks as though it has numbers overlapping the new values. If I resize or drag the browser everything displays fine again - no need to refresh the browser or anything. It's as though old values or something are being overwritten by the new or something similar is happening. What should I include in the paint method of the JPanel that might clear the applet before initial painting happens..... if anything?
I am currently looking for a best option to show the content of a workbook or an excel in browser on the fly of generating the workbook.
Currently, I am able to save the content as an xlsx file which is actually taking space in the temp folder while creation. This becomes an overhead for the user to delete the temp files manually.
So I am thinking of bringing the content of the generated excel file on the screen and give an option in the screen to download that into file.
In my servlet page I call one xml response from third party server and make write it in file using filewriter and store it in local,after that
response.setHeader("Refresh", "1; URL=test.jsp");
Using this code i goes to test.jsp page ,in that test.jsp file ,i place iframe tag like <iframe src="file:///D:/sample/result.xml" /> but it does not show the content what can i do?
I just created an applet that I want to call from a html file.
The applet code looks like this (and works):
package jav12;
import java.awt.*; import javax.swing.*; public class Welcome extends JApplet { public Welcome(){ } public void init() { getContentPane().add(new Label("Yessss it works",Label.CENTER));
[Code] ....
When I click on the html file the content of the page is blocked and the applet isn't loaded. What can I do to fix this. I think it has something to do with rights. This is a crosspost to JApplet content blocked
I would like to syout on the console a line of a serialized object in this example I would like to have as output 80 20 in the console. How can i put the scroll to my code?
import java.io.*; public class Box implements Serializable{ public static void main (String[] args) throws ClassNotFoundException { Pond myBox = new Pond(); myBox.setWidth(70); myBox.setHeight(20);