Re: Extending Struts 2 controls

2008-06-05 Thread Narayana S
Hi Dave,

  Thanks for reply, let me give more details. i need to apply field
level security to all the form controls. to apply the field customization i
want to extends the custom components provided by struts. for example to
extend i am planning to text field tag *
org.apache.struts2.views.jsp.ui.TextFieldTag*, i want to add a new attribute
to the text field tag.

can you tell me, how i can implement this?

Thanks in advance.
On Thu, Jun 5, 2008 at 6:45 PM, Dave Newton <[EMAIL PROTECTED]> wrote:

> --- On Thu, 6/5/08, Narayana S <[EMAIL PROTECTED]> wrote:
> > in my application, i have a requirement of implementing field
> > level customization, like locking the field, hiding the field
> > etc.. to achieve this i am planning to extends "struts-tags"
> > tag library functionality. can any one give any idea of how
> > to do this?
>
> I'm not sure what you're asking.
>
> To extend the S2 tags themselves you might need to do any or all of the
> following, depending on your needs:
>
> * add tag attributes to the component and tag classes
> * add additional Java code
> * regenerate TLD
> * modify FreeMarker templates
>
> Some might be easier to extend than others.
>
> Dave
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Move query to interceptor

2008-06-05 Thread Frans Thamura
hi all

we want to move the repeated query on our apps to become a interceptor, this
is our file

anyone can give the experience to me about this mode?


NB: the repeated query is a security purpose query, that validate every
user/role to access certain package in struts.xml



F
package org.blueoxygen.proto;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.ServletActionContext;
import org.blueoxygen.cimande.descriptors.Descriptor;
import org.blueoxygen.cimande.modulefunction.ModuleFunction;
import org.blueoxygen.cimande.persistence.PersistenceAware;
import org.blueoxygen.cimande.persistence.PersistenceManager;
import org.blueoxygen.cimande.role.Role;
import org.blueoxygen.cimande.role.RolePrivilage;
import org.blueoxygen.cimande.role.RoleSite;
import org.blueoxygen.cimande.role.RoleSitePrivilage;
import org.blueoxygen.cimande.security.LoginFilter;
import org.blueoxygen.cimande.security.SessionCredentials;
import org.blueoxygen.cimande.security.SessionCredentialsAware;
import org.blueoxygen.cimande.security.User;
import org.blueoxygen.cimande.site.Site;
import org.blueoxygen.cimande.sitemanager.YUINavTreeLeaf;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class CimandeInterceptor implements Interceptor, PersistenceAware, SessionCredentialsAware {
	private PersistenceManager manager;
	private SessionCredentials sessCredentials;
	private Site currentSite;
	private Role currentRole;
	private User currentUser;
	private Descriptor descriptorCalled;
	
	@Override
	public void destroy() {
		
	}

	@Override
	public void init() {
		//init descriptorCalled 
		String requestUri = ServletActionContext.getRequest().getServletPath();
		String descriptorName = requestUri.split("/")[2];
		descriptorCalled = (Descriptor) manager.getByUniqueField(Descriptor.class, descriptorName, "name");
		//init currentSite
		String siteId = (String)ServletActionContext.getRequest().getSession().getAttribute(LoginFilter.LOGIN_CIMANDE_SITE);
		currentSite = (Site) manager.getById(Site.class, siteId);
		//init currentUser
		currentUser = sessCredentials.getCurrentUser();
		currentRole = currentUser.getRole();
	}

	@Override
	public String intercept(ActionInvocation actionInvocation) throws Exception {
		
		if (!isAuthorized(actionInvocation)) {
			return "notallowed";
		}
		return actionInvocation.invoke();
	}

	private boolean isAuthorized(ActionInvocation actionInvocation) {
		boolean auth = false;
		List modules = new ArrayList();
		
		String mySQL = "FROM " + RoleSite.class.getName() + " tmp WHERE tmp.role.id='"+currentRole.getId()+"' AND tmp.site.id='"+currentSite.getId()+"'";
		List temp = new ArrayList();
		temp = manager.getList(mySQL,null,null);
		int total_role_site = temp.size();
		
		if (total_role_site > 0) {
			// read all module function from role_site_privilage.
			mySQL = "FROM tmp in " + RoleSitePrivilage.class + " WHERE tmp.roleSite.site.id = '" + currentSite.getId() + "' AND tmp.roleSite.role.id = '" + currentRole.getId() + "' ORDER BY (tmp.moduleFunction.description)";
			List rsp = new ArrayList();
			rsp = (List)manager.getList(mySQL,null,null);
			for(RoleSitePrivilage tmp : rsp){
modules.addAll(getLeafPrivilage(tmp.getModuleFunction()));
			}
		} else {
			// read all module function from role_privilage
			mySQL = "FROM tmp in " + RolePrivilage.class + " WHERE tmp.role.id='" + currentRole.getId() + "' ORDER BY (tmp.moduleFunction.description)";
			List rp = new ArrayList();
			rp = (List)manager.getList(mySQL,null,null);
			for(RolePrivilage tmp : rp){
modules.addAll(getLeafPrivilage(tmp.getModuleFunction()));
			}
		}
		for(ModuleFunction module : modules){
			if(descriptorCalled.equals(module.getModuleDescriptor())){
return true;
			}
		}
		
		return false;
	}

	private List getLeafPrivilage(ModuleFunction parent){
		List mfs = new ArrayList();
		for(ModuleFunction mf : parent.getModuleFunctions()){
			if(mf.getModuleFunctions().size() <= 0){
mfs.add(mf);
			} else {
mfs.addAll(getLeafPrivilage(mf));
			}
		}
		return parent.getModuleFunctions();
	}
	
	@Override
	public void setPersistenceManager(PersistenceManager arg0) {
		this.manager = arg0;
	}

	@Override
	public void setSessionCredentials(SessionCredentials arg0) {
		this.sessCredentials = arg0;
	}

}
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Move query to interceptor

2008-06-05 Thread Frans Thamura
hi all

we want to move the repeated query on our apps to become a interceptor, this
is our file

anyone can give the experience to me about this mode?


NB: the repeated query is a security purpose query, that validate every
user/role to access certain package in struts.xml



F
package org.blueoxygen.proto;

import java.util.ArrayList;
import java.util.List;

import org.apache.struts2.ServletActionContext;
import org.blueoxygen.cimande.descriptors.Descriptor;
import org.blueoxygen.cimande.modulefunction.ModuleFunction;
import org.blueoxygen.cimande.persistence.PersistenceAware;
import org.blueoxygen.cimande.persistence.PersistenceManager;
import org.blueoxygen.cimande.role.Role;
import org.blueoxygen.cimande.role.RolePrivilage;
import org.blueoxygen.cimande.role.RoleSite;
import org.blueoxygen.cimande.role.RoleSitePrivilage;
import org.blueoxygen.cimande.security.LoginFilter;
import org.blueoxygen.cimande.security.SessionCredentials;
import org.blueoxygen.cimande.security.SessionCredentialsAware;
import org.blueoxygen.cimande.security.User;
import org.blueoxygen.cimande.site.Site;
import org.blueoxygen.cimande.sitemanager.YUINavTreeLeaf;

import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.Interceptor;

public class CimandeInterceptor implements Interceptor, PersistenceAware, SessionCredentialsAware {
	private PersistenceManager manager;
	private SessionCredentials sessCredentials;
	private Site currentSite;
	private Role currentRole;
	private User currentUser;
	private Descriptor descriptorCalled;
	
