Thang Pham

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

Recent posts by Thang Pham

yeah, that how I intend to fix it by introducing a boolean variables inside my data model. Thank you.
14 years ago
JSF
it more like a shopping cart. You have a whole bunch of items, somes you like, somes you dont. You checked on those you like and click checkout. At the backend, you kind of need to you which checkbox, they click. Now if there are only two or three checkbox, then I can have boolean variable that associate with those checkbox, but since I load these from the database, the number of items are unknown, meaning that the number of checkbox are unknown till runtime. Now, then I have a problem determine which checkbox, they select. It more like I run into design problem, rather than anything else. Anyway, I figure out the way to do it. Thanks anyway
14 years ago
JSF
What is the scope of your managed bean?
14 years ago
JSF
Let say that my JSF file has 3 or more selectBooleanCheckbox, how can I know which checkbox I am selecting. If I do this

it only tell me a state of a checkbox is selected or not, but does not tell me which one
14 years ago
JSF
It is solved. Change RequestScoped to ViewScoped
15 years ago
JSF
The idea is that: there are 3 drop down lists. IF I make selection in the first drop down, data dynamically generated in the second drop down. And if I make selection in the second drop down list, data dynamically generated in the third drop down. The below error happen when I make selection in the second drop down list. I use p:message to show the error message.

where "facility" is the id of the <h:selectOneMenu>. Do you have any idea what might cause this error
It might be a bit helpful if I give you a section of my managed bean



15 years ago
JSF

Ulf Dittmer wrote:Code for what? Putting a link on a web page? Retrieving the file contents from the DB? Streaming the file contents to the client? What do you have so far?


+On the upload side:
I look at apache file upload, and it does not seem to have an example for custom upload to DB. If you have a sample code for accomplishing it, I would appreciate very much.
+On the download side: I have a servlet that can talk to a DB now. I can retrieve a blob black via "PrepareStatemet" and getBlob. But I am not sure how to stream that back to the client.

I just want to apologize if what I am asking is too much. I am new to servlet, and for this project, I choose the wrong design (applet-servlet-database), now nothing seems to work out right. So if you can help I would appreciate very much.
15 years ago

Ulf Dittmer wrote:You can simply put a link on a web page, and upon clicking the link, the file can be streamed to the client. Make sure you set the correct file name and content type.



Do you think you can post some sample codes to help me a bit
15 years ago

What do you mean by "download back to the client machine" - the file already exists on the client, doesn't it?



"Download back to the client machine" meaning that I have the ability to select a blob that located on the database and download the blob back to my computer. How can I do that?
15 years ago
I have a applet that connect to a database via a servlet. On the applet, the user click "choose file", then the applet pop an open dialog, select the image it want to upload. Ultimately I want the image to upload to the database into a blob column as well as download back to the client machine. Does anyone know how to do it?
15 years ago
This should not be this hard !!! ohhhh java, this language is definitely not for noob!!! gosh
15 years ago
I'm not sure if your code suppose to perform anything different than mine, but when I add the main class and run it, it performs exact like mine. That when I click on the down arrow button, a list pop out, then when I roll mouse over the items of the list, it changes the background color of that item to RED, but when I select that item, the list close up, but the color of the selected item changes back to light blue (the system original selection color). It is no longer RED anymore.
15 years ago
That sound super complicated. Can you lead me a bit further than that?
15 years ago
I try to write some code as you said, and actually I got something, but I still have some question.

I can change the color (red color) of the item that I roll mouse over, however when I actually select the item, the color change back



any idea, how can I fix this?
15 years ago