Re: Popup window

2004-02-16 Thread Daniel
Muito obrigado (so much thanks) Jim Theodoridis.

- Original Message -
From: "Jim Theodoridis" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 11:05 AM
Subject: Re: Popup window


> Hi
>
> This is the chooseAuthor.jsp. When U choose an author then
> javascript sets the values of id and name which are properties of the
common
> form
> Common form used from the page addDocumentAuthor.jsp
> where u want to choose the Author
>
>  top.opener.document.commonForm.id.value = id;
>  top.opener.document.commonForm.name.value = name;
>
> i hope this helps.
>
>
> -- chooseAuthor. jsp 
>
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
> <%@ page import="gr.tera.alternative.commons.Constants" %>
>
> 
>   function setAuthor(id,name) {
> top.opener.document.commonForm.id.value = id;
>  top.opener.document.commonForm.name.value = name;
> top.window.close();
>   }
> 
>
>
> 
> 
> 
>   href="<%=request.getContextPath()%>/tiles/layouts/css/default.css"
> type="text/css">
>
> 
>
>  marginheight="0">
>
> <%
>String SLATE = "#DDEEFE";
>String WHITE = "#FF";
>String HEADER="#AAB6C6";
>String bgcolor = null;
>String letters[] =
>
{"%","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R"
> ,"S","T","U","V","W","X","Y","Z"};
>  %>
>
> 
>  
>  
>type="java.lang.String" >
> styleClass="LETTER"><%=currentChar%>
>   
>  
> 
>
> 
>
> 
>
>type="gr.tera.alternative.bo.AuthorBO"
>   name="<%=Constants.AUTHORS_KEY%>"
>   indexId="index"  >
>
> <%
>if((index.intValue() % 2) == 0) {
>   bgcolor = WHITE;
>  } else {
>   bgcolor = SLATE;
>  }
> %>
>
>   
> <%= index.intValue()+1 %>
> 
>/>','')" class="LETTER">
>
>   
>  
>   
> 
> 
> 
>
>
> 
> 
>
>
> addDocumentAuthor.jsp--
>
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
>
> <%@ page import="gr.tera.alternative.commons.Constants" %>
> 
>
> 
>
>
>  type="gr.tera.alternative.bo.DocumentBO"
> name="<%=Constants.DOCUMENT_KEY%>" />
>
>name="document"
>   property="category"
>   type="gr.tera.alternative.bo.CategoryBO" />
>
>name="document"
>   property="kind"
>   type="gr.tera.alternative.bo.KindBO" />
>
>  bgcolor="#E7EFE9">
>  
>    
>  
>   
>   
>  />
> 
>  
>   
> 
> 
>  
>key="document.category"/>
> 
> 
>  
>   
>  />
> 
>  
>
>align="center" >
>  name="document"
>  property="authors"
>  type="gr.tera.alternative.bo.AuthorBO"
>  indexId="index">
>
> <%=index.intValue()+1 %>
>  property="name" filter="false" />
> 
>  delete
> 
> 
>  update
> 
>
>
>
>   
>
> 
> 
>
>
> 
> 
>  
>   
> 
>   
>readonly="true"/>choose
> Author
>
>
>   
> 
>  
>   
>   
>
> 
> 
>   
>
>   
>  
>  
>   
>
> 
>  
>  
>
> 
>   
>  
> 
> 
>
> - Original Message -
> From: "Daniel" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Monday, February 16, 2004 4:24 PM
> Subject: Popup window
>
>
> There are some example of creating a popup window, for select (of datagrid
> for example )one value and come back to the window with the value selected
> with Struts.
>
> tnks
> Daniel S.
>
>
>
> -
> 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: Popup window

2004-02-16 Thread Jim Theodoridis
Hi

This is the chooseAuthor.jsp. When U choose an author then
javascript sets the values of id and name which are properties of the common
form
Common form used from the page addDocumentAuthor.jsp
where u want to choose the Author

 top.opener.document.commonForm.id.value = id;
 top.opener.document.commonForm.name.value = name;

i hope this helps.


-- chooseAuthor. jsp 

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ page import="gr.tera.alternative.commons.Constants" %>


  function setAuthor(id,name) {
top.opener.document.commonForm.id.value = id;
 top.opener.document.commonForm.name.value = name;
top.window.close();
  }






 