	@Override
	public void destroy() {
		
	}

	@Override
	public void init() {
		//init descriptorCalled 
		String requestUri = ServletActionContext.getRequest().getServletPath();
		String descriptorName = requestUri.split("/")[2];
		descriptorCalled = (Descriptor) manager.getByUniqueField(Descriptor.class, descriptorName, "name");
		//init currentSite
		String siteId = (String)ServletActionContext.getRequest().getSession().getAttribute(LoginFilter.LOGIN_CIMANDE_SITE);
		currentSite = (Site) manager.getById(Site.class, siteId);
		//init currentUser
		currentUser = sessCredentials.getCurrentUser();
		currentRole = currentUser.getRole();
	}

	@Override
	public String intercept(ActionInvocation actionInvocation) throws Exception {
		
		if (!isAuthorized(actionInvocation)) {
			return "notallowed";
		}
		return actionInvocation.invoke();
	}

	private boolean isAuthorized(ActionInvocation actionInvocation) {
		boolean auth = false;
		List modules = new ArrayList();
		
		String mySQL = "FROM " + RoleSite.class.getName() + " tmp WHERE tmp.role.id='"+currentRole.getId()+"' AND tmp.site.id='"+currentSite.getId()+"'";
		List temp = new ArrayList();
		temp = manager.getList(mySQL,null,null);
		int total_role_site = temp.size();
		
		if (total_role_site > 0) {
			// read all module function from role_site_privilage.
			mySQL = "FROM tmp in " + RoleSitePrivilage.class + " WHERE tmp.roleSite.site.id = '" + currentSite.getId() + "' AND tmp.roleSite.role.id = '" + currentRole.getId() + "' ORDER BY (tmp.moduleFunction.description)";
			List rsp = new ArrayList();
			rsp = (List)manager.getList(mySQL,null,null);
			for(RoleSitePrivilage tmp : rsp){
modules.addAll(getLeafPrivilage(tmp.getModuleFunction()));
			}
		} else {
			// read all module function from role_privilage
			mySQL = "FROM tmp in " + RolePrivilage.class + " WHERE tmp.role.id='" + currentRole.getId() + "' ORDER BY (tmp.moduleFunction.description)";
			List rp = new ArrayList();
			rp = (List)manager.getList(mySQL,null,null);
			for(RolePrivilage tmp : rp){
modules.addAll(getLeafPrivilage(tmp.getModuleFunction()));
			}
		}
		for(ModuleFunction module : modules){
			if(descriptorCalled.equals(module.getModuleDescriptor())){
return true;
			}
		}
		
		return false;
	}

	private List getLeafPrivilage(ModuleFunction parent){
		List mfs = new ArrayList();
		for(ModuleFunction mf : parent.getModuleFunctions()){
			if(mf.getModuleFunctions().size() <= 0){
mfs.add(mf);
			} else {
mfs.addAll(getLeafPrivilage(mf));
			}
		}
		return parent.getModuleFunctions();
	}
	
	@Override
	public void setPersistenceManager(PersistenceManager arg0) {
		this.manager = arg0;
	}

	@Override
	public void setSessionCredentials(SessionCredentials arg0) {
		this.sessCredentials = arg0;
	}

}
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Re: [Struts 2] webapp on internet, clients behind a proxy --> session clash

2008-06-05 Thread Julien ROTT
So there is no solution to avoid the sessions clash in this situation ?


2008/6/5 Dave Newton <[EMAIL PROTECTED]>:

> --- On Thu, 6/5/08, Julien ROTT <[EMAIL PROTECTED]> wrote:
> > I guess the server is a bit confused because the clients
> > have the same IP address (I tried jboss and jetty).
>
> Session management isn't really handled by Struts, it's handled via the app
> server and browser (by sending the session id cookie).
>
> AFAIK the requesting IP address doesn't (shouldn't?) have anything to do
> with it, it's all about what the browser sends to identify the session.
>
> Dave
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


RE: Display tag and AJAX

2008-06-05 Thread Arunkumar Balasubramanian
 
Thanks for your reply.
 
Can you give the reference of javascript functions used for the display:table 
used with in AjaxAnywhere tag? If you have an working example, it would be 
great, if you could provide the reference with other classes involved with 
display:table.
 
 



> From: [EMAIL PROTECTED]> To: user@struts.apache.org> Subject: Re: Display tag 
> and AJAX> Date: Thu, 5 Jun 2008 19:48:14 -0700> > yes, you can update a 
> display table alone with an ajax call. > > this is one done with 
> ajaxanywhere:> > >  name="workers"> decorator="displaytagClasses.DisplayRadio"> 
> class="displaytag">> >  
> style="width: 10px" />>  title="Primer 
> Apellido" />>  title="Segundo Apellido" 
> />>  title="Nombre(s)" />> 
> > > > 
> > >  > > > 
>  > > >  > > >  > > >  > > 
> > > > >  align="center" />>  
> value="${sessionScope.projWorkerPaginator.pageIndexText}" />> > > 
> > > > > > > > Saludos> 
> Lalchandra Rampersaud> > Carpe diem> > > - Original Message 
> - > From: "Arunkumar Balasubramanian" <[EMAIL PROTECTED]>> To: "Struts 
> Users Mailing List" > Sent: Wednesday, June 04, 2008 
> 6:41 PM> Subject: Display tag and AJAX> > > > Can we update the display:table 
> with an ajax call? Here is what I was expecting to do.> > - There are 
> different radio buttons (each will have different status of results) - 
> Depending on the selection, the display:table has to update the rows. - There 
> display:table headers dosen't change and the values inside the display:rable 
> changes based on the selections.> > I was trying to do the following.> > - 
> Make an AJAX call when the user clicks on radio buttons, so that only the 
> display:table gets refreshed and not the entire page. - Based on the 
> selections, the display:table will update the results.> > If someone was able 
> to provide the reference for how to perform the above task it would be 
> great.> > Thanks in advance.> 
> _> It’s easy 
> to add contacts from Facebook and other social sites through Windows Live™ 
> Messenger. Learn how.> 
> https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
_
Instantly invite friends from Facebook and other social networks to join you on 
Windows Live™ Messenger.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_InviteFriends

Struts2 java script issue/bug with tabbed panel

2008-06-05 Thread tom tom
Hi,

We use struts2 2.0.6 and 


we have the following, when the user click one of the
tabs (div s), I want to know which div id is focussed
or clicked, so I went  I head and had javascippts
functions(onClick, onFocuss) within 

Re: Parameter question

2008-06-05 Thread Dave Newton
Are you talking about links to actions having parameters appended?

If so, are you either excluding parameters at each  or, 
alternatively, setting a default excludeParams via config?

Dave

