Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

lynn fann

Ranch Hand
+ Follow
since Oct 15, 2006
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 lynn fann

I have the following problem with jsf form:

my form values are not updated after form submit. When i submit the form, it will go to a detail page, and when i go back to the form again, the updated values are not reflected on the forms.

Why is this so?

I have set my managed bean to be session scope.

I have tried to create a new view for the form, each time the submit is trigger. But this there a better/ correct way of doing this?
7 years ago
JSF
I have an issue here.

my method will be trigger automatically again after sometime (every 5 min), is there anyway to set this?

my method is calling external API which the response time is very slow (i cannt control the response for api). But before i get the response back, my method is trigger again, causing my method to go into endless loop.


Is there any way i can handle the issue above?
8 years ago
JSF
hi guys,

thanks for your help.. it solve my problem
9 years ago
JSF
I need to get the URL, from the url, it will tell my the environment that my apps is in (production or uat).. because in different environment, i need to present different things..

for example my url may look like this:
uat environment: http://servername/appuat/appinstance/
production environment:http://servername/appinstance/

Any alternative i can get the URL?
9 years ago
JSF
in JSP i have the code:
RequestResponse rqrp = new RequestResponse(request, null);
String fullURL ="";// rqrp.getFullURL("");


In JSF, how to do i do it? I need to get the full URL of the application on the server.

Thanks.
9 years ago
JSF
Im trying to generate the report in pdf format. The report consist of 2 sub report ( 1 sub report required values to be passed in, the other one does not required any values to be passed in)

When i generate the file, the subreport is not included. Below is my code and jrxml

Servlet codes:



Jrxml:



Where have i gone wrong?
but from servlet, how do i access my managed bean values?
9 years ago
JSF
i need to call a servlet "myServlet" from my managed bean, how do i do it?

thanks.
9 years ago
JSF
In your check() make sure you have "return false" if there is validation error, and "return true" if no validation error occurs.

try this:
<h:form id="mainForm" onsubmit="return check()">
9 years ago
JSF
i tried to call a servlet but i have the following error:
Cannot forward a response that is already committed

my managed bean code:


servlet:


9 years ago
JSF
do this <body onload="callThis()">

callThis : your javascript that is going to call.


remember to close the body tag at the end of the page.
9 years ago
JSF
Well of cause, i know popup is not a good idea. but i dont really mean as "pop up window". I set the
response.setHeader("Content-disposition", "attachment; filename=\""+filename +".pdf\""); this will instruct the browser to attached the file to the reponse, so that user can download the file.


Why not have a link on the page that just allows the user to right-click on the link and select Save-As, as they would in any browser


I do not want to store the file on my server. I just want to generate the file on-the-fly for the user



Or, just allow the PDF to open, and have the user use the native Save option provided by Adobe/Foxit.



I have thought about this. but my problem is now i cannot even get the PDF to open.. using
response.setHeader("Content-disposition", "inline; filename=\""+filename +".pdf\"");

9 years ago
JSF
I have post a similar post in "other open source projects forum", but not getting any reponse, thus trying here to get some response.

i having in opening the pdf, i want to have dialog bos to pop up asking user to save or open the file:

full details in :
http://www.coderanch.com/t/446738/Other-Open-Source-Projects/jsf-jasper-report-pdf-format

with the piece of code:
IE: nothing happens when i click on the command button, the method is call without any error
FF: new window open up, with binary data

I tried also using:
response.setHeader("Content-disposition", "inline; filename=\""+filename +".pdf\"");
both IE and FF nothing happens when i click on the command button, the method is call without any error.


anyone?

Thanks.


9 years ago
JSF
Im trying to generate a pdf report using jasperReport. However, i cant seems to get the pdf.
I would like to have a dialog box for user to "save or open" the pdf report. But i cant get it work.


my code as follows:
have another problem now. After processing the validator, it will just stop there. (There is no error/exception thrown from the validator) but my submit action is not being called

why is this so?

code of my validator
9 years ago
JSF