<%
   String SLATE = "#DDEEFE";
   String WHITE = "#FF";
   String HEADER="#AAB6C6";
   String bgcolor = null;
   String letters[] =
{"%","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R"
,"S","T","U","V","W","X","Y","Z"};
 %>


 
 
  
   <%=currentChar%>
  
 








<%
   if((index.intValue() % 2) == 0) {
  bgcolor = WHITE;
 } else {
  bgcolor = SLATE;
 }
%>

  
<%= index.intValue()+1 %>

  ','')" class="LETTER">
   
  
 
  









addDocumentAuthor.jsp--

<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ page import="gr.tera.alternative.commons.Constants" %>







 

 


 
   
 
  
  


 
  


 
  


 
  


 
   
  
   
   
<%=index.intValue()+1 %>


 delete


 update

   

   
  
   






 
  

  
  choose
Author


  

 
  
  
   


  
   
  
 
 
  
   

 
 
   

  
 



- Original Message -
From: "Daniel" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 16, 2004 4:24 PM
Subject: Popup window


There are some example of creating a popup window, for select (of datagrid
for example )one value and come back to the window with the value selected
with Struts.

tnks
Daniel S.



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



RE: popup window

2003-01-02 Thread ROSSEL Olivier
> If you want to open a new window when submitting a form you 
> will have to set
> the target of the  or  using "_blank" will 
> launch a new
> window.

Newbie question:
can you make this new window a modal window?

can this window appear when you click the Select (submit) button,
but not when you click the Remove (submit) button ?

how do you force reload of original window when you submit the form
of that new window?


This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: popup window

2003-01-02 Thread Puneet Agarwal
This has nothing to do with action class.

You have JSP -1, which has target defined as "_blank".

when you do some operation on this page, it opens a child window this child
window has a tree structure.
it invokes same action class, but the jsp does not have target as "blank" in
the child window.

now you do some operation in the child window, the response will
automatically come to the same child window.

Where is the problem ?

Regards
Puneet

- Original Message -
From: "Amit Badheka" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>; "Puneet
Agarwal" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 12:18 PM
Subject: Re: popup window


> Hi Puneet,
>
> It works fine, but my problem is that I am using templates.
> So, in the popup window whole template is displaying rather than a single
> jsp.
>
> Also, one more problem is that popup jsp contains a tree. so when we try
to
> explore the tree structure on each event it calls same action(that open
new
> window) and hence each time new popup generated.
>
> Is there any way to forward request to same window that is newly opened?
>
> Amit Badheka.
>
> - Original Message -
> From: "Puneet Agarwal" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, January 02, 2003 4:54 PM
> Subject: Re: popup window
>
>
> > Did "_blank" not work ?
> >
> > or is it that you want response in both of the windows ?
> >
> > Regards
> > Puneet
> > - Original Message -
> > From: "Amit Badheka" <[EMAIL PROTECTED]>
> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> > Sent: Thursday, January 02, 2003 9:26 AM
> > Subject: popup window
> >
> >
> > Hi All,
> >
> > Is there any way to open new window from the action class.
> >
> > I have a requirement like when one from is submitted I have to pass
values
> > of that from to another jsp that will open in new window.
> >
> > please help.
> >
> > AB.
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re: popup window

2003-01-02 Thread Amit Badheka
Hi Puneet,

It works fine, but my problem is that I am using templates.
So, in the popup window whole template is displaying rather than a single
jsp.

Also, one more problem is that popup jsp contains a tree. so when we try to
explore the tree structure on each event it calls same action(that open new
window) and hence each time new popup generated.

Is there any way to forward request to same window that is newly opened?

Amit Badheka.

- Original Message -
From: "Puneet Agarwal" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 4:54 PM
Subject: Re: popup window


> Did "_blank" not work ?
>
> or is it that you want response in both of the windows ?
>
> Regards
> Puneet
> - Original Message -
> From: "Amit Badheka" <[EMAIL PROTECTED]>
> To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
> Sent: Thursday, January 02, 2003 9:26 AM
> Subject: popup window
>
>
> Hi All,
>
> Is there any way to open new window from the action class.
>
> I have a requirement like when one from is submitted I have to pass values
> of that from to another jsp that will open in new window.
>
> please help.
>
> AB.
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


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




Re: popup window

