Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem

2006-11-14 Thread Nili Adoram
replace the hard-coded window.open with window.showModalDialog or some 
other javascript method that determines the size and location of the 
popup relative to the opener.

Johan Compagner wrote:
> just curious why do you want to extend it? what do you need?
>
> johan
>
>
> On 11/14/06, *Nili Adoram* <[EMAIL PROTECTED] 
> > wrote:
>
> In version 1.2.2 is it still cumbersome to extend PopupSettings.
> all fields are private (windowName, top, left etc.) with no
> getters, as
> well as flagToString().
>
> -- Nili
>
> Eelco Hillenius wrote:
> >> I'm having trouble with porting this code into wicket. For the
> first
> >> time when one clicks the "..." button, modal dialog comes up.
> For the
> >> following clicks, IE opens up both a new window and the modal
> dialog
> >> with the same contents.
> >> With FF it works as expected.
> >>
> >> I suspect, it has something to do with pagemaps or versioning,
> but how
> >> could I know, I'm new to wicket world. Please, help me.
> >>
> >
> > Could you try with the latest Wicket version from branch wicket-1.x?
> > We just removed a redundant check for page maps that was a problem
> > with frames; that might be a problem here too.
> >
> >
> >> BTW, in order to make a different javascript code I copy-pasted
> entire
> >> content of PopupSettings and made a new getPopupSettings
> function. Is
> >> there other way around?
> >>
> >
> > Kind of the same, but you don't have to copy the whole class if you
> > extend. This:
> >
> >   PopupSettings popupSettings = new MyPopupSettings(
> PageMap.forName("popup")) {
> > public String getPopupJavaScript() {
> >   // return your custom javascript here
> > }
> >   }
> >
> > Eelco
> >
> >
> -
>
> > Using Tomcat but need to do more? Need to support web services,
> security?
> > Get stuff done quickly with pre-integrated technology to make
> your job easier
> > Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> >
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> > ___
> > Wicket-user mailing list
> > Wicket-user@lists.sourceforge.net
> 
> > https://lists.sourceforge.net/lists/listinfo/wicket-user
> >
> >
>
>
> -
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
> 
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> 
>
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>   

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem

