Author Login
Post Reply
user Digest 2 Apr 2008 21:15:38 -0000 Issue 7959
Topics (messages 184957 through 184967):
Re: Regarding Service layer getting called twice
184957 by: Laurie Harper
Hidden field null in IE
184958 by: phms
184960 by: Musachy Barroso
184962 by: Dave Newton
184964 by: Dave Newton
Re: struts-default.properties
184959 by: Barron, Daniel
Re: Actionerrors & the Store Interceptor
184961 by: Lukasz Lenart
[s2] conversion validator and repopulateField
184963 by: Kevin Wade
Re: Using sets of objects with tags
184965 by: Laurie Harper
Re: rrrrr...why my field returns null????
184966 by: Laurie Harper
Re: [OT] Struts - Spring - hibernate and lazy initialization
184967 by: Laurie Harper
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_184957.ezm (zipped)Struts invokes your actions, not your service layer, so the first step
is to determine where the calls to the service layer are coming from.
Either your action is doing that or your action is being called more
than once during one 'logical request' -- which would probably mean the
browser was issuing more than one request to the action while building
the page, unless you're using s:action or something. Figure out what's
happening at the action level first, then work backwards from there.
L.
Prajapati Manish Narandas wrote:
> Hi all,
> i am using spring object factory action itself,service layer and Dao layer.
> Here, service layer method is getting called twice and due to that dao layer
> method is also called twice.
> Can any body tell me what can be the reason of it?
> This not happening service layer of all action.
> Like i have another action class which shares the same service layer but for
> that action service layer is not
> getting called twice.
> Following are the all configuration files:
>
> *1. test1-applicationContext.xml* *(My application context file for that
> test1 action)*
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "
> http://www.springframework.org/dtd/spring-beans.dtd">
> <beans>
> <import resource="datasource.xml" />
> <import resource="test2-applicationcontext.xml" />
> <bean id="testPreview" class="net.test1">
> ..........
> *<property name="itemListingService"> *
> *<ref bean="itemListingService" /> *
> *</property>*
> .............
> </bean>
> </beans>
>
> *2. test2-applicationcontext.xml* *(application context file which is
> imported in above test1 for sharing service layer)*
>
> <?xml version="1.0" encoding="utf-8"?>
> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "
> http://www.springframework.org/dtd/spring-beans.dtd">
> <beans>
> <bean id="itemListingService"
> class="net.service.impl.ItemListingServiceImpl">
> ..................
> *<property name="itemListingDao">*
> *<ref bean="ItemListingDao" />*
> *</property>*
> ..................
> <property name="listingPeripheralDao">
> <ref bean="listingPeripheralDao" />
> </property>
> .............
> </bean>
> </beans>
>
> *3. struts-test1.xml (struts configuration file for test1'action)*
> **
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts
> Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd ">
> <struts>
> <package name="AuctionPreview" extends="struts-test1Stack"
> namespace="/test">
> <interceptors>
> <interceptor-stack name="auctionPreviewStack">
> <interceptor-ref name="sigmaStack">
> <param name="SSLInterceptor.excludeMethods">
> showListing
> </param>
> <param name="ActionContextInterceptor.excludeMethods">
> showListing,nextAllItemList,viewStatetaxMap
> </param>
> </interceptor-ref>
> </interceptor-stack>
> </interceptors>
> <default-interceptor-ref name="auctionPreviewStack" />
>
> <action name="test!*" method="{1}" class="net.test1">
> <result>/jsp/auctionpreview/success.jsp</result>
>
> <result
> name="success">/jsp/auctionpreview/Main.jsp?page=auctionPreview</result>
> .........
> <result name="input">/jsp/auctionpreview/success.jsp</result>
> ..........
> <result
> name="paymentSuccess">/jsp/listing/PaymentSuccess.jsp?page=listing</result>
> <result
> name="paymentFail">/jsp/listing/PaymentFailure.jsp?page=listing</result>
>
> <result name="error">/jsp/listing/error.jsp?page=listing</result>
> </action>
> </package>
> </struts>
>
>
> *4.struts-test1Stack.xml (interceptor stack config file)*
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts
> Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd ">
> <struts>
> <package name="struts-test1Stack" extends="struts-default">
> <interceptors>
> <interceptor name="SSLInterceptor"
> class="net.sigmainfo.blackwells.action.SSLInterceptor" />
> <interceptor name="ActionContextInterceptor"
> class="net.sigmainfo.blackwells.action.ActionContextInterceptor" />
> <interceptor name="UrlActionInterceptor"
> class="net.sigmainfo.blackwells.action.UrlActionInterceptor" />
> ........................
> <interceptor-stack name="test1Stack">
> <interceptor-ref name="UrlActionInterceptor" />
> <interceptor-ref name="SSLInterceptor" />
> <interceptor-ref name="GarbageCollectionInterceptor" />
> <interceptor-ref name="defaultStack" />
> <interceptor-ref name="ActionContextInterceptor" />
>
> </interceptor-stack>
> </interceptors>
> Summary: Here *itemListingService(Service Layer) 's method is called twice
> and because of it itemListingDao (Dao layer)'s*
> *method is also called twice any it gives error like Invalid attempt to
> associate collection with two open session.*
> **
> **
> *Can anybody tell me why in test1 service layer is getting called twice.*
> **
> **
> *Please share your ideas,*
> **
> *Thanx in advance.*
> **
> *From *
> *Manish*
>

Attachment:
user_184958.ezm (zipped)
Folks,
I have a JSP page in which i need to set a hidden field (mode) using
javascript and send it to a form using struts. The code works on Firefox
but in IE the field is not modifyed (null). Below is my code:
<%@(protected)" %>
<%@(protected)" %>
<%@(protected)" %>
<%@(protected)" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@(protected)" %>
<%@(protected)" %>
<%@(protected)" %>
<%@(protected)" %>
<%@(protected)
import="com.redewireless.psiw.applications.smsmanager.model.SmsGroup" %>
<%@(protected)
import="com.redewireless.psiw.applications.smsmanager.model.SmsGroupMember"
%>
<%@(protected)" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>mobiw : Plataforma de Serviços de Interatividade Wireless</title>
</head>
<link href="css/css_main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="css/new.css" type="text/css" media="screen" />
<link title="calendar-brown" href="js/calendar-smsp.css" media="all"
type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/calendar.js"></script>
<script src="js/calendar-pt.js" type="text/javascript"></script>
<script src="js/calendar-setup.js" type="text/javascript"></script>
<script type="text/javascript" src="js/overlib.js"></script>
<script type="text/javascript" src="js/overFunc.js"></script>
<script type="text/javascript" src="js/j.js"></script>
<script language="JavaScript" type="text/javascript">
<!--
var helpFrame='<!--[if lte IE 6.5]><iframe></iframe><![endif]-->';
function adiciona(){
document.forms[0].smsGroupId.value="";
document.forms[0].name.value="";
document.forms[0].description.value="";
document.forms[0].mode.value="add";
document.forms[0].submit();
return true;
}
-->
</script>
<body bgcolor="#eeeeee" leftmargin="0" topmargin="0" rightmargin="0"
bottommargin="0" marginwidth="0" marginheight="0">
<%
//Global variables
Facade facade = Facade.getInstance();
PsiwUser user = (PsiwUser)
request.getSession().getAttribute(Constants.USER_KEY);
List<SmsGroup> groups = facade.getSmsGroups(user);
%>
<div class="select-free" id="overDiv" style="position:absolute;
visibility:hidden; z-index:10000;"></div>
imagens/espaco.gif <br />
<div align="center">
<table width="763" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> imagens/topo_sec.gif <br /></td>
</tr>
<tr>
<td background="imagens/bg_sec.gif" align="center">
<%@(protected)" %>
<br /><br />
</td>
</tr>
<tr>
<td background="imagens/bg_sec.gif" align="center">
<!-- CONTEÚDO DA PÁGINA -->
<table width="745" border="0" cellspacing="0" cellpadding="0">
<html:form styleId="manageSmsGroupForm" method="POST"
action="ManageSmsGroup" enctype="multipart/form-data">
<html:hidden property="mode" styleId="mode"/>
<html:hidden property="name" styleId="name"/>
<html:hidden property="description" styleId="description"/>
<html:hidden property="smsGroupId" styleId="smsGroupId"/>
<html:hidden property="page" styleId="page" value="0"/>
<tr>
<td align="left">
sec_msg_menu_operacoes.jsp GERENCIAMENTO DE ENVIO DE MENSAGENS >
GERENCIAMENTO DE GRUPOS
<br /><br />
</td>
</tr>
<tr>
<td align="left">
imagens/seta_cinza.gif <strong>Gerenciamento de grupos</strong><br
/><br />
<!-- MENSAGEM DE SUCESSO OU ERRO -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<logic:equal name="status" value="success">
<td background="imagens/linha_sucesso.gif" align="center"
valign="middle" height="32">
Operação realizada com sucesso!<br />
</td>
</logic:equal>
<logic:equal name="status" value="error">
<td background="imagens/linha_erro.gif" align="center"
valign="middle" height="32">
Operação não pôde ser realizada. Tente novamente mais tarde.<br />
</td>
</logic:equal>
</tr>
</table>
<logic:notEqual name="status" value="none">
<br />
</logic:notEqual>
<!-- MENSAGEM DE SUCESSO OU ERRO -->
<%
if(groups != null && groups.size() > 0){
%>
<!-- tabela de GRUPOS -->
<table width="740" border="0" cellspacing="2" cellpadding="4">
<tr>
<td bgcolor="#f3efe9" align="center" valign="middle" width="30">Id<br
/></td>
<td bgcolor="#f3efe9" align="center" valign="middle" width="135">Nome
do grupo<br /></td>
<td bgcolor="#f3efe9" align="center" valign="middle"
width="385">Descrição<br /></td>
<td bgcolor="#f3efe9" align="center" valign="middle"
width="75">Editar<br /></td>
<td bgcolor="#f3efe9" align="center" valign="middle"
width="75">Excluir<br /></td>
</tr>
<%
String groupId;
String groupName;
String groupDescription;
String removeButton;
String editButton;
for(int i = 0; i < groups.size(); i++){
groupId = Long.toString(groups.get(i).getSmsGroupId());
groupName = groups.get(i).getName();
groupDescription = groups.get(i).getDescription();
editButton = "document.getElementById('smsGroupId').value='" +
groupId + "';document.getElementById('name').value='" + groupName +
"';document.getElementById('description').value='" + groupDescription +
"';document.getElementById('mode').value='edit';";
removeButton = "document.getElementById('smsGroupId').value='" +
groupId + "';document.getElementById('name').value='" + groupName +
"';document.getElementById('description').value='" + groupDescription +
"';document.getElementById('mode').value='rem';";
%>
<tr>
<td bgcolor="#eeeeee" align="center" valign="middle">
<%=groupId%><br />
</td>
<td bgcolor="#eeeeee" align="left" valign="middle">
<strong><%=groupName%></strong><br />
</td>
<td bgcolor="#eeeeee" align="left" valign="middle">
<%=WordWrapper.wrapTextByColumnWidth(groupDescription, 385)%><br />
</td>
<td bgcolor="#eeeeee" align="center" valign="middle">
<html:image src="imagens/bot_exclamacao.gif" border="0"
property="Submit" value="Submit" alt="Submit"
onmouseover="overlib(helpFrame+'Clique aqui para editar os parâmetros deste
grupo.', CSSCLASS, FGCLASS, 'ol_class_fg', BGCLASS, 'ol_class_bg',
TEXTFONTCLASS, 'ol_class_fn', TIMEOUT, null, DELAY, null);"
onmouseout='nd()' onclick="<%=editButton%>"/><br />
</td>
<td bgcolor="#eeeeee" align="center" valign="middle">
<html:image src="imagens/bot_excluir.gif" border="0"
property="Submit" value="Submit" alt="Submit"
onmouseover="overlib(helpFrame+'Clique aqui para remover este grupo.',
CSSCLASS, FGCLASS, 'ol_class_fg', BGCLASS, 'ol_class_bg', TEXTFONTCLASS,
'ol_class_fn', TIMEOUT, null, DELAY, null);" onmouseout='nd()'
onclick="<%=removeButton%>"/><br />
</td>
</tr>
<% } %>
</table>
<% } %>
<!-- FIM da tabela de GRUPOS -->
<br />
<table width="740" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">
<html:image src="imagens/bot_ad_grupo.gif" border="0"
property="Submit" value="Submit" alt="Submit"
onclick="javascript:adiciona()"/>
<br />
</td>
</tr>
</table>
<br />
</td>
</tr>
</html:form>
</table>
<!-- CONTEÚDO DA PÁGINA -->
</td>
</tr>
<tr>
<td> imagens/bottom_sec.gif </td>
</tr>
<tr>
<td align="left">
mobiw v1.0.0 © 2007. Rede Wireless ltda. Todos os Direitos
Reservados.<br /></td>
</tr>
</table>
</div>
</body>
</html>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_184960.ezm (zipped)Oh my eyes!, now seriously, that is kind of hard to read (and you
didn't even say what field it was). Tips:
* Put all that inlined javascript in functions.
* Check for javascript errors on the page
* Minimize the example to something small that replicates the problem
* This is not an struts problem but we might give you a hand if you
provide an small example
regards
musachy
On Wed, Apr 2, 2008 at 4:35 PM, phms <pedrinho.k2@(protected):
>
> Folks,
>
> I have a JSP page in which i need to set a hidden field (mode) using
> javascript and send it to a form using struts. The code works on Firefox
> but in IE the field is not modifyed (null). Below is my code:
>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)
> import="com.redewireless.psiw.applications.smsmanager.model.SmsGroup" %>
> <%@(protected)
> import="com.redewireless.psiw.applications.smsmanager.model.SmsGroupMember"
> %>
> <%@(protected)" %>
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>mobiw : Plataforma de Serviços de Interatividade Wireless</title>
> </head>
>
> <link href="css/css_main.css" rel="stylesheet" type="text/css" />
>
>
> <link rel="stylesheet" href="css/new.css" type="text/css" media="screen" />
>
>
> <link title="calendar-brown" href="js/calendar-smsp.css" media="all"
> type="text/css" rel="stylesheet" />
>
> <script type="text/javascript" src="js/calendar.js"></script>
> <script src="js/calendar-pt.js" type="text/javascript"></script>
> <script src="js/calendar-setup.js" type="text/javascript"></script>
> <script type="text/javascript" src="js/overlib.js"></script>
> <script type="text/javascript" src="js/overFunc.js"></script>
> <script type="text/javascript" src="js/j.js"></script>
>
> <script language="JavaScript" type="text/javascript">
> <!--
> var helpFrame='<!--[if lte IE 6.5]><iframe></iframe><![endif]-->';
>
> function adiciona(){
> document.forms[0].smsGroupId.value="";
> document.forms[0].name.value="";
> document.forms[0].description.value="";
> document.forms[0].mode.value="add";
> document.forms[0].submit();
> return true;
> }
> -->
> </script>
> <body bgcolor="#eeeeee" leftmargin="0" topmargin="0" rightmargin="0"
> bottommargin="0" marginwidth="0" marginheight="0">
>
> <%
> //Global variables
> Facade facade = Facade.getInstance();
> PsiwUser user = (PsiwUser)
> request.getSession().getAttribute(Constants.USER_KEY);
> List<SmsGroup> groups = facade.getSmsGroups(user);
> %>
>
> <div class="select-free" id="overDiv" style="position:absolute;
> visibility:hidden; z-index:10000;"></div>
> imagens/espaco.gif <br />
> <div align="center">
>
> <table width="763" border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td> imagens/topo_sec.gif <br /></td>
> </tr>
> <tr>
> <td background="imagens/bg_sec.gif" align="center">
> <%@(protected)" %>
> <br /><br />
> </td>
> </tr>
> <tr>
> <td background="imagens/bg_sec.gif" align="center">
> <!-- CONTEÚDO DA PÁGINA -->
> <table width="745" border="0" cellspacing="0" cellpadding="0">
> <html:form styleId="manageSmsGroupForm" method="POST"
> action="ManageSmsGroup" enctype="multipart/form-data">
> <html:hidden property="mode" styleId="mode"/>
> <html:hidden property="name" styleId="name"/>
> <html:hidden property="description" styleId="description"/>
> <html:hidden property="smsGroupId" styleId="smsGroupId"/>
> <html:hidden property="page" styleId="page" value="0"/>
> <tr>
> <td align="left">
>
> sec_msg_menu_operacoes.jsp GERENCIAMENTO DE ENVIO DE MENSAGENS >
> GERENCIAMENTO DE GRUPOS
> <br /><br />
>
> </td>
> </tr>
>
> <tr>
> <td align="left">
>
> imagens/seta_cinza.gif <strong>Gerenciamento de grupos</strong><br
> /><br />
>
>
> <!-- MENSAGEM DE SUCESSO OU ERRO -->
> <table width="100%" border="0" cellspacing="0" cellpadding="0">
> <tr>
> <logic:equal name="status" value="success">
> <td background="imagens/linha_sucesso.gif" align="center"
> valign="middle" height="32">
>
> Operação realizada com sucesso!<br />
>
> </td>
> </logic:equal>
> <logic:equal name="status" value="error">
> <td background="imagens/linha_erro.gif" align="center"
> valign="middle" height="32">
>
> Operação não pôde ser realizada. Tente novamente mais tarde.<br />
>
> </td>
> </logic:equal>
> </tr>
> </table>
> <logic:notEqual name="status" value="none">
> <br />
> </logic:notEqual>
> <!-- MENSAGEM DE SUCESSO OU ERRO -->
> <%
> if(groups != null && groups.size() > 0){
> %>
> <!-- tabela de GRUPOS -->
> <table width="740" border="0" cellspacing="2" cellpadding="4">
> <tr>
> <td bgcolor="#f3efe9" align="center" valign="middle" width="30">Id<br
> /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle" width="135">Nome
> do grupo<br /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="385">Descrição<br /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="75">Editar<br /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="75">Excluir<br /></td>
> </tr>
> <%
> String groupId;
> String groupName;
> String groupDescription;
>
> String removeButton;
> String editButton;
>
> for(int i = 0; i < groups.size(); i++){
> groupId = Long.toString(groups.get(i).getSmsGroupId());
> groupName = groups.get(i).getName();
> groupDescription = groups.get(i).getDescription();
>
> editButton = "document.getElementById('smsGroupId').value='" +
> groupId + "';document.getElementById('name').value='" + groupName +
> "';document.getElementById('description').value='" + groupDescription +
> "';document.getElementById('mode').value='edit';";
> removeButton = "document.getElementById('smsGroupId').value='" +
> groupId + "';document.getElementById('name').value='" + groupName +
> "';document.getElementById('description').value='" + groupDescription +
> "';document.getElementById('mode').value='rem';";
> %>
> <tr>
> <td bgcolor="#eeeeee" align="center" valign="middle">
> <%=groupId%><br />
> </td>
> <td bgcolor="#eeeeee" align="left" valign="middle">
> <strong><%=groupName%></strong><br />
> </td>
> <td bgcolor="#eeeeee" align="left" valign="middle">
> <%=WordWrapper.wrapTextByColumnWidth(groupDescription, 385)%><br />
> </td>
> <td bgcolor="#eeeeee" align="center" valign="middle">
> <html:image src="imagens/bot_exclamacao.gif" border="0"
> property="Submit" value="Submit" alt="Submit"
> onmouseover="overlib(helpFrame+'Clique aqui para editar os parâmetros deste
> grupo.', CSSCLASS, FGCLASS, 'ol_class_fg', BGCLASS, 'ol_class_bg',
> TEXTFONTCLASS, 'ol_class_fn', TIMEOUT, null, DELAY, null);"
> onmouseout='nd()' onclick="<%=editButton%>"/><br />
> </td>
> <td bgcolor="#eeeeee" align="center" valign="middle">
> <html:image src="imagens/bot_excluir.gif" border="0"
> property="Submit" value="Submit" alt="Submit"
> onmouseover="overlib(helpFrame+'Clique aqui para remover este grupo.',
> CSSCLASS, FGCLASS, 'ol_class_fg', BGCLASS, 'ol_class_bg', TEXTFONTCLASS,
> 'ol_class_fn', TIMEOUT, null, DELAY, null);" onmouseout='nd()'
> onclick="<%=removeButton%>"/><br />
> </td>
> </tr>
> <% } %>
> </table>
> <% } %>
>
> <!-- FIM da tabela de GRUPOS -->
> <br />
>
> <table width="740" border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td align="right">
> <html:image src="imagens/bot_ad_grupo.gif" border="0"
> property="Submit" value="Submit" alt="Submit"
> onclick="javascript:adiciona()"/>
> <br />
> </td>
> </tr>
> </table>
> <br />
> </td>
> </tr>
> </html:form>
> </table>
> <!-- CONTEÚDO DA PÁGINA -->
> </td>
> </tr>
> <tr>
> <td> imagens/bottom_sec.gif </td>
> </tr>
> <tr>
> <td align="left">
>
> mobiw v1.0.0 (c) 2007. Rede Wireless ltda. Todos os Direitos
> Reservados.<br /></td>
> </tr>
> </table>
> </div>
>
> </body>
> </html>
>
> --
> View this message in context: http://www.nabble.com/Hidden-field-null-in-IE-tp16451002p16451002.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_184962.ezm (zipped)Can you reduce that to a minimal use-case and repost? It's hard to wade
through that much HTML/JavaScript/Java/JSP to find out what's actually
happening.
Dave
--- phms <pedrinho.k2@(protected):
>
> Folks,
>
> I have a JSP page in which i need to set a hidden field (mode) using
> javascript and send it to a form using struts. The code works on Firefox
> but in IE the field is not modifyed (null). Below is my code:
>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)" %>
> <%@(protected)
> import="com.redewireless.psiw.applications.smsmanager.model.SmsGroup" %>
> <%@(protected)
> import="com.redewireless.psiw.applications.smsmanager.model.SmsGroupMember"
> %>
> <%@(protected)" %>
>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
> <title>mobiw : Plataforma de Serviços de Interatividade Wireless</title>
> </head>
>
> <link href="css/css_main.css" rel="stylesheet" type="text/css" />
>
>
> <link rel="stylesheet" href="css/new.css" type="text/css" media="screen" />
>
>
> <link title="calendar-brown" href="js/calendar-smsp.css" media="all"
> type="text/css" rel="stylesheet" />
>
> <script type="text/javascript" src="js/calendar.js"></script>
> <script src="js/calendar-pt.js" type="text/javascript"></script>
> <script src="js/calendar-setup.js" type="text/javascript"></script>
> <script type="text/javascript" src="js/overlib.js"></script>
> <script type="text/javascript" src="js/overFunc.js"></script>
> <script type="text/javascript" src="js/j.js"></script>
>
> <script language="JavaScript" type="text/javascript">
> <!--
> var helpFrame='<!--[if lte IE 6.5]><iframe></iframe><![endif]-->';
>
> function adiciona(){
> document.forms[0].smsGroupId.value="";
> document.forms[0].name.value="";
> document.forms[0].description.value="";
> document.forms[0].mode.value="add";
> document.forms[0].submit();
> return true;
> }
> -->
> </script>
> <body bgcolor="#eeeeee" leftmargin="0" topmargin="0" rightmargin="0"
> bottommargin="0" marginwidth="0" marginheight="0">
>
> <%
> //Global variables
> Facade facade = Facade.getInstance();
> PsiwUser user = (PsiwUser)
> request.getSession().getAttribute(Constants.USER_KEY);
> List<SmsGroup> groups = facade.getSmsGroups(user);
> %>
>
> <div class="select-free" id="overDiv" style="position:absolute;
> visibility:hidden; z-index:10000;"></div>
> imagens/espaco.gif <br />
> <div align="center">
>
> <table width="763" border="0" cellspacing="0" cellpadding="0">
> <tr>
> <td> imagens/topo_sec.gif <br /></td>
> </tr>
> <tr>
> <td background="imagens/bg_sec.gif" align="center">
> <%@(protected)" %>
> <br /><br />
> </td>
> </tr>
> <tr>
> <td background="imagens/bg_sec.gif" align="center">
> <!-- CONTEÚDO DA PÁGINA -->
> <table width="745" border="0" cellspacing="0" cellpadding="0">
> <html:form styleId="manageSmsGroupForm" method="POST"
> action="ManageSmsGroup" enctype="multipart/form-data">
> <html:hidden property="mode" styleId="mode"/>
> <html:hidden property="name" styleId="name"/>
> <html:hidden property="description" styleId="description"/>
> <html:hidden property="smsGroupId" styleId="smsGroupId"/>
> <html:hidden property="page" styleId="page" value="0"/>
> <tr>
> <td align="left">
>
> sec_msg_menu_operacoes.jsp GERENCIAMENTO DE ENVIO DE MENSAGENS >
> GERENCIAMENTO DE GRUPOS
> <br /><br />
>
> </td>
> </tr>
>
> <tr>
> <td align="left">
>
> imagens/seta_cinza.gif <strong>Gerenciamento de grupos</strong><br
> /><br />
>
>
> <!-- MENSAGEM DE SUCESSO OU ERRO -->
> <table width="100%" border="0" cellspacing="0" cellpadding="0">
> <tr>
> <logic:equal name="status" value="success">
> <td background="imagens/linha_sucesso.gif" align="center"
> valign="middle" height="32">
>
> Operação realizada com sucesso!<br />
>
> </td>
> </logic:equal>
> <logic:equal name="status" value="error">
> <td background="imagens/linha_erro.gif" align="center"
> valign="middle" height="32">
>
> Operação não pôde ser realizada. Tente novamente mais tarde.<br />
>
> </td>
> </logic:equal>
> </tr>
> </table>
> <logic:notEqual name="status" value="none">
> <br />
> </logic:notEqual>
> <!-- MENSAGEM DE SUCESSO OU ERRO -->
> <%
> if(groups != null && groups.size() > 0){
> %>
> <!-- tabela de GRUPOS -->
> <table width="740" border="0" cellspacing="2" cellpadding="4">
> <tr>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="30">Id<br
> /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="135">Nome
> do grupo<br /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="385">Descrição<br /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="75">Editar<br /></td>
> <td bgcolor="#f3efe9" align="center" valign="middle"
> width="75">Excluir<br /></td>
> </tr>
> <%
> String groupId;
> String groupName;
> String groupDescription;
>
> String removeButton;
> String editButton;
>
> for(int i = 0; i < groups.size(); i++){
> groupId = Long.toString(groups.get(i).getSmsGroupId());
> groupName = groups.get(i).getName();
> groupDescription = groups.get(i).getDescription();
>
> editButton = "document.getElementById('smsGroupId').value='" +
> groupId + "';document.getElementById('name').value='" + groupName +
> "';document.getElementById('description').value='" + groupDescription +
> "';document.getElementById('mode').value='edit';";
> removeButton = "document.getElementById('smsGroupId').value='" +
> groupId + "';document.getElementById('name').value='" + groupName +
> "';document.getElementById('description').value='" + groupDescription +
> "';document.getElementById('mode').value='rem';";
> %>
> <tr>
> <td bgcolor="#eeeeee" align="center" valign="middle">
> <%=groupId%><br />
> </td>
> <td bgcolor="#eeeeee" align="left" valign="middle">
> <strong><%=groupName%></strong><br />
> </td>
> <td bgcolor="#eeeeee" align="left" valign="middle">
> <%=WordWrapper.wrapTextByColumnWidth(groupDescription, 385)%><br
> />
> </td>
> <td bgcolor="#eeeeee" align="center" valign="middle">
> <html:image src="imagens/bot_exclamacao.gif" border="0"
> property="Submit" value="Submit" alt="Submit"
> onmouseover="overlib(helpFrame+'Clique aqui para editar os parâmetros deste
> grupo.', CSSCLASS, FGCLASS, 'ol_class_fg', BGCLASS, 'ol_class_bg',
> TEXTFONTCLASS, 'ol_class_fn', TIMEOUT, null, DELAY, null);"
> onmouseout='nd()' onclick="<%=editButton%>"/><br />
> </td>
>
=== message truncated ===

Attachment:
user_184964.ezm (zipped)--- Musachy Barroso <musachy@(protected):
> Oh my eyes!, now seriously, that is kind of hard to read (and you
> didn't even say what field it was).
> > On Wed, Apr 2, 2008 at 4:35 PM, phms <pedrinho.k2@(protected):
> > I have a JSP page in which i need to set a hidden field **(mode)** using
:p
Beat you to asking for a better example, though :D
Dave

Attachment:
user_184959.ezm (zipped)OK - found it. For anyone else looking for it in the future, it is in
the org.apache.struts2 package root not the root of the jar.
Dan
-----Original Message-----
From: Dave Newton [mailto:newton.dave@(protected)]
Sent: Wednesday, April 02, 2008 11:51 AM
To: Struts Users Mailing List
Subject: RE: struts-default.properties
--- "Barron, Daniel" <dbarron@(protected):
> There is no "default.properties" file in the v2.0.11.1 S2 core jar
[...]
Then you have a corrupt struts2-core-2.0.11.1.jar file.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Attachment:
user_184961.ezm (zipped)Hi,
I think the best solution is to develop two Interceptors, one will run
after action invocation and will store messages in session or some
other objects from given request key. And second one, which will be
run before action invocation, that will retrieve such stored messages
from session and put them in to the request.
We have some similar solution but for Struts1. We subclassed
DispatchAction and after invocking execute() method we storing in
session messaged from given request key. And before next execute(), we
are checking such key in session and retrieving them back to the
request.
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart

Attachment:
user_184963.ezm (zipped)Hello. I am having a problem getting "repopulateField" to work. In
short, I have added date validation to one of my actions. In my
validation xml file, I have this:
<field name="moviereview.reviewdate">
<field-validator type="conversion" short-circuit="true">
<param name="repopulateField">true</param>
<message>Date of Review entered is not a valid date.</message>
</field-validator>
<field-validator type="date">
<param name="min">01/01/2007</param>
<param name="max">12/31/2008</param>
<message>Date of Review is out of range. </message>
</field-validator>
</field>
My problem is that "repopulateField" is not actually repopulating the
moviereview.reviewdate field on a conversion error. The field is blank.
In my action, I have a "moviereview" object that has a getter and
setter (i.e. "setMoviereview() and getMoviereview()"). So,
"reviewdate" is a Date that belongs to that parent object. I don't
know if that's related at all, though.
Any idea why this isn't working?
Kevin

Attachment:
user_184965.ezm (zipped)jstraub@(protected):
>> Struts 2?
>>
>
> Sorry, yes I am using Struts 2.
>
>> Er, what other forums would you have tried?
>>
>
> Varied coding forums that happened to have a
> struts/hibernate/whatever-else subsection
>
>> Use map- (and/or) index-based field names. Trivial with S2, don't actually
>> remember for S1.
>>
>
> I may not understand what you are saying.
>
> I have a set of varying size that needs to generate modifiable text fields
> for each element in the set. This means that within my Action I simply
> load up a Set/Map and then in the .jsp use the iterator tag to pre-fill
> the text fields. The text fields are inside a form tag.
>
> If I use index based field names, other than directly parsing the stream,
> is there a way to retrieve the modifications made to the text fields in
> the Action to which I submit the form?
You don't need to 'parse the stream', Struts does that for you. Struts
will call the setters on the objects in your set to pass the form inputs
into them. In other words, the result you want to achieve is what
happens automatically, provided you specify your input fields correctly.
L.

Attachment:
user_184966.ezm (zipped)Your action doesn't have a bean of name/type Note, it only has a single
String property 'str'. Did you mean this property is not being set? From
the code you've included, it should be set from the textfield so you
must have something configured wrong. What does your action mapping look
like? Are you using the default interceptor stack or have you specified
a different one?
L.
xianwinwin wrote:
> Can anyone advise why my bean is null.
>
> I have the following jsp page:
>
> <html>
> <head>
> <s:head theme="ajax"/>
> </head>
> <body>
>
> <s:form
> theme="ajax"
> id="myForm"
> cssStyle="font-size : 8pt; font-family: verdana"
> action="notes_insert"
> method="post" >
>
> <s:textarea rows="5" cols="60" name="str" label="Add Note"
> required="true"/>
>
>
> <s:submit align="center" targets="myForm" theme="ajax"/>
>
> </s:form>
>
> when the user cllicks submit - the action 'insert' kicksin but the bean
> (Note) is null (yes, i have getter and setter)
>
>
>
>
> //action
> @Validation
> public class NoteAction extends BaseSupport implements Serializable
> {
> private String str;
>
>
> @SkipValidation
> public String insert()
> {
> System.out.println("the value is "+ str);
> }
>
>
> public String getStr()
> {
> return str;
> }
>
> public void setStr(String str)
> {
> this.str = str;
> }
> }
>

Attachment:
user_184967.ezm (zipped)