2003-01-02 Thread Puneet Agarwal
Did "_blank" not work ?

or is it that you want response in both of the windows ?

Regards
Puneet
- Original Message -
From: "Amit Badheka" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, January 02, 2003 9:26 AM
Subject: popup window


Hi All,

Is there any way to open new window from the action class.

I have a requirement like when one from is submitted I have to pass values
of that from to another jsp that will open in new window.

please help.

AB.



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: popup window

2003-01-02 Thread du Plessis, Corneil C
If you want to open a new window when submitting a form you will have to set
the target of the  or  using "_blank" will launch a new
window.

-Original Message-
From: Amit Badheka [mailto:[EMAIL PROTECTED]]
Sent: 02 January, 2003 11:26
To: Struts Users Mailing List
Subject: popup window


Hi All,

Is there any way to open new window from the action class.

I have a requirement like when one from is submitted I have to pass values
of that from to another jsp that will open in new window.

please help.

AB.

__

Disclaimer and confidentiality note


Everything in this e-mail and any attachments relating to the official business of 
Standard Bank Group Limited is proprietary to the company. It is confidential, legally 
privileged and protected by law. Standard Bank does not own and endorse any other 
content. 
Views and opinions are those of the sender unless clearly stated as being that of 
Standard Bank. 

The person addressed in the e-mail is the sole authorised recipient. Please notify the 
sender 
immediately if it has unintentionally reached you and do not read, disclose or use the 
content
in any way. 

Standard Bank can not assure that the integrity of this communication has been 
maintained nor 
that it is free of errors, virus, interception or interference.

__

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: Popup window, parent update, best practice

2002-06-25 Thread Daniel Jaffa

Well i had the same problem, and here is the answer that found.

1.  Window 1 pops up window 2.
2.  Window 2 does something (In your case adds a client)
3.  Window 2 has a button that calls a form on window 1 that refreshes that
data, then closes it self.  (You could make step 2 and 3 one step, but i had
to have 2 steps so that multiple new records could be added.)
4.You are done,  hopefully you code if written correctly will show up the
new datum

Pieces of the code



window.opener.document.forms[0].updateFromNames.value="true";
window.opener.document.forms[0].submit();
window.close();


In javascript (window.opener) calls window 1 from window 2.

If works in both netscape and ie.

Hope this answers your question

ps.  I set a value letting my form know that this is an update of the data.
(window.opener.document.forms[0].updateFromNames.value="true";)





- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 2:37 PM
Subject: RE: Popup window, parent update, best practice


>
> The Browser is the one that performs the logic to display what request
> where.  When you tell it to open a new window you are transfering the
> focus there also...
>
> I would think based on what you are describing that you could do it all
> on the same window... When they click to add a new client, save all the
> form data so far (somehow) and when they finish with the client and
> submit that, have it forward them back to the first window...
>
> Makes sense in theory don't it...
>
>
>
> -Original Message-
> From: dhsStrutsDeveloper [mailto:[EMAIL PROTECTED]]
> Sent: Monday, June 24, 2002 2:08 PM
> To: struts-user
> Subject: Re: Popup window, parent update, best practice
>
>
>
> - Original Message -
> From: "Roland Chan" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, June 24, 2002 12:02 PM
> Subject: Popup window, parent update, best practice
>
>
> > Hello,
> >
> > I've searched the archives and have come up with some different
> > approaches but none really match my requirements.
> >
> > Let's say I have Window 'A' which contains a list of clients.  There
> is
> > a button to add a new client which pops up Window 'B'.  The user can
> > enter new client information in Window 'B' and click submit which will
> > call the appropriate dispatched action and add the user.  What I'm
> > looking for is the best practice to send back information to Window
> 'A'
> > after a successful addition in Window 'B'.  For example, I'd like to
> > have the first and last names, and a couple of other pieces of
> > information sent back and added to the client list in Window 'A'.
> >
>
> Why can't the "success" mapping for Action B (window B's action) simply
> be
> the action that resulted in window A. In other words if LoadAction
> causes
> the list of client to appear in Window 'A', then the success mapping for
> B
> would be LoadAction. Sure, it will re-query the data store, but you get
> the
> updated client list in window A after B completes.
>
> 
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>

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




RE: Popup window, parent update, best practice

2002-06-24 Thread wbchmura


