Qussay Najjar

Ranch Hand
+ Follow
since Jan 18, 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 Qussay Najjar

Any new ideas, i'm still stuck with it
i have to use this logic, couldn't find a replacment
12 years ago
JSF
You're dealing with JSF in the same concept of JSP, which loses the power of jsf.
in such scenarios you can follow the next:

you can have only one managed bean, session scoped if for more than one-page process.
you managed bean can be like the next:


now in createProduct.jsp


so in page viewProduct.jsp simply you can have the next:


as long as your managed bean is on session scope that would work perfectly.
the code is applied with jsf 1.2.
12 years ago
JSF
thanks Tim for the reply, but that wouldn't work, it's throwing NumberFormatException '-' !!??
any idea why ?
12 years ago
JSF
Hi vishnu,
I'm having the exact same problem, and am stuck into it, probably if you can please assist me with the way
you solved your problem, or any way you managed achieving that.
Hope some one else, might have an answer also.
Thanks..
12 years ago
JSF

Originally posted by Vishal K Patel:
what is binding doing internally?
How it will affect the normal life-cycle of JSF page?
where and when should I use it?


Check this link, nice one..
http://java.sun.com/developer/EJTechTips/2004/tt0923.html


Example:
I have 5 JSF components in my page. On some action...I need to set some properties of those components from the backing bean.

now...if I am doing with the scope request and using binding...i can set all the properties of all the components of that page.

or...with session scope and without binding i can do the same.

which one is the better approach?

Is it good idea to keep all the states of all components stored in session??? or bindind could be the good alternative???



Using backing bean can sometimes be abused and mix the business data with the form components, but it has its uses like it is sometimes
necessary for event handlers or validators to have access to the actual components on a form. That case, yes backing beans can be used, but
in general try to use a different beans for business objects.
14 years ago
JSF

Originally posted by Lata Bagga:




D is the right answer, simply you can think of JSF as "Swing for server-side applications."
14 years ago
JSF
Okay my friend,,
If your page is just like that, you don't have to do that
"replace" technique (this one you use only when you're saving to DB, because
Database quires won't work with single quotes.
but in your case, you went wrong in this line.




just change the single quotes for the value to double ones, like this:



and later on if you needed to save this name to DB, you change it in the servlet that is receiving the request from this jsp page..
Got it...?
14 years ago
JSP
JSF has (ValueChangeListener) which is a listener that is notified of value
changes of radio buttons, check boxes, select item,etc...
Anyway that's JSF, according to JSP, I'm thinking of a way..
I'll get back to you in case of updates..

Note: if you know JSF or want to use this way I can provide you with a snippet.
14 years ago
JSP

Originally posted by BHAVESH SHA:

org.apache.jasper.JasperException : /index.jsp(29,0)



What is exactly line 29 ?
14 years ago
JSP

Originally posted by Qussay Najjar:

in page editProfile.jsp



sorry for my mistake, the code in quote should be like this:
14 years ago

Originally posted by Sarathy Srinivas:
@ William.. there are many ways to reach the page. Your method would involve doing this for all the links to that page. this is something that, though possible, im looking to avoid. Is there a way to check the request parameter? If so what method should i use?

[ February 18, 2008: Message edited by: Sarathy Srinivas ]



here is some code that I've applied in one of my applications,
you'll see the important parts of it:

link in page1.jsp


link in page2.jsp


and so forth..

in page editProfile.jsp


in servlet ProfileEditor inside doPost(request, response)


Honestly speaking, I don't know if it's a professional way to deal
with such trick, but this is only what I did to solve it that time..
hope it helps...
14 years ago

Originally posted by Ben Souther:

What you're trying to do will give you nothing but headaches and will most likely result in a slow application.



you know Lokesh That's completely true, it does cause headaches,,
I'm still suffering of using that way..
14 years ago

Originally posted by lakshmi manepally:
I am getting thsi kind of error when I was doing build

C;\aaaa\src\com\co\tools\gui\template\tag\ptag.ajava
Cannot find symbol class Content
location:package com.co.tools.gui.template
import com.co.tools.gui.template.Content;



can you post a code snippet, to see were you went wrong.
14 years ago
JSP

Originally posted by Abhishek Reddy Chepyala:
thnak you Qussay Najjar for the reply

i have tried your code, but it is not working.
have you tried ?



Yes, I tried the second one, and it's working with oracle DB.
14 years ago
JSP

Originally posted by Qussay Najjar:


You can use this:

it will work..



sorry, for my typing mistake.. it should be..
[CODE]
str = str.replace("\'","\'\'");
[CODE]
instead of
[CODE]
str = str.replace('\'','\'\'');
[CODE]
notice the double quotes("") in the replace parameters.
14 years ago
JSP