Davide Alagna

Greenhorn
+ Follow
since Feb 16, 2005
Merit badge: grant badges
For More
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 Davide Alagna

Hi all,
I have a big problem when caching with Internet Explorer 6.0. In order to prevent caching to all my Struts Actions, I have created a class called BaseAction that implements cache control:

response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setDateHeader("Expires", 0);
response.setHeader("Pragma", "no-cache");

All my Struts Actions extend my BaseAction class. The problem is that, when I click the back button, IE shows the error page "The page cannot be displayed".

The problem does not occur if I disable the first two headers:

//response.setHeader("Cache-Control","no-cache");
//response.setHeader("Cache-Control","no-store");

In order to see what IE does when I click the back button, I have made a snoop of tcp/http traffic. IE does not send anything (neither a bite!) to the server when I click the back button.
Furthermore, the problem does not occur when using Firefox 1.0.3 (it shows the message "the page contains POST data - do you want to resend data?").

Can anybody help me please? Thanks in advance.
David
18 years ago
Hi all,
I have a big problem when caching with Internet Explorer 6.0. In order to prevent caching to all my Struts Actions, I have created a class called BaseAction that implements cache control:

response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setDateHeader("Expires", 0);
response.setHeader("Pragma", "no-cache");

All my Struts Actions extend my BaseAction class. The problem is that, when I click the back button, IE shows the error page "The page cannot be displayed".

The problem does not occur if I disable the first two headers:

//response.setHeader("Cache-Control","no-cache");
//response.setHeader("Cache-Control","no-store");

In order to see what IE does when I click the back button, I have made a snoop of tcp/http traffic. IE does not send anything (neither a bite!) to the server when I click the back button.
Furthermore, the problem does not occur when using Firefox 1.0.3 (it shows the message "the page contains POST data - do you want to resend data?").

Can anybody help me please? Thanks in advance.
David
18 years ago
Hi everybody,

I'd like to know how to highlight the first element of a select when I use a htnl ptions collection such as:

<html:select property="deviceList" size="6">
<html ptions collection="devices" property="name" labelProperty="name"/>
</html:select>

If i don't select any option, I have null in the Form.

Thanks in advance,

David
19 years ago
Hi everybody,
i'm using struts and writing a javascript function that shows a confirmation message before deleting an element from a collection select:

function deleteElem() {
action = confirm("Delete selected element?");
if (action == true) {
........
}
else return;
}

I don't know how to indicate the action to do in the "if" statement with Struts.
How does Struts handle the formName.submit() = 'doSomething' inside a javascript?

Thanks in advance,
David
19 years ago
Hi everybody, I have two problems with my Struts application. I have a checkbox that disables an input:text when checked (I use a simple javascript to do that). My problems are:

1) I want my DynaValidator to validate the input:text only if it is not empty and the checkbox is not checked, but I can't find the right expression for the "validwhen" property. Actually it is:

<field property="text_name" depends="validwhen">
<arg0 key="myform.mytext_name" />
<var>
<var-name>test</var-name>
<var-value>((checkbox_name == null) and (*this* != null))</var-value>
</var>
</field>


but i don't know how to validate the "" string.

2) when validation fails, the validator calls back the page. The checkbox will still be checked, but the input:text will not be disabled.

Could you help me? Thanks in advance. David
19 years ago