The Browser is the one that performs the logic to display what request 
where.  When you tell it to open a new window you are transfering the 
focus there also...  

I would think based on what you are describing that you could do it all 
on the same window... When they click to add a new client, save all the 
form data so far (somehow) and when they finish with the client and 
submit that, have it forward them back to the first window...

Makes sense in theory don't it...



-Original Message-
From: dhsStrutsDeveloper [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 2:08 PM
To: struts-user
Subject: Re: Popup window, parent update, best practice



- Original Message -
From: "Roland Chan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 12:02 PM
Subject: Popup window, parent update, best practice


> Hello,
>
> I've searched the archives and have come up with some different
> approaches but none really match my requirements.
>
> Let's say I have Window 'A' which contains a list of clients.  There 
is
> a button to add a new client which pops up Window 'B'.  The user can
> enter new client information in Window 'B' and click submit which will
> call the appropriate dispatched action and add the user.  What I'm
> looking for is the best practice to send back information to Window 
'A'
> after a successful addition in Window 'B'.  For example, I'd like to
> have the first and last names, and a couple of other pieces of
> information sent back and added to the client list in Window 'A'.
>

Why can't the "success" mapping for Action B (window B's action) simply 
be
the action that resulted in window A. In other words if LoadAction 
causes
the list of client to appear in Window 'A', then the success mapping for 
B
would be LoadAction. Sure, it will re-query the data store, but you get 
the
updated client list in window A after B completes.





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



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




RE: Popup window, parent update, best practice

2002-06-24 Thread Roland Chan

Yes, I should've been a little clearer in my question.

Window 'A' contains a list of *selected* clients, not all clients.
Window 'B' is a popup for creating new clients if the user cannot select
one of the one's provided.  I'd like to have Window 'B' allow the user
to create the client and then return the name and client no. for use by
the action in Window 'A'.

I think the answer may lie in updating the nested action form in Window
'A', but am not certain how to do this after the new entity action has
completed in Window 'B'.

Maybe this isn't the best practice for this type of user scenario.  At
any rate, I thought I'd throw it out there...

-Original Message-
From: Mark Nichols [mailto:[EMAIL PROTECTED]] 
Sent: June 24, 2002 2:08 PM
To: Struts Users Mailing List
Subject: Re: Popup window, parent update, best practice


- Original Message -
From: "Roland Chan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 12:02 PM
Subject: Popup window, parent update, best practice


> Hello,
>
> I've searched the archives and have come up with some different
> approaches but none really match my requirements.
>
> Let's say I have Window 'A' which contains a list of clients.  There
is
> a button to add a new client which pops up Window 'B'.  The user can
> enter new client information in Window 'B' and click submit which will
> call the appropriate dispatched action and add the user.  What I'm
> looking for is the best practice to send back information to Window
'A'
> after a successful addition in Window 'B'.  For example, I'd like to
> have the first and last names, and a couple of other pieces of
> information sent back and added to the client list in Window 'A'.
>

Why can't the "success" mapping for Action B (window B's action) simply
be
the action that resulted in window A. In other words if LoadAction
causes
the list of client to appear in Window 'A', then the success mapping for
B
would be LoadAction. Sure, it will re-query the data store, but you get
the
updated client list in window A after B completes.





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


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




Re: Popup window, parent update, best practice

2002-06-24 Thread Mark Nichols


- Original Message -
From: "Roland Chan" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, June 24, 2002 12:02 PM
Subject: Popup window, parent update, best practice


> Hello,
>
> I've searched the archives and have come up with some different
> approaches but none really match my requirements.
>
> Let's say I have Window 'A' which contains a list of clients.  There is
> a button to add a new client which pops up Window 'B'.  The user can
> enter new client information in Window 'B' and click submit which will
> call the appropriate dispatched action and add the user.  What I'm
> looking for is the best practice to send back information to Window 'A'
> after a successful addition in Window 'B'.  For example, I'd like to
> have the first and last names, and a couple of other pieces of
> information sent back and added to the client list in Window 'A'.
>

Why can't the "success" mapping for Action B (window B's action) simply be
the action that resulted in window A. In other words if LoadAction causes
the list of client to appear in Window 'A', then the success mapping for B
would be LoadAction. Sure, it will re-query the data store, but you get the
updated client list in window A after B completes.





--
To unsubscribe, e-mail:   
For additional commands, e-mail: