prakash chauhan

Ranch Hand
+ Follow
since Jun 22, 2007
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by prakash chauhan

Hi,
How can we get the image(in png,gif,jpeg)from the icon that is set on a JButton using the setIcon() method?
I need to retrieve this image and save it in any of the availble file formats(jpg,png or gif)
Here is my sample code


So basically I want to retrieve "javalog.gif" and save it somewhere.
I tried to use some Image.getImage() method but dint know how to proceed further.
Any help is much appreciated
Thanks.
15 years ago
or maybe is there a way by which i can specifically be notified when the project location is changed by the CCRC Plugin so that i dont have to process all the change events generated in the workspace?

Thanks
Prakash
Hi all,
My Objective is this:
Implement IResourceChangeListner in an eclipse Plugin project that will listen for the movement of the Project(for examaple when we do Team>Share and the project is moved to the VOB) and when such a movement is found move some other folder to the same location.
I am trying to capture the combination of POST_CHANGE and IResourceDelta.CHANGE event which I get when the project is moved ..but not able to find out how to use things MOVED_FROM, MOVED_TO or getMovedFromPath() or getMovedToPath() to get the the complete picture before doing the movement of my resources.
Do they even apply for this kind of movement? I always get null when i try to use getMovedFromPath or getMovedToPath in the IResourceDelta.CHANGE case
Any help will be appreciated
Thanks.
Hi,
Thanks..
yeah thats what i guess i ll have to do, have two methods for two types of requesting output consoles.
Thanks for all your help.
16 years ago
Hi,
Thanks
Yes i tried and it worked , but i was thinking what if the output is not read by a browser but by some other program like the cmd console..
It's working now but will again need change when display tool is changed.
16 years ago
Hi,
this is the work around which worked for me


i wanted to avoid using scriplets , any suggestions?

-Thanks in advance
16 years ago
Well i still am facing the problem:
What i tried was

and it still doesnt recognize the new lines
however if i do

it prints the text with newline (seperate lines) as expected.
so i know that the database is holding the new line character.
but the browser is not interpreting them
any help?

Thanks in advance.
16 years ago
I am using MySql as my DBMS. i did some google and came through an article that says ,'retrieve the String from the database and then convert the new line characters to the BR tag of html so that a BR would be printed when a new line character is encountered, i am not sure as i was not able get that far.
But lets see , i will try to get it working this weekend.
Thanks for your help again.
16 years ago
Thanks for the reply Merrill
I tried using TEXTAREA tag but still when i pull up the message from the database it shows one long string only.
Dont know if its relevent , if i look at the source of my jsp page that shows the message( using View Source option of browser) it does show me the message in seperate lines so to me it seems like the lines delimiters are there in database.

thnks for the help.
16 years ago
I am using the struts framework in my project.
I have a just like this (Add new topic of javaranch) page.
What i do is save text in the subject and message field to my database as strings.
i get the value of message property as

and then save it to database where Message is a data field like this
Every thing is fine till this point. Problem is when i try to display this message on a different page
i get the message from database as

saving it to request

and finally display it in my JSP page using EL

it displays the message but without any new lines i.e the message appears as a single line not like multilines the way it was actually typed.
My Question is how do we preserve the formatting of a message
like , new lines or may be font properties like color , weight etc?

Thanks for reading this.
-Prakash
16 years ago
hey Merrill
Thanks again for help
yes its working ..

-regards
16 years ago
Hi
I have the following code:



The Line i am having problem with is:


I have created an EL function that accepts two strings and tells whether the msg_id(which is first argument) has been read by the emp_id(which is the second id and has been hard -coded here)

but on executing the jsp i get the following error:


I have tested my EL function and there is not problem with it .. as if i call the EL function with both the values hardcoded eg. ${readStatus:GetUpdateReadStatus("ab12","123456")
it prints the result , "READ" or "NOT READ"
the problem i having with is giving the value at runtime

I would appreciate any help
Thanks.
16 years ago
Hey Merrill
Thanks for the solution ,
its working now..
i was using it that way because i had seen it working in conjuction with
<a href="/edit.do?msgId=<bean:write...../>"></a> tag and was working on that lines..
I do appreicate your help.
16 years ago
Hi,
I wanted to use <html:link>
where user clicks on the link and an actiod would be called and would recieve a parameter
Here is what my <html:link> looks like (ViewTeamUpdates.jsp):


The attribute TEAMUPATESLIST is a request Attribute which holds an ArrayList of 'teamUpdate' which has msg_id property.

if i use only:

i do get the value of the msg id
but when used in conjunction with <html:link> it gives me following error:


which the row and column are near the paramName attribute.

Could somebody tell me what am i doing wrong.?

-Thanks
16 years ago
Thanks Paul and Tim
I will try to implement it in my project.
Thanks again.