2006-11-14 Thread Johan Compagner
just curious why do you want to extend it? what do you need?johanOn 11/14/06, Nili Adoram <[EMAIL PROTECTED]
> wrote:In version 1.2.2 is it still cumbersome to extend PopupSettings.all fields are private (windowName, top, left etc.) with no getters, as
well as flagToString().-- NiliEelco Hillenius wrote:>> I'm having trouble with porting this code into wicket. For the first>> time when one clicks the "..." button, modal dialog comes up. For the
>> following clicks, IE opens up both a new window and the modal dialog>> with the same contents.>> With FF it works as expected. I suspect, it has something to do with pagemaps or versioning, but how
>> could I know, I'm new to wicket world. Please, help me. Could you try with the latest Wicket version from branch wicket-1.x?> We just removed a redundant check for page maps that was a problem
> with frames; that might be a problem here too. BTW, in order to make a different _javascript_ code I copy-pasted entire>> content of PopupSettings and made a new getPopupSettings function. Is
>> there other way around? Kind of the same, but you don't have to copy the whole class if you> extend. This:>>   PopupSettings popupSettings = new MyPopupSettings(
PageMap.forName("popup")) {> public String getPopupJavaScript() {>   // return your custom _javascript_ here> }>   }>> Eelco>> -
> Using Tomcat but need to do more? Need to support web services, security?> Get stuff done quickly with pre-integrated technology to make your job easier> Download IBM WebSphere Application Server v.1.0.1
 based on Apache Geronimo> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___> Wicket-user mailing list> Wicket-user@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/wicket-user>>-Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem

2006-11-13 Thread Nili Adoram
In version 1.2.2 is it still cumbersome to extend PopupSettings.
all fields are private (windowName, top, left etc.) with no getters, as
well as flagToString().

-- Nili

Eelco Hillenius wrote:
>> I'm having trouble with porting this code into wicket. For the first
>> time when one clicks the "..." button, modal dialog comes up. For the
>> following clicks, IE opens up both a new window and the modal dialog
>> with the same contents.
>> With FF it works as expected.
>>
>> I suspect, it has something to do with pagemaps or versioning, but how
>> could I know, I'm new to wicket world. Please, help me.
>> 
>
> Could you try with the latest Wicket version from branch wicket-1.x?
> We just removed a redundant check for page maps that was a problem
> with frames; that might be a problem here too.
>
>   
>> BTW, in order to make a different javascript code I copy-pasted entire
>> content of PopupSettings and made a new getPopupSettings function. Is
>> there other way around?
>> 
>
> Kind of the same, but you don't have to copy the whole class if you
> extend. This:
>
>   PopupSettings popupSettings = new MyPopupSettings(PageMap.forName("popup")) 
> {
> public String getPopupJavaScript() {
>   // return your custom javascript here
> }
>   }
>
> Eelco
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem

2006-09-08 Thread Eelco Hillenius
> I'm having trouble with porting this code into wicket. For the first
> time when one clicks the "..." button, modal dialog comes up. For the
> following clicks, IE opens up both a new window and the modal dialog
> with the same contents.
> With FF it works as expected.
>
> I suspect, it has something to do with pagemaps or versioning, but how
> could I know, I'm new to wicket world. Please, help me.

Could you try with the latest Wicket version from branch wicket-1.x?
We just removed a redundant check for page maps that was a problem
with frames; that might be a problem here too.

> BTW, in order to make a different javascript code I copy-pasted entire
> content of PopupSettings and made a new getPopupSettings function. Is
> there other way around?

Kind of the same, but you don't have to copy the whole class if you
extend. This:

  PopupSettings popupSettings = new MyPopupSettings(PageMap.forName("popup")) {
public String getPopupJavaScript() {
  // return your custom javascript here
}
  }

Eelco

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket 1.2.1 and ModalDialog problem

2006-09-08 Thread shumbola
Should I provide some other forms of code in order to get help?
No developer using wicket faced similar problem? Maybe my approach is
not correct?

Regards,
shumbola

> All,

> I've got this simple use case:

> On compose e-mail page click on some button that shows list of users
> in modal window and after user chooses the the user(s), the modal
> window closes and compose page updated with the address of choosen
> user. Here is the simple html test case:

> --compose.html
> 
> 
> 
> var UserListRef = null;
> function ListUsers()
> {
> if(window.showModalDialog) //IE
> {
> window.showModalDialog("listusers.html",
> document, "dialogHeight: 120px; dialogWidth: 400px; help: no;
> status: no")
> return false;
> }
> else //FF, did not test other browsers due to lack of those
> {
> if(UserListRef == null || UserListRef.closed)
> UserListRef = window.open("listusers.html",
> document, "height=120px, width=400px, help=no, status=no,
> dialog=yes, modal=yes");
> else
> UserListRef.focus();
> }
> }
> 
> 

> 
>  >
> 
> 
> 

> --listusers.html
> 
> 
> 
> 
> function Close()
> {
> if(window.showModalDialog) //IE
> {
> n = dialogArguments.getElementById("to_user");
> n.value = document.getElementById("user").value;
> window.close();
> }
> else //FF
> {
> var o = window.opener.document.getElementById(("to_user"));
> o.value = document.getElementById("user").value;
> window.close();
> }
> }
> 

> 
> 
> 
> user1
> 
> 
> user2
> 
> 
> 
> 
> 


> Now, with static html files it works as expected, i.e., on "..."
> button click we have modal window with list of users.

> jsp page with struts action works as expected, too.

> I'm having trouble with porting this code into wicket. For the first
> time when one clicks the "..." button, modal dialog comes up. For the
> following clicks, IE opens up both a new window and the modal dialog
> with the same contents.
> With FF it works as expected.

> I suspect, it has something to do with pagemaps or versioning, but how
> could I know, I'm new to wicket world. Please, help me.

> Here are relevant wicket code:

> --Compose
> public class Compose extends MyAuthenticatedPage {
> public Compose() {
> add(new Label("message", "here we will compose a new message"));
> PopupSettings popupSettings = new
> MyPopupSettings(PageMap.forName("popup")).
> setHeight(500).setWidth(500);
> Link listUsers = new PageLink("listUsers", ListUsers.class);
> listUsers.setPopupSettings(popupSettings);
> add(listUsers);
> }
> }
> --ListUsers
> public class ListUsers extends WebPage {
> public ListUsers() {
> }
> }
> --MyPopupSettings
> public class MyPopupSettings  extends PopupSettings {
>  same as in PopupSettings except the following
> public String getPopupJavaScript()
> {
> String windowTitle = windowName;

> if (windowTitle == null)
> {
> windowTitle = "";
> }
> else
> {
> // Fix for IE bug.
> windowTitle = windowTitle.replace(':', '_');
> }

> StringBuffer script =
> new StringBuffer("if(window.showModalDialog) { 
> window.showModalDialog(");
> script.append(target).append(", document, ");

> script.append("'dialogHeight:120px; dialogWidth:400px;
> help:no; status:no'); ").append(" return false; }");

> script.append(" else { if(UserListRef == null ||
> UserListRef.closed) UserListRef = window.open(");
> script.append(target).append(", document, ");
> script.append("'height=120px, width=400px, help=no,
> status=no, dialog=yes, modal=yes'");
> script.append("); ").append(" else UserListRef.focus();}");
> return script.toString();
> }

> }

> BTW, in order to make a different javascript code I copy-pasted entire
> content of PopupSettings and made a new getPopupSettings function. Is
> there other way around?

> Thank you.

> Regards,
> shumbola


> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user




-
Using Tomcat but nee

[Wicket-user] wicket 1.2.1 and ModalDialog problem

2006-09-07 Thread shumbola
All,

I've got this simple use case:

On compose e-mail page click on some button that shows list of users
in modal window and after user chooses the the user(s), the modal
window closes and compose page updated with the address of choosen
user. Here is the simple html test case:

--compose.html



var UserListRef = null;
function ListUsers()
{
if(window.showModalDialog) //IE
{
window.showModalDialog("listusers.html", document, 
"dialogHeight: 120px; dialogWidth: 400px; help: no; status: no")
return false;
}
else //FF, did not test other browsers due to lack of those
{
if(UserListRef == null || UserListRef.closed)
UserListRef = window.open("listusers.html", document, 
"height=120px, width=400px, help=no, status=no, dialog=yes, modal=yes");
else
UserListRef.focus();
}
}









--listusers.html




function Close()
{
if(window.showModalDialog) //IE
{
n = dialogArguments.getElementById("to_user");
n.value = document.getElementById("user").value;
window.close();
}
else //FF
{
var o = window.opener.document.getElementById(("to_user"));
o.value = document.getElementById("user").value;
window.close();
}
}





user1


user2







Now, with static html files it works as expected, i.e., on "..."
button click we have modal window with list of users.

jsp page with struts action works as expected, too.

I'm having trouble with porting this code into wicket. For the first
time when one clicks the "..." button, modal dialog comes up. For the
following clicks, IE opens up both a new window and the modal dialog
with the same contents.
With FF it works as expected.

I suspect, it has something to do with pagemaps or versioning, but how
could I know, I'm new to wicket world. Please, help me.

Here are relevant wicket code:

--Compose
public class Compose extends MyAuthenticatedPage {
public Compose() {
add(new Label("message", "here we will compose a new message"));
PopupSettings popupSettings = new 
MyPopupSettings(PageMap.forName("popup")).
setHeight(500).setWidth(500);
Link listUsers = new PageLink("listUsers", ListUsers.class);
listUsers.setPopupSettings(popupSettings);
add(listUsers);
}
}
--ListUsers
public class ListUsers extends WebPage {
public ListUsers() {
}
}
--MyPopupSettings
public class MyPopupSettings  extends PopupSettings {
... same as in PopupSettings except the following
public String getPopupJavaScript()
{
String windowTitle = windowName;

if (windowTitle == null)
{
windowTitle = "";
}
else
{
// Fix for IE bug.
windowTitle = windowTitle.replace(':', '_');
}

StringBuffer script =
new StringBuffer("if(window.showModalDialog) { 
window.showModalDialog(");
script.append(target).append(", document, ");

script.append("'dialogHeight:120px; dialogWidth:400px; help:no; 
status:no'); ").append(" return false; }");

script.append(" else { if(UserListRef == null || UserListRef.closed) 
UserListRef = window.open(");
script.append(target).append(", document, ");
script.append("'height=120px, width=400px, help=no, status=no, 
dialog=yes, modal=yes'");
script.append("); ").append(" else UserListRef.focus();}");
return script.toString();
}

}

BTW, in order to make a different javascript code I copy-pasted entire
content of PopupSettings and made a new getPopupSettings function. Is
there other way around?

Thank you.

Regards,
shumbola


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user