--- On Thu, 6/5/08, Stanley, Eric <[EMAIL PROTECTED]> wrote:
> In my app, I have this package/action defined:
>  
>  extends="struts-default"
> namespace="/data">
> 
>  name="paramsPrepareParamsStack" />
> 
>  class="fm.gui.action.DataAction">
> 
>  name="success">/pages/data/viewData.jsp
> 
>  name="error">/pages/error.jsp
> 
> 
> 
> 
> 
>  
> 
> The problem is that as soon as its called, every subsequent
> action has a
> bunch of parameters appended to it. This causes any other
> action to
> fail. They fail because there is no object for the
> parameters to be
> applied to, and rightfully so. I still dont completely
> grasp this
> interceptor, and I think fixing this will help a lot as far
> as that
> goes. Please let me know.
> 
>  
> E. Ryan Stanley
> Phone: 720.578.3703
> Pager: 801.482.0172
>   
>  
> 
> 
> This communication is the property of Qwest and may contain
> confidential or
> privileged information. Unauthorized use of this
> communication is strictly 
> prohibited and may be unlawful.  If you have received this
> communication 
> in error, please immediately notify the sender by reply
> e-mail and destroy 
> all copies of the communication and any attachments.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display tag and AJAX

2008-06-05 Thread Lalchandra Rampersaud
yes, you can update a display table alone with an ajax call. 

this is one done with ajaxanywhere:




   
   
   
   
   

   

 
   
 
 
   
 
 
   
 
 
   
 
 
   
 


 

  
   
  
 

   
  




Saludos
Lalchandra Rampersaud

Carpe diem


- Original Message - 
From: "Arunkumar Balasubramanian" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" 
Sent: Wednesday, June 04, 2008 6:41 PM
Subject: Display tag and AJAX



  Can we update the display:table with an ajax call? Here is what I was 
expecting to do.
 
 - There are different radio buttons (each will have different status of 
results) - Depending on the selection, the display:table has to update the 
rows. - There display:table headers dosen't change and the values inside the 
display:rablechanges based on the selections.
 
 I was trying to do the following.
 
 - Make an AJAX call when the user clicks on radio buttons, so that only the 
display:tablegets refreshed and not the entire page. - Based on the 
selections, the display:table will update the results.
 
 If someone was able to provide the reference for how to perform the above task 
it would be great.
 
 Thanks in advance.
_
It’s easy to add contacts from Facebook and other social sites through Windows 
Live™ Messenger. Learn how.
https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow

Parameter question

2008-06-05 Thread Stanley, Eric
All,
In my app, I have this package/action defined:
 






/pages/data/viewData.jsp

/pages/error.jsp





 

The problem is that as soon as its called, every subsequent action has a
bunch of parameters appended to it. This causes any other action to
fail. They fail because there is no object for the parameters to be
applied to, and rightfully so. I still dont completely grasp this
interceptor, and I think fixing this will help a lot as far as that
goes. Please let me know.

 
E. Ryan Stanley
Phone: 720.578.3703
Pager: 801.482.0172
  
 


This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly 
prohibited and may be unlawful.  If you have received this communication 
in error, please immediately notify the sender by reply e-mail and destroy 
all copies of the communication and any attachments.


Re: detached object cannot be persisted exception again

2008-06-05 Thread Martin

Arun-

did you disable the optimistic_lock code..?
 // OPTIMISTIC LOCK MODE (dont use this as this causes OptimisticLockMode 
Exceptions)

// Attribute olNode = node.attribute( "optimistic-lock" );
//return Versioning.OPTIMISTIC_LOCK_VERSION;

// entity.setOptimisticLockMode( getOptimisticLockMode( olNode ) );

//try a dirty lock..
Attribute dirtyNode = node.attribute( "optimistic-lock-dirty");

entity.setOptimisticLockMode( getOptimisticLockMode(dirtyNode) );

//or lock all
Attribute lockAllNode = node.attribute( "optimistic-lock-all");

entity.setOptimisticLockMode( getOptimisticLockMode(lockAllNode) );

//or No lock
Attribute lockNoneNode = node.attribute( "optimistic-lock-none");
entity.setOptimisticLockMode( getOptimisticLockMode(lockNoneNode) );

HTH,
Martin
- Original Message - 
From: "Arun" <[EMAIL PROTECTED]>

To: "Struts Users Mailing List" 
Sent: Thursday, June 05, 2008 12:11 PM
Subject: detached object cannot be persisted exception again



Hi,

I am using JPA and ehcache.
My entity is this.

@Entity
@Table(name = "holiday_calendar")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class HolidaysCalendar
{
@Id
@Column(name = "HOLIDAY_CALENDAR_ID", nullable = false, unique = true)
private int holidayCalendarId;

@Column(name = "DATE", nullable = false)
private Date date;

@Column(name = "TYPE", nullable = false)
private String type;

@Column(name = "DESCRIPTION", nullable = true)
private String description;

---


}


when I try to do an entityManager.merge(holidaycalendarobj)
First call I am succesful, next tine I get the exception
persistenceexception: detached object cannot be persisted.
I am using openSessionInViewFilter and spring.
I have tried using saveOrUpdate() of hibernate.
I got another exception then.

My log told me this by which I am confused. Please help
javax.persistence.RollbackException: Error while commiting the transaction
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:71)
at
org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:433)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:651)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:621)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:311)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
at
com.slingmedia.emp.facade.employee.LeaveManager$$EnhancerByCGLIB$$5a2b3b92.createHoliday()
at
com.slingmedia.emp.web.actions.employee.LeaveManagerAction.addHolidays(LeaveManagerAction.java:568)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorIntercep

RE: Single user Login

2008-06-05 Thread Prashant Saraf
Hi Jim,

Thanks for the help.. I did try it before what u said, but things are
going worst when user is login off with session time out or close the
browser, 
If user login again after browser crash or browser close then they have
to wait till session timeout is not done.
 

-Original Message-
From: Jim Kiley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2008 10:37 PM
To: Struts Users Mailing List
Subject: Re: Single user Login

If you want to implement a full-blown security scheme like Spring
Security,
there are ways to do it.  If you don't (and that is understandable),
you're
going to need to track whether or not a given user is already logged in,
at
the application level.

One solution, which is absolutely quick-and-dirty, and undoubtedly NOT a
best practice, would be to stash a Set of userids in the application
scope,
using the ApplicationAware interface, and then compare the user who's
trying
to log in to that set of userids.  The complexity you'll get there is
removing the userid from the application scope when the user's session
times
out or he logs out.

jk

On Thu, Jun 5, 2008 at 12:58 PM, Prashant Saraf <[EMAIL PROTECTED]> wrote:

> Does anyone know how to do it?
>
> -Original Message-
> From: Prashant Saraf [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2008 7:14 PM
> To: Struts Users Mailing List
> Subject: RE: Single user Login
>
> Hi ,
>  I am managing it by DB check. My Helper class is checking either user
> is valid or not with DB.
>
> Regards
> PS.
>
>
> -Original Message-
> From: Jim Kiley [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2008 7:10 PM
> To: Struts Users Mailing List
> Subject: Re: Single user Login
>
> This really depends on how you are currently managing authentication.
> How
> are you currently managing authentication?
>
> On Thu, Jun 5, 2008 at 9:33 AM, Prashant Saraf <[EMAIL PROTECTED]>
wrote:
>
> > Hi,
> >
> > I want to know how to do single user login, that is user should not
> > login form multiple location at the same time.
> >
> > Regards,
> >
> > Prashant Saraf
> >
> >
-
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Single user Login

2008-06-05 Thread Jim Kiley
If you want to implement a full-blown security scheme like Spring Security,
there are ways to do it.  If you don't (and that is understandable), you're
going to need to track whether or not a given user is already logged in, at
the application level.

One solution, which is absolutely quick-and-dirty, and undoubtedly NOT a
best practice, would be to stash a Set of userids in the application scope,
using the ApplicationAware interface, and then compare the user who's trying
to log in to that set of userids.  The complexity you'll get there is
removing the userid from the application scope when the user's session times
out or he logs out.

jk

On Thu, Jun 5, 2008 at 12:58 PM, Prashant Saraf <[EMAIL PROTECTED]> wrote:

> Does anyone know how to do it?
>
> -Original Message-
> From: Prashant Saraf [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2008 7:14 PM
> To: Struts Users Mailing List
> Subject: RE: Single user Login
>
> Hi ,
>  I am managing it by DB check. My Helper class is checking either user
> is valid or not with DB.
>
> Regards
> PS.
>
>
> -Original Message-
> From: Jim Kiley [mailto:[EMAIL PROTECTED]
> Sent: Thursday, June 05, 2008 7:10 PM
> To: Struts Users Mailing List
> Subject: Re: Single user Login
>
> This really depends on how you are currently managing authentication.
> How
> are you currently managing authentication?
>
> On Thu, Jun 5, 2008 at 9:33 AM, Prashant Saraf <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > I want to know how to do single user login, that is user should not
> > login form multiple location at the same time.
> >
> > Regards,
> >
> > Prashant Saraf
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


[Struts 2] Focusing to a component (textfield)

2008-06-05 Thread Milan Milanovic
Hi,

I have a form where user enter something and then table below the form is 
populated. I want to focus on one particular textfield in my form, so when user 
click on submit button:



the page is located at that textfield and he just need to enter value.

It seems like simple thing, but is it possible to do in Struts 2.0.11.1 and 
Dojo ?

--
Thx in advance, Milan Milanovic



  

RE: Single user Login

2008-06-05 Thread Prashant Saraf
Does anyone know how to do it?

-Original Message-
From: Prashant Saraf [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2008 7:14 PM
To: Struts Users Mailing List
Subject: RE: Single user Login

Hi ,
 I am managing it by DB check. My Helper class is checking either user
is valid or not with DB.

Regards
PS.


-Original Message-
From: Jim Kiley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2008 7:10 PM
To: Struts Users Mailing List
Subject: Re: Single user Login

This really depends on how you are currently managing authentication.
How
are you currently managing authentication?

On Thu, Jun 5, 2008 at 9:33 AM, Prashant Saraf <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I want to know how to do single user login, that is user should not
> login form multiple location at the same time.
>
> Regards,
>
> Prashant Saraf
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Display tag and AJAX

2008-06-05 Thread Márcio Gurgel
Hi felipe, could you post a example?

2008/6/5 Felipe Lorenz <[EMAIL PROTECTED]>:

> Hi.. you can out the display tag inside of a remote div... and, every time
> when you want refresh the DT, just refresh the div
>
> On Wed, Jun 4, 2008 at 10:41 PM, Arunkumar Balasubramanian <
> [EMAIL PROTECTED]> wrote:
>
> >
> >  Can we update the display:table with an ajax call? Here is what I was
> > expecting to do.
> >
> >  - There are different radio buttons (each will have different status of
> > results) - Depending on the selection, the display:table has to update
> the
> > rows. - There display:table headers dosen't change and the values inside
> the
> > display:rablechanges based on the selections.
> >
> >  I was trying to do the following.
> >
> >  - Make an AJAX call when the user clicks on radio buttons, so that only
> > the display:tablegets refreshed and not the entire page. - Based on
> the
> > selections, the display:table will update the results.
> >
> >  If someone was able to provide the reference for how to perform the
> above
> > task it would be great.
> >
> >  Thanks in advance.
> > _
> > It's easy to add contacts from Facebook and other social sites through
> > Windows Live™ Messenger. Learn how.
> > https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow
>


detached object cannot be persisted exception again

2008-06-05 Thread Arun
Hi,

I am using JPA and ehcache.
My entity is this.

@Entity
@Table(name = "holiday_calendar")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class HolidaysCalendar
{
@Id
@Column(name = "HOLIDAY_CALENDAR_ID", nullable = false, unique = true)
private int holidayCalendarId;

@Column(name = "DATE", nullable = false)
private Date date;

@Column(name = "TYPE", nullable = false)
private String type;

@Column(name = "DESCRIPTION", nullable = true)
private String description;

---


}


when I try to do an entityManager.merge(holidaycalendarobj)
First call I am succesful, next tine I get the exception
persistenceexception: detached object cannot be persisted.
I am using openSessionInViewFilter and spring.
I have tried using saveOrUpdate() of hibernate.
I got another exception then.

My log told me this by which I am confused. Please help
javax.persistence.RollbackException: Error while commiting the transaction
at org.hibernate.ejb.TransactionImpl.commit(TransactionImpl.java:71)
at
org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:433)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:651)
at
org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:621)
at
org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:311)
at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:117)
at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:628)
at
com.slingmedia.emp.facade.employee.LeaveManager$$EnhancerByCGLIB$$5a2b3b92.createHoliday()
at
com.slingmedia.emp.web.actions.employee.LeaveManagerAction.addHolidays(LeaveManagerAction.java:568)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404)
at
com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150)
at
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:123)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221)
at
com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167)
at
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224)
at
com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223)
at
com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.j

Re: Internationalization and EL

2008-06-05 Thread Ralf Fischer
Hi,

when you have the translations in a resource bundle, as you have now
with your package.properties, you cannot simply get the translations
from the stack, but have to invoke the getText method from you
TextProvider.

The TextProvider interface usually is implemented by your action as
soon as you extend ActionSupport. If it doesn't yet, you'll have to
change this, or place a text provider on the stack yourself.

Then just use an expression like %{getText(displayName)}.

Bye,
-Ralf

On Thu, Jun 5, 2008 at 10:56 AM, Matthieu MARC
<[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I'm trying to play with internationalization but I have a small problem.
> Here is my code :
>
> 
>
>   
>
>id="am%{index}" key="timetable.morning" list="heures" value="%{am}" />
>
>id="pm%{index}" key="timetable.afternoon" list="heures" value="%{pm}" />
>
> 
>
>
> My problem is in the label. %{displayName} return monday, tuesday,
> wednesday and I want to translate the label value.
>
> I tried :
>
>
> key="%{displayName}"
>
> key="timetable.%{displayName}"
>
>
> I wrote a package.properties file :
>
> timetable.monday=lundi
>
> monday=lundi
>
>
> But nothing is working.
>
> Is someone have an idea to help me ?
>
> thank in advance.
>
> Matthieu MARC
>
> --
> Matthieu MARC
> [EMAIL PROTECTED]
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Struts 2] Iterator usage

2008-06-05 Thread Milan Milanovic
Hi,

I have one question regarding iterator. I have one simple list that contain 
three values:
List
{ id, value, date } and I'm iterating through this list. And I want to
show in my list a sum for value for every day at the last row that
contain that date, like this:

id__value___date___sum
--
1__10_20.5.2008
2__15_20.5.2008
3__15_20.5.2008___40
4__12_21.5.2008
5__15_21.5.2008___27
6__12_22.5.2008
...

I'm now have done all iterating except this sum column. Do you have any ideas 
how efficent can I do this ?

--
Thx, Milan Milanovic


--- On Thu, 6/5/08, Milan Milanovic <[EMAIL PROTECTED]> wrote:
From: Milan Milanovic <[EMAIL PROTECTED]>
Subject: [Struts 2] Iterator usage
To: user@struts.apache.org
Date: Thursday, June 5, 2008, 7:36 AM

