Win a copy of Head First Android this week in the Android forum!

Brunda Gundamaraj

Greenhorn
+ Follow
since Aug 13, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brunda Gundamaraj

Hi,

Whenever i try to run a java fx application in browser it gives me the follwoing exception

load: class org.jdesktop.applet.util.JNLPAppletLauncher not found.
java.lang.ClassNotFoundException: org.jdesktop.applet.util.JNLPAppletLauncher
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Can some one please help me regarding this.

My application is a simple application
with just text in it.

I am using NetBeans 6.5 with Javafx
Java1.6

Thanks
Brunda G
12 years ago
Hi,

Can some one please help me in achieving the following.

I need to run an applet which calls an EJB.
This applet should run in the browser and not in the Applet Viewer.

The procedure i used was the follwoing but i am stuck in between.
I was able to do the above in applet viewer but not in the browser.

Procedure:
1)Created an applet class which simply calls the EJB and this EJB returns a string.
2) I wrote an EJB (using EJB3.0) Implementation class and remote class.

Running the applet class runs it in applet viewe and it gives me the expected output.

Now how do i get it to run in the browser.
I get this wierdo exception

(Statck Trace)

Inside init
Inside start
Inside paint
Exception in thread "AWT-EventQueue-3" java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at DemoApplet.paint(DemoApplet.java:52)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Inside paint
Exception in thread "AWT-EventQueue-3" java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at DemoApplet.paint(DemoApplet.java:52)
at sun.awt.RepaintArea.paintComponent(Unknown Source)
at sun.awt.RepaintArea.paint(Unknown Source)
at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source).

Can someone help me with this.



On change of dropdown a part of my page should be rendered.
I thought the best way would be to use a <a4j utputPanel>

on change of dropdown i will render the entire outputPanel.
My outputPanel has a ui:repeat/a4j:repeat tag.

Now my problem is the data inside theui:repeat tag is not being rendered on change of the drop down.

Here is the HTML



Any help would be appreciated.
Thanks
Brunda

[edited to disabled smilies]
[ October 11, 2008: Message edited by: Jeanne Boyarsky ]
<f:verbatim> tag has no rendered attribute.
13 years ago
JSF

Originally posted by J At:
Can you share how you solved the problem of the string being rewritten?
I am trying to insert a dropDown in each row of a jsf table, but then am having problem getting the selected element for each drop-down as I do not know how to differentiate between the drop-downs.



i used a HtmlSelectBooleanCheckBox for each of my columns. and retrieved the values from the RequestMap.

Is your requirement dynamic number of columns ???
If yes then you can set the SelectOne id as you want and based on that maybe you can retrieve the selected values.

haven't actually tried with drop downs but hope this works out for you
13 years ago
JSF
Hi,

I have a data table within which is a selectoneMenu.
On Submit i capture all the values and update in the DB.
I am able to get all the values on submit.

Now my problem is when data is retrieved from the database the value of the dropdown is not dispalying the selected value instead it displays the first value.

Code Sample


The getter method and setter methods are called accordingly but still the selected value is not set in the drop down.

Can anyone please tell me where have i done a mistake ?

Thanks
Brunda
13 years ago
JSF
I was able to solve my problem.

Thanks
Brunda
13 years ago
JSF
I can render the checkboxes (for multiple columns)

I wasnt able to get the values because of there was no
checkBox.setSelectedValues(selectedItems);
in my code.

Adding this line allowed me to save the selected values.

But the problem is only the final selected values (ie value in the final row) are being retained that is because the the selectedItems string[] is being overwritten.

Is there any way to append values to the string ?



Any help is appreciated.
Thanks
Brunda
13 years ago
JSF
Solved the static text problem.

But am still stuck with the checkbox one.
I can render the checkboxes but i am not able to retian the selected values.

I tried the following approach.

public UIData createTable(ArrayList tracks,ArrayList selectItemsList){
System.out.println("Inside CreateDataTable Method");
HtmlDataTable dataTable = new HtmlDataTable();
HtmlPanelGrid grid = new HtmlPanelGrid();
UIColumn col = null;
HtmlOutputText headers = null;
UIOutput text = null;
HtmlSelectManyCheckbox dynamicCheckBox= null;
UISelectItems selItems;
List attendees = new ArrayList();
List selectItems = new ArrayList();
System.out.println("SelectItems List Size --> "+selectItemsList.size());
dynamicCheckBox = new HtmlSelectManyCheckbox();
dynamicCheckBox.setId("checkBox");
col = new UIColumn();
selItems = new UISelectItems();
Application app = FacesContext.getCurrentInstance().getApplication();
ValueBinding vb = app.createValueBinding("#{hashMapDemo.selectedItemsList}");
ValueBinding vb1 = app.createValueBinding("#{hashMapDemo.selectItemsList}");
System.out.println("Value Binding of Checkbox is --> "+vb.getExpressionString());
System.out.println("Value Binding of SeelctItems is --> "+vb1.getExpressionString());
dynamicCheckBox.setValueBinding("value",vb);
selItems.setValueBinding("value",vb1);
dynamicCheckBox.getChildren().add(selItems);
col.getChildren().add(dynamicCheckBox);
dataTable.getChildren().add(col);
System.out.println("Before exiting the method");
return dataTable;
}

In my JSP page
i have the following

<h:dataTable binding="#{hashMapDemo.data}" value="#{hashMapDemo.tracks}" var="att" border="1">
</h:dataTable>

The problem is on clicking on submit on the page the set method is not being called.
But why it is not being called i am not able to make out.
selectedItemsList and selectItemsList have their setter methods in the bean.

Any help is appreciated.
Thanks
Brunda
13 years ago
JSF
Hi,

I have created a backing bean which will generate a dynamic table with dynamic columns.
I need two scenarios in this

(i) display static text
(ii) display checkboxes

In (i) i am able to generate the static text in the table but am not able to get the row names.
I tried two approches
one -. including a <h:column> tag in the datatable tag
<h:dataTable binding="#{dynamicTableSelectItems.checkBoxTable}" value="#{dynamicTableSelectItems.attendeeTypes}" var="varData" border="2">
<h:column>
<h:outputText value="Hee" />
</h:column>
</h:dataTable>

the second approach i am trying to generate it programatically
ie. i create another column and add it to the data table for the row names and create another column and add it to the same data table.
Problem with this is it is only the last value in the list

Can some one please hep me with this ?

The second scenario

I used HtmlSelectManyCheckbox for that.
I am able to display the checkboxes. but am not able to get the selected values and display the selected values again

Can some one please hep me with this ?

Thanks
Brunda
13 years ago
JSF
["Brunda G", please post your questions in a new topic rather than hi-jacking someone else's. Also check your private messages for an important administrative matter.]
[ August 13, 2008: Message edited by: Bear Bibeault ]
13 years ago
JSF