Parth Pateld

Greenhorn
+ Follow
since Nov 01, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Parth Pateld

Yogesh Lonkar wrote:1. Change your method name getServiceDetails , try not to use get*** in action method as many times it is found that they are called twice if result type is json.
2. Your are using result type json in wrong manner <result name="success" type="json">/jsp/PatientData.jsp</result> you can not treat it as a type dispatcher.refer this link Struts2-json-plugin-docs



Hello Sir,

Thanks for your reply.
I am new to struts2 and I want to know how to redirect JSON data in jsp file.
If class ABC and its action name is abc and result type is json then i will get json formated data in abc.action in browser, but hoe to use that data into jsp file.
12 years ago

Ranganathan Kaliyur Mannar wrote:This has nothing to do with Swing. Moving this to the Struts forum.



Hello Sir, Can I get reply for my post ?
12 years ago
Hello Sir,

I am trying to use <sjg> tag for displayiong table in grid view in strust2.

it is like, when the user do login it will come to welcome.jsp and on welcome.jsp i have put a link "PatientData" when the user click on it, he will get list of patients with name and code. but when I click on PatientData link i got following error in browser.

I am using struts2-core 2.3.4.jar, struts2-jquery-grid-pulgin3.5.1.jar and this lib are included in my project.




Temp1.java


CustomerData.java is GETTER SETTER method class, which will set person code and name.

Temp2.java


PatientData.jsp file content


Looking for your reply.
12 years ago

Michael Dunn wrote:paintComponent is called numerous times, for numerous reasons, and you don't want to stop it.

sounds more like there's a problem in your code.


Can we control number of times paintComponent is called.
Can you tell me where is the problem in my code. ?
I am stuck in this problem.
13 years ago

Michael Dunn wrote:the component in the scrolllPane needs to have a preferredSize larger than the scrollPane.
as your CustomPanel has no components, its preferredSize will be 0,0

add a constructor to CustomPanel

where 800,600 is anything you want


I got scrollpane in it, but now problem is that If I do any changes in output window means GUI (like: Resize the window, Activating a window, minimizing or maximizing a window ) , at that time paintComponent of CustomPanel() are re initiated and they are drawn again.
How can i stop that ?
13 years ago

Michael Dunn wrote:Darryl's reply explains the drawing bit.
Do you need it in braille?



I have created Two files

Points.java



and another file named
CustomPanel.java



I do get ScrollPane but it is not scrolling by resizing JFrame.

13 years ago

Darryl Burke wrote:Have you really never referred to the API?



I have gone through those API, But Can i know how to draw a custom shape in JFrame and I also want ScrollPane in JFrame. ?
13 years ago

Michael Dunn wrote:> I want to draw hexagons and also want to add scrollpane in window

please enlighten us as to what part of Darryl's reply you cannot understand.



As per Darryl's reply I have to search for JScrollPane and JComponent.

I could find a airtcle in which they have show how to use JScrollPane and also draw custom shapes in JScrollPane using Graphics Object.

I want to draw custome shapes and also want scrollpane in same Panel but i could not find any solution for the same.
13 years ago

Darryl Burke wrote:1. Why are you using AWT? Swing's been around for more than 10 years now.
2. If you must use AWT, check out the API for ScrollPane.
3. Better, use Swing and follow the links to relevant tutorial from the API for JScrollPane. Also, change your code to do custom painting in an extended JPanel or JComponent, following the guidelines in the tutorial on Performing Custom Painting, and respect Swing's single threaded rule, for which refer to the tutorial on Concurrency in Swing. And don't use getGraphics() of a component.



I am new to Swing.
I want to draw hexagons and also want to add scrollpane in window
13 years ago
Here is my code :


I want that Horizontal and vertical scroll bar should be added automatically.
13 years ago
Hello,

I have written a macro in PowerPoint .pptx file, which fires when ever a user Press on 'Save' button and SaveAs Dialog will appear.

And Filename in SaveAs dialog box will be coming automatically and appending Time step to that file.

But I can not save that Presentation.

Follow is my code:


13 years ago
Following is the Entire stack trace of error :

:ERROR::java.lang.NoClassDefFoundError: org/apache/avalon/framework/configuration/ConfigurationException
at org.apache.fop.apps.FopFactory.<init>(FopFactory.java:149)
at org.apache.fop.apps.FopFactory.newInstance(FopFactory.java:165)
at sc_automation_gui_final.cmos28.javafiles.DatasheetToPDF.convertXMLtoPDF(DatasheetToPDF.java:98)
at sc_automation_gui_final.SC_AUTOMATION_GUI_FINALView.makePDF_ButtonMouseClicked(SC_AUTOMATION_GUI_FINALView.java:715)
at sc_automation_gui_final.SC_AUTOMATION_GUI_FINALView.access$500(SC_AUTOMATION_GUI_FINALView.java:29)
at sc_automation_gui_final.SC_AUTOMATION_GUI_FINALView$6.mouseClicked(SC_AUTOMATION_GUI_FINALView.java:251)
at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(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.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(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)
org/apache/avalon/framework/configuration/ConfigurationException**********Processing...


Follwing is the code which i was using for converting xml to pdf.
I have created a Swing application to convert XML to PDF and embedded this Swing application in JWS, so that everyone can access it through Web.
13 years ago
how to solve org.apache.avalon.framework.configuration.ConfigurationException exception comes while converting xml file to pdf file using Swing application which embedded in JWS application.

I could not found any solution for this

Thank you in advance.
13 years ago
can any one help me on this topic...??
13 years ago
Hello,
I am converting xml file to PDF using FOP.jar and avalon-framework-api-4.3.jar and some other jar files.
My program is working fine if i run it on my desktop machine.
Now i have created jar file of my swing application and put it on server using JWS(Java Web Start).
But now if i am trying to convert xml file to pdf file on server end using JWS, it is showing me "avalon framework configuration exception"

How can i solve this exception ?
13 years ago