Hi,

I have one question regarding iterator. I have one simple list that contain
three values:
List { id, value, date } and I'm iterating through this list. And I want to
show in my list a sum for value for every day at the last row that contain that
date, like this:

id    value    
date           
sum
--
1   
10        
20.5.2008
2    15
       
20.5.2008
3   
15        
20.5.2008    40
4   
12        
21.5.2008
5    15
       
21.5.2008    27
6   
12        
22.5.2008
...

I'm now have done all iterating except this sum column. Do you have any
ideas how efficent can I do this ?

--
Thx, Milan Milanovic


  

Re: File download problem in IE7 (struts 2) [SOLVED]

2008-06-05 Thread Gustavo Felisberto

In the documentation[1] for the Stream result type we have a:

filename="contacts.xls"

This was causing the problem. A simple change to:

attachment;filename="contacts.xls"

solved the issue.

Hope this may help someone out there

Gustavo
[1] http://struts.apache.org/2.0.11.1/docs/stream-result.html
Gustavo Felisberto escreveu:

Hello ALL,

I'm generating an Excel file in runtime and sending it to the 
client.I'm using struts 2.0.11.

In struts.xml I have:


 
   application/vnd.ms-excel
   excelInputStream
   filename="contacts.xls"
   4096
 


In the class I have:
public InputStream getExcelInputStream() {
   return new ByteArrayInputStream(exportExcelFile().toByteArray());
   }
private ByteArrayOutputStream exportExcelFile() {
   ByteArrayOutputStream bos = new ByteArrayOutputStream();
   try {
   WritableWorkbook workbook = Workbook.createWorkbook(bos);
   WritableSheet sheet = workbook.createSheet("Contactos", 0);
   WritableCellFormat textFormat = new 
WritableCellFormat(NumberFormats.TEXT);


//ADD STUFF TO SHEET

   workbook.write();
   workbook.close();
   } catch (RowsExceededException e) {
   } catch (WriteException e) {
   } catch (IOException e) {
   }
   return bos;
   }

If I use IE7 and I choose to save the file to disk and then open it 
with Excel 2007 all works ok. If I choose to open the file instead of 
saving it I get:
1 - an error in Tomcat:  ERROR [http-8080-Processor21] 
(CommonsLogger.java:24) - Can not find a java.io.InputStream with the 
name [excelInputStream] in the invocation stack. Check the name="inputName"> tag specified for this action.


2- A message from excel saying that the file I'm trying to open 
ExportExcelFile (and not the real name of the file) is in a diferent 
format than the extension. If i choose to open it the file is ok


3- IE7 hard locks until I say yes/no in excel to open the file

I'm accessing tomcat via HTTP

Any help will be much appreciated.




--
Gustavo Felisberto.
WIT-Software, Lda
Coimbra (Portugal), San Jose (California)
Phone: +351239801030
Web: http://www.wit-software.com 





signature.asc
Description: OpenPGP digital signature


[Struts 2] Iterator usage

2008-06-05 Thread Milan Milanovic
Hi,

I have one question regarding iterator. I have one simple list that contain 
three values:
List { id, value, date } and I'm iterating through this list. And I want to 
show in my list a sum for value for every day at the last row that contain that 
date, like this:

id    value 
date    sum
--
1    10 20.5.2008
2    15     20.5.2008
3    15 
20.5.2008    40
4    12 21.5.2008
5    15     
21.5.2008    27
6    12 22.5.2008
...

I'm now have done all iterating except this sum column. Do you have any ideas 
how efficent can I do this ?

--
Thx, Milan Milanovic



  

Re: dynamically view templates

2008-06-05 Thread Dave Newton
--- On Thu, 6/5/08, Kibo <[EMAIL PROTECTED]> wrote:
> [specifying template based on form value]

You can use OGNL in your configuration.

http://struts.apache.org/2.0.11.1/docs/parameters-in-configuration-results.html

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: dynamically view templates

2008-06-05 Thread Musachy Barroso
You can use OGNL in the result like this:

 
   ${template}


then you can have a getTemplate() method in your action that returns
the right template.

musachy

On Thu, Jun 5, 2008 at 10:18 AM, Kibo <[EMAIL PROTECTED]> wrote:
>
>  Hi Conference
>
> I  use Struts 2 and freemarker:
>
>  
>success.ftl
> 
>
> but
> I need load freemarker template dynamically. For example:
> In page is selectBox () with items:
> - template1
> - tempalte 2
> - template 3
> When user click in item template1, I want to return him view, which use
> template1.
> When user click in item tempate2, I want to return him view, which use
> tempate2.
> etc.
>
> I need help how to do. I need not exactly code way, only help how can i do
> it.
>
> Thank for help very much.
>
>
> -
> Tomas Jurman
> Czech Republic
> --
> View this message in context: 
> http://www.nabble.com/dynamically-view-templates-tp17670937p17670937.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



dynamically view templates

2008-06-05 Thread Kibo

 Hi Conference
 
I  use Struts 2 and freemarker:
 
 
success.ftl

 
but
I need load freemarker template dynamically. For example:
In page is selectBox () with items:
- template1
- tempalte 2
- template 3
When user click in item template1, I want to return him view, which use
template1.
When user click in item tempate2, I want to return him view, which use
tempate2.
etc.
 
I need help how to do. I need not exactly code way, only help how can i do
it. 
 
Thank for help very much.
 

-
Tomas Jurman
Czech Republic
-- 
View this message in context: 
http://www.nabble.com/dynamically-view-templates-tp17670937p17670937.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread JG Flowers

This is really bizarre.
I'd tried changing the html link to "forward" after initial "action" version
didn't work. Then changed it back, created a war and deployed in Tomcat
again. Suddenly everything works. 
I'm wondering if Tomcat had some sort of ghost image of prior deployment
that had exactly same war named miniHr.war. 
My guess is the "work" folder that didn't get purged on redeployment perhaps
and as a consequence first time I deployed the tiles version, the non-tiles
version was still lingering around from the prior deployment..
Darn it!


Antonio Petrelli-3 wrote:
> 
> 2008/6/5 JG Flowers <[EMAIL PROTECTED]>:
>> 1) Tiles PMC member? What does PMC stand for? A contributor to Tiles or
>> is
>> PMC some kind of Tiles spin off?
> 
> PMC=Project Management Committee. I am both a committer and I have the
> power to decide the future of Tiles (yeah I've got the power! :-D )
> 
>> 2) I discovered this problem and took a look at the code, and fixed on my
>> side.
>> Hopefully you won't have to do it many times, but sometimes it helps.
>> Uh?
>> Should my code have worked then?
>> Is there a bug in Tiles/Struts integration then?
> 
> Possibly it's a bug, though I did not try to find out.
> 
>>  If you've fixed this how can I get latest build?
> 
> I don't think it's fixed. However you can check the latest version
> checking out the Subversion repository:
> http://svn.apache.org/repos/asf/struts/struts1/trunk/
> Anyway check it in JIRA  if the bug has been already filed:
> https://issues.apache.org/struts/
> If not, file a new bug report and, if you can, post a patch.
> 
> Ciao
> Antonio
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cannot-retrieve-ActionForward-named...-tp17667182p17670588.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Is there such a thing as flash in S2?

2008-06-05 Thread Guillaume Bilodeau

Great!  I'm glad it worked fine.  I'll merge your documentation additions as
soon as I have a moment, thanks for providing them.

I like your idea of generating multiple flash map IDs, it seems like a good
solution would make the implementation more flexible.  Feel free to modify
the code and upload it here - again if I have some time I'll try to have a
look at it also.

As for setting a timeout value on the flash map, the idea's interesting but
I think it would only delay the problem.  Sure putting a 60-second delay on
the map would allow it to survive to quick refreshes, but it wouldn't solve
the case when a user returns to this page later using the back button; plus
it would be possible to clog the session with long-lived flash maps if not
used correctly.  On the other hand, maybe it would solve enough cases to
motivate adding this functionality; plus giving a choice to the developer
can be a good thing.  Maybe the Struts2 seniors would like to give their
opinion on this?

To implement this I'd have the result add a timestamp to the map and the
interceptor check for the timestamp's validity instead of starting a timer
though, it would be much lighter.

Cheers,
GB


kenk wrote:
> 
> GB,
> 
> I've finished implementing my use case using your FlashInterceptor and
> FlashResult -- it worked perfectly and I didn't need to change anything in
> your code.  :clap:  
> 
> But it did take me a while to achieve success, mainly owing to my newness
> to Struts 2 and the difficulty I've had following the S2 documentation. 
> So having said that, I have uploaded some revisions to your JavaDocs, in
> hopes that they will help other newbies dealing with the whole flash scope
> issue, perhaps you can add these.
> 
> The main feedback item I have on the code is the hard-coded "__flashMap"
> key on the session -- this limits you to one flash scope at a time.  How
> about having the FlashResult generate a random key value ( i.e.
> __flashMap_x ), send this as a request parameter, have the
> FlashInterceptor detect this value and use it to access the map.  Poof! 
> No more issue with multiple browser windows open.
> 
> For the refresh issue, have an optional configuration parameter on the
> FlashInterceptor called "flashMapTimeout", defaulting to 60 seconds. 
> Instead of immediately removing the flash map from the session, start a
> java.util.Timer and remove it later.  Poof!  Now the refresh works (until
> the timeout occurs).
> 
> Thanks again for making your code available!
> Ken
> 
>  http://www.nabble.com/file/p17659710/JavaDocAdditions.txt
> JavaDocAdditions.txt 
> 

-- 
View this message in context: 
http://www.nabble.com/Is-there-such-a-thing-as-flash-in-S2--tp16697840p17670259.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Single user Login

2008-06-05 Thread Prashant Saraf
Hi ,
 I am managing it by DB check. My Helper class is checking either user
is valid or not with DB.

Regards
PS.


-Original Message-
From: Jim Kiley [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 05, 2008 7:10 PM
To: Struts Users Mailing List
Subject: Re: Single user Login

This really depends on how you are currently managing authentication.
How
are you currently managing authentication?

On Thu, Jun 5, 2008 at 9:33 AM, Prashant Saraf <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I want to know how to do single user login, that is user should not
> login form multiple location at the same time.
>
> Regards,
>
> Prashant Saraf
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread Antonio Petrelli
2008/6/5 JG Flowers <[EMAIL PROTECTED]>:
> 1) Tiles PMC member? What does PMC stand for? A contributor to Tiles or is
> PMC some kind of Tiles spin off?

PMC=Project Management Committee. I am both a committer and I have the
power to decide the future of Tiles (yeah I've got the power! :-D )

> 2) I discovered this problem and took a look at the code, and fixed on my
> side.
> Hopefully you won't have to do it many times, but sometimes it helps.
> Uh?
> Should my code have worked then?
> Is there a bug in Tiles/Struts integration then?

Possibly it's a bug, though I did not try to find out.

>  If you've fixed this how can I get latest build?

I don't think it's fixed. However you can check the latest version
checking out the Subversion repository:
http://svn.apache.org/repos/asf/struts/struts1/trunk/
Anyway check it in JIRA  if the bug has been already filed:
https://issues.apache.org/struts/
If not, file a new bug report and, if you can, post a patch.

Ciao
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Single user Login

2008-06-05 Thread Jim Kiley
This really depends on how you are currently managing authentication.  How
are you currently managing authentication?

On Thu, Jun 5, 2008 at 9:33 AM, Prashant Saraf <[EMAIL PROTECTED]> wrote:

> Hi,
>
> I want to know how to do single user login, that is user should not
> login form multiple location at the same time.
>
> Regards,
>
> Prashant Saraf
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com


Re: Cannot retrieve ActionForward named...

2008-06-05 Thread JG Flowers

Hi again Antonio,
1) Tiles PMC member? What does PMC stand for? A contributor to Tiles or is
PMC some kind of Tiles spin off?
2) I discovered this problem and took a look at the code, and fixed on my
side.
Hopefully you won't have to do it many times, but sometimes it helps.
Uh?
Should my code have worked then?
Is there a bug in Tiles/Struts integration then?  If you've fixed this how
can I get latest build?

-- 
View this message in context: 
http://www.nabble.com/Cannot-retrieve-ActionForward-named...-tp17667182p17669991.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Single user Login

2008-06-05 Thread Prashant Saraf
Hi,

I want to know how to do single user login, that is user should not
login form multiple location at the same time. 

Regards,

Prashant Saraf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: splitting on a period ? <- please ignore

2008-06-05 Thread Holger Stratmann

Vinny wrote:

Sorry,
I sent this to the wrong "user" list.

Yes you did - and that's why I know a lot of Java and only a little Groovy.
(and cannot see if anybody has answered your question)

Anyway, this should be the same in Java and Groovy: String.split uses a 
REGULAR EXPRESSION to split.
A period (.) is a wildcard for "any character" and therefore regards 
every character as a separator with "nothing in between" :-)


You must escape the period, it should work with split("\\.")

Good luck!


On Wed, Jun 4, 2008 at 11:06 PM, Vinny <[EMAIL PROTECTED]> wrote:

OK, this one baffles me :)

"file.txt".split(".")  produces an empty array ?





testing it on the groovysh, (trying to that more often before posting
on the list) :


groovy:000> mysplit = "file.txt".split(".")
===> [Ljava.lang.String;@73b4f342
groovy:000> mysplit.size()
===> 0
groovy:000> println mysplit
{}
===> null

Thanks in advance.

--
The future is here. It's just not widely distributed yet.
-William Gibson








-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: not working after validation error

2008-06-05 Thread Laurie Harper

StrutsUser wrote:

Hi,
I am having a situation where the  tag does not work. I am doing
some client side validation using javascript and server side valdiations in
the 'validate()' method of my action class. 
When client side validation fails and I click the reset button, the data

gets cleared.
But when the validation fails in the 'validate()' method and I click the
reset button the data is not getting cleared. I don't know if this is a
known issue. 
Could anyone please help me out. 


That's expected behaviour; it's what the HTML 'reset' input type does. 
Reset will reset the form inputs to the values they had when the page 
was loaded. If you want a different behaviour, you will need to 
implement it yourself (either client-side with JavaScript, server-side 
(using a submit button instead of a reset), or some combination of both.


L.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread JG Flowers

Because it's probably still the most widely used Web Framework still. So I
figured I'd hit this one first.
I've got books on Struts 2, JSF and Wicket on my bookshelf to read next!

newton.dave wrote:
> 
> --- On Thu, 6/5/08, JG Flowers <[EMAIL PROTECTED]> wrote:
>> I've been trying to learn Struts [...]
> 
> Just out of curiosity, why are you starting with Struts 1 at this point?
> 
> Dave
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cannot-retrieve-ActionForward-named...-tp17667182p17669578.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Extending Struts 2 controls

2008-06-05 Thread Dave Newton
--- On Thu, 6/5/08, Narayana S <[EMAIL PROTECTED]> wrote:
> in my application, i have a requirement of implementing field 
> level customization, like locking the field, hiding the field
> etc.. to achieve this i am planning to extends "struts-tags" 
> tag library functionality. can any one give any idea of how 
> to do this?

I'm not sure what you're asking.

To extend the S2 tags themselves you might need to do any or all of the 
following, depending on your needs:

* add tag attributes to the component and tag classes
* add additional Java code
* regenerate TLD
* modify FreeMarker templates

Some might be easier to extend than others.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread Dave Newton
--- On Thu, 6/5/08, JG Flowers <[EMAIL PROTECTED]> wrote:
> I've been trying to learn Struts [...]

Just out of curiosity, why are you starting with Struts 1 at this point?

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [Struts 2] webapp on internet, clients behind a proxy --> session clash

2008-06-05 Thread Dave Newton
--- On Thu, 6/5/08, Julien ROTT <[EMAIL PROTECTED]> wrote:
> I guess the server is a bit confused because the clients
> have the same IP address (I tried jboss and jetty).

Session management isn't really handled by Struts, it's handled via the app 
server and browser (by sending the session id cookie).

AFAIK the requesting IP address doesn't (shouldn't?) have anything to do with 
it, it's all about what the browser sends to identify the session.

Dave


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread Antonio Petrelli
2008/6/5 JG Flowers <[EMAIL PROTECTED]>:
> When you were learning all this stuff about Struts, what did you find was to
> best resource?

Eh, I am a Tiles PMC member, so I know a lot about Tiles internals,
not much about Struts.
I discovered this problem and took a look at the code, and fixed on my side.
Hopefully you won't have to do it many times, but sometimes it helps.

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread JG Flowers

Many thanks for response.
When you were learning all this stuff about Struts, what did you find was to
best resource?
I've found James book quite good, but I feel I'm not getting to grips with
some of the stuff that goes on in struts-config.xml..
-- 
View this message in context: 
http://www.nabble.com/Cannot-retrieve-ActionForward-named...-tp17667182p17669249.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Extending Struts 2 controls

2008-06-05 Thread Narayana S
Hi,

in my application, i have a requirement of implementing field level
customization, like locking the field, hiding the field etc.. to achieve
this i am planning to extends "struts-tags" tag library functionality. can
any one give any idea of how to do this?

Thanks in advance.


Re: Cannot retrieve ActionForward named...

2008-06-05 Thread Antonio Petrelli
2008/6/5 JG Flowers <[EMAIL PROTECTED]>:
> When you say "use an action that forwards to a Tiles definition" can you
> elaborate on this a bit more for me.

You have to change this:



into:

  


And, in your SearchAction class, do:
return mapping.findForward("success");

HTH
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread JG Flowers

Hi Antonio.
Many thanks for feedback.
When you say "use an action that forwards to a Tiles definition" can you
elaborate on this a bit more for me.
Cheers
-- 
View this message in context: 
http://www.nabble.com/Cannot-retrieve-ActionForward-named...-tp17667182p17668494.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Cannot retrieve ActionForward named...

2008-06-05 Thread Antonio Petrelli
2008/6/5 JG Flowers <[EMAIL PROTECTED]>:
> forward="search.page"/>

Using a Tiles definition as the name of a forward action is not supported.
Use an action that forwards to a Tiles definition, or use a JSP page.

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



passing parameters by url

2008-06-05 Thread piltrafeta

hi!
i'm having a strange problem...
while i'm exeuting my applications(using struts2) in local (tomcat) with
this
http://localhost:8080/myapplication/sho ... dUser=
the application works fine.
But when i deploy it in an oracle application server it's not working, and
if i print the debug attribute i can see that the idUser attribute is null.
Does anyone have any idea ?
Thanks
-- 
View this message in context: 
http://www.nabble.com/passing-parameters-by-url-tp17668302p17668302.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: focusElement attribute in tag

2008-06-05 Thread Felipe Lorenz
newMedicine.newMedicineDEscription is the name ou the id? Need to be the id
of element.

try to put it i the end, but without a method...you can do this...

On Thu, Jun 5, 2008 at 2:53 AM, StrutsUser <[EMAIL PROTECTED]>
wrote:

>
> Hi,
> I tried as you have mentioned. The script gets called, the element is
> obtained, but focus is not set.
>
>  
>function setDefaultFocus() {
>alert("focusElm
> "+document.getElementById("newMedicine.newMedicineDEscription"));
>
>  document.getElementById("newMedicine.newMedicineDEscription").focus();
>}
>  
>
> I am calling it at the end of the JSP page using
> setDefaultFocus()
>
> I am unable to find out the reason for this.
> ---
>
> felipe.lorenz wrote:
> >
> > Ok. put it insede of tag .
> >
> > SOmething like this:
> > 
> >   
> > _your_javascript_here_
> >   
> > 
> >
> >
> > On Wed, Jun 4, 2008 at 9:40 AM, StrutsUser <[EMAIL PROTECTED]>
> > wrote:
> >
> >>
> >> Hi,
> >> I tried this by putting this code in a javascript function and calling
> it
> >> during onfocus of . It's not working. I am not sure how to call
> >> this
> >> function always when the page is loaded.
> >>
> >> Ajay
> >>
> >>
> >> felipe.lorenz wrote:
> >> >
> >> > Sure:
> >> >
> >> > document.getElementById().focus();
> >> >
> >> > On Wed, Jun 4, 2008 at 8:40 AM, StrutsUser <
> [EMAIL PROTECTED]>
> >> > wrote:
> >> >
> >> >>
> >> >> Thanks Felipe.
> >> >> Could you give me some pointers in writing this sort of Javascript
> >> code
> >> >> for
> >> >> focussing on an element.
> >> >> I am not well versed in Javascript. That's why.
> >> >> Thanks & Regards
> >> >> Ajay
> >> >>
> >> >>
> >> >> felipe.lorenz wrote:
> >> >> >
> >> >> > I do this by java scritp...
> >> >> >
> >> >> > On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser <
> >> [EMAIL PROTECTED]>
> >> >> > wrote:
> >> >> >
> >> >> >>
> >> >> >> Hi,
> >> >> >> I have a requirement where I need to set the focus in a particular
> >> >> >> element
> >> >> >> when a page is loaded. I tried using the 'focusElement' attribute
> >> in
> >> >> >>  tag. I got the error 'Attribute focusElement invalid for
> >> tag
> >> >> >> form
> >> >> >> according to TLD'. I am using struts2-core-2.0.11.jar and the form
> >> tag
> >> >> in
> >> >> >> this version does not have the 'focusElement' attribute. I tried
> >> >> >> downloading
> >> >> >> version 2.0.11.1 also. This too does not have this attribute.
> >> >> >> Could anyone please help me on how to get the latest struts2 jar.
> >> Or
> >> >> is
> >> >> >> there anyother way to set the focus to an element when the page is
> >> >> >> loaded?
> >> >> >>
> >> >> >> Thanks & Regards
> >> >> >> --
> >> >> >> View this message in context:
> >> >> >>
> >> >>
> >>
> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.html
> >> >> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >> >> >>
> >> >> >>
> >> >> >>
> >> -
> >> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> >> >>
> >> >> >>
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644692.html
> >> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17645786.html
> >> Sent from the Struts - User mailing list archive at Nabble.com.
> >>
> >>
> >> -
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17662672.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Display tag and AJAX

2008-06-05 Thread Felipe Lorenz
Hi.. you can out the display tag inside of a remote div... and, every time
when you want refresh the DT, just refresh the div

On Wed, Jun 4, 2008 at 10:41 PM, Arunkumar Balasubramanian <
[EMAIL PROTECTED]> wrote:

>
>  Can we update the display:table with an ajax call? Here is what I was
> expecting to do.
>
>  - There are different radio buttons (each will have different status of
> results) - Depending on the selection, the display:table has to update the
> rows. - There display:table headers dosen't change and the values inside the
> display:rablechanges based on the selections.
>
>  I was trying to do the following.
>
>  - Make an AJAX call when the user clicks on radio buttons, so that only
> the display:tablegets refreshed and not the entire page. - Based on the
> selections, the display:table will update the results.
>
>  If someone was able to provide the reference for how to perform the above
> task it would be great.
>
>  Thanks in advance.
> _
> It's easy to add contacts from Facebook and other social sites through
> Windows Live™ Messenger. Learn how.
> https://www.invite2messenger.net/im/?source=TXT_EML_WLH_LearnHow


Cannot retrieve ActionForward named...

2008-06-05 Thread JG Flowers

I've been trying to learn Struts and come unstuck on it's integration with
Tiles.
I've been following along with Jason Holmes Struts Complete Ref 2nd ed for
(Struts 1)
The source associated to book can be downloaded from 
http://www.jamesholmes.com/StrutsTCR/StrutsTCR2nd-code.zip here 
Chapter 7 is the area I'm experiencing problems with..

When I try and access the deployed app in Tomcat 6 as follows:
http://localhost:9090/MiniHR/
I get the exception:
Cannot create rewrite URL: java.net.MalformedURLException: Cannot retrieve
ActionForward named search

This leads me to believe that the error has to be related to index.jsp, the
“welcome” file in the web.xml.
I am assuming the following snippet of code is the culprit:

Search for Employees

Action forward named search… Hmm.

Struts-config.xml has the following in it:


http://struts.apache.org/dtds/struts-config_1_3.dtd";>



  
  

  

  
  



  

  
  

  
  

  


 

tiles-defs.xml has the following in it:


http://struts.apache.org/dtds/tiles-config_1_3.dtd";>



  
  
  
  
  
  
  

  
  
  
  
  



Is there an obvious error that I need to correct here?
It's got be baffled at the moment.
Cheers in advance for any enlightenment you can give me.
-- 
View this message in context: 
http://www.nabble.com/Cannot-retrieve-ActionForward-named...-tp17667182p17667182.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a subtile(s)?

2008-06-05 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/5 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

Your code seems ok. Do you see an error in the log?

  

No, no errors on the log. :(



Does your generated HTML contain the  elements?
Can I see the code of "login.jsp" for example?

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  

Ahh, looking at the generated HTML showed the problem:


[S2] Ideas on nesting webapps

2008-06-05 Thread T Platt

Hi there,

I'm struggling to find a solution to what I think must be a common problem.

The client I work for has a single Struts/Struts2/Spring-WebFlow mashup of a
webapp that has grown organically over the last few years. We have a very
agile development process and like to do frequent releases.

Unfortunately as this monolithic webapp has grown its getting harder to
release as the dependencies on other outside factors has grown (matching
versions of webservices on other sites, database schema changes etc). There
are some projects within the webapp that need to be released on a weekly
basis and some that hold off these releases by a month while waiting for a
dependency to be satisfied.

Although the webapp lends itself to being broken up into separate webapps as
there are distinct functional areas there is also quite a lot of common code
(headers, footers, client permissions, session attributes) that we'd like to
keep in a single place. We'd like to maintain the same session attributes
across all the functional areas. We spun off one webapp a couple of years
ago as the release problem bit us and now we have two code bases to maintain
- its not great ! The thought of expanding this strategy further is
horrendous.

Does anyone have similar experience ? 

Should we put the common code in its own CVS project (will contain jsp,
java, xml config files etc etc) and somehow pull this into every child
webapp ? We do use Maven and could easily add a 'mother' jar as a dependency
but could everything in a jar be referenced - jsps ? struts config xml ? 

Could we have some kind of mother webapp and include actions/results from
separate child apps ? Bear in mind its all about releasing, its not a simple
case of modules within one webapp.

Would branching the code for different projects work and merging back to
root before a release be a more sensible strategy ? 

Dare I say it on this forum, but are there other frameworks that lend
themselves to this concept ? 

Many thanks in advance for any comments or suggestions.

Theo
-- 
View this message in context: 
http://www.nabble.com/-S2--Ideas-on-nesting-webapps-tp17665819p17665819.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a subtile(s)?

2008-06-05 Thread Antonio Petrelli
2008/6/5 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
>> Your code seems ok. Do you see an error in the log?
>>
> No, no errors on the log. :(

Does your generated HTML contain the  elements?
Can I see the code of "login.jsp" for example?

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Internationalization and EL

2008-06-05 Thread Matthieu MARC

Hi everybody,

I'm trying to play with internationalization but I have a small problem. 
Here is my code :




   

   

   




My problem is in the label. %{displayName} return monday, tuesday, 
wednesday and I want to translate the label value.


I tried :


key="%{displayName}"

key="timetable.%{displayName}"


I wrote a package.properties file :

timetable.monday=lundi

monday=lundi


But nothing is working.

Is someone have an idea to help me ?

thank in advance.

Matthieu MARC

--
Matthieu MARC
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a subtile(s)?

2008-06-05 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/5 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

While the word Menu shows up in the final page, I don't see menu1,2 or 3.



Your code seems ok. Do you see an error in the log?

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  

No, no errors on the log. :(
Dimitris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a subtile(s)?

2008-06-05 Thread Antonio Petrelli
2008/6/5 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
> While the word Menu shows up in the final page, I don't see menu1,2 or 3.

Your code seems ok. Do you see an error in the log?

Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is there a subtile(s)?

2008-06-05 Thread Dimitris Mouchritsas

Antonio Petrelli wrote:

2008/6/4 Dimitris Mouchritsas <[EMAIL PROTECTED]>:
  

The menu would look something like:
.

So in essence there are 3 seperate menus there.



Ok, you can use "definition in a definition". For example:


  
  
  



  




  

There
will need to be logic to hide/show specific items in each menu, according to
a user's role.



You can use a controller (a Tiles controller) to create items to show
in a JSP page.

HTH
Antonio

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  

Hi again,
I'm having some trouble understanding your suggestion. Here's what I've 
done so far:


tiles-defs.xml:
=
   
   
   
   
   value="/WEB-INF/jsp/common/opening_report.jsp"/>

   
   
   
   
   

   
   
   
   
   

   
   
   


layout.jsp:
===

 


menu.jsp:
==
Menu

   


   


   


While the word Menu shows up in the final page, I don't see menu1,2 or 
3. Could you please elaborate some more?

Thanks
Dimitris

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]