Re: List selection manager 'widget'

2005-08-23 Thread Daniel Schaller
Sorry, forgot the Javascript file.




On 23/8/05 20:59, "Daniel Schaller" <[EMAIL PROTECTED]>
wrote (with possible deletions):

> Hi,
> 
> Try the javascript in the attached file. Works brilliant for me:
> 
> The function you need to use is moveOptions(srcID, targetID) where srcID and
> targetID are the IDs of your both select boxes.
> 
> I hope that helps.
> 
> Cheers,
> Daniel
> 
> On 23/8/05 20:22, "Laurie Harper" <[EMAIL PROTECTED]> wrote (with possible
> deletions):
> 
>> Unless I'm missing something, that is for populating combo boxes based on
>> selections in other combo boxes, e.g. for populating the State/Province
>> combo box based on Country selection, etc. That's not quite the same.
>> 
>> L.
>> 
>> 
>> C.F. Scheidecker Antunes wrote:
>> 
>>> Hi Laurie,
>>> 
>>> I am trying to do the same and I've done some research. One of the
>>> things I've found is the one bellow.
>>> 
>>> I would appreciate, if you find something diferent, to email it back to
>>> the list as well so that it would same time for me
>>> and other developers as well.
>>> 
>>> Thanks,
>>> 
>>> C.F.
>>> 
>>> Maybe something like this would work for you:
>>> 
>>> 
http://javascript.js-x.com/examples/example.php?title=Multiple%20dynamic%20c>>>
o
>>> mbo%20boxes%20Builder
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> /*
>>> *** Multiple dynamic combo boxes
>>> *** by Mirko Elviro, 9 Mar 2005
>>> ***
>>> ***Please do not remove this comment
>>> */
>>> 
>>> // This script supports an unlimited number of linked combo boxed
>>> // Their id must be "combo_0", "combo_1", "combo_2" etc.
>>> // Here you have to put the data that will fill the combo boxes
>>> // ie. data_2_1 will be the first option in the second combo box
>>> // when the first combo box has the second option selected
>>> 
>>> 
>>> // first combo box
>>> data_1 = new Option("1", "$");
>>> data_2 = new Option("2", "$$");
>>> 
>>> // second combo box
>>> data_1_1 = new Option("11", "-");
>>> data_1_2 = new Option("12", "-");
>>> data_2_1 = new Option("21", "--");
>>> data_2_2 = new Option("22", "--");
>>> data_2_3 = new Option("23", "--");
>>> data_2_4 = new Option("24", "--");
>>> data_2_5 = new Option("25", "--");
>>> 
>>> // third combo box
>>> data_1_1_1 = new Option("111", "*");
>>> data_1_1_2 = new Option("112", "*");
>>> data_1_1_3 = new Option("113", "*");
>>> data_1_2_1 = new Option("121", "*");
>>> data_1_2_2 = new Option("122", "*");
>>> data_1_2_3 = new Option("123", "*");
>>> data_1_2_4 = new Option("124", "*");
>>> data_2_1_1 = new Option("211", "**");
>>> data_2_1_2 = new Option("212", "**");
>>> data_2_2_1 = new Option("221", "**");
>>> data_2_2_2 = new Option("222", "**");
>>> data_2_3_1 = new Option("231", "***");
>>> data_2_3_2 = new Option("232", "***");
>>> 
>>> // fourth combo box
>>> data_2_2_1_1 = new Option("2211","%")
>>> data_2_2_1_2 = new Option("2212","%%")
>>> 
>>> // other parameters
>>> displaywhenempty="-empty-"
>>> valuewhenempty=-1
>>> 
>>> displaywhennotempty="-select-"
>>> valuewhennotempty=0
>>> 
>>> 
>>> function change(currentbox)
>>> {
>>> var numb = currentbox.id.split("_");
>>> var currentbox = numb[1];
>>> var i=parseInt(currentbox)+1;
>>> // I empty all combo boxes following the current one
>>> var _t=eval("typeof(document.getElementById('combo_"+i+"'))!='undefined'");
>>> while (_t && document.getElementById("combo_"+i)!=null)
>>> {
>>> var son = document.getElementById("combo_"+i);
>>> // I empty all options e

Re: List selection manager 'widget'

2005-08-23 Thread Daniel Schaller
Hi,

Try the javascript in the attached file. Works brilliant for me:

The function you need to use is moveOptions(srcID, targetID) where srcID and
targetID are the IDs of your both select boxes.

I hope that helps.

Cheers,
Daniel

On 23/8/05 20:22, "Laurie Harper" <[EMAIL PROTECTED]> wrote (with possible
deletions):

> Unless I'm missing something, that is for populating combo boxes based on
> selections in other combo boxes, e.g. for populating the State/Province
> combo box based on Country selection, etc. That's not quite the same.
> 
> L.
> 
> 
> C.F. Scheidecker Antunes wrote:
> 
>> Hi Laurie,
>> 
>> I am trying to do the same and I've done some research. One of the
>> things I've found is the one bellow.
>> 
>> I would appreciate, if you find something diferent, to email it back to
>> the list as well so that it would same time for me
>> and other developers as well.
>> 
>> Thanks,
>> 
>> C.F.
>> 
>> Maybe something like this would work for you:
>> 
>> http://javascript.js-x.com/examples/example.php?title=Multiple%20dynamic%20co
>> mbo%20boxes%20Builder
>> 
>> 
>> 
>> 
>> 
>> 
>> /*
>> *** Multiple dynamic combo boxes
>> *** by Mirko Elviro, 9 Mar 2005
>> ***
>> ***Please do not remove this comment
>> */
>> 
>> // This script supports an unlimited number of linked combo boxed
>> // Their id must be "combo_0", "combo_1", "combo_2" etc.
>> // Here you have to put the data that will fill the combo boxes
>> // ie. data_2_1 will be the first option in the second combo box
>> // when the first combo box has the second option selected
>> 
>> 
>> // first combo box
>> data_1 = new Option("1", "$");
>> data_2 = new Option("2", "$$");
>> 
>> // second combo box
>> data_1_1 = new Option("11", "-");
>> data_1_2 = new Option("12", "-");
>> data_2_1 = new Option("21", "--");
>> data_2_2 = new Option("22", "--");
>> data_2_3 = new Option("23", "--");
>> data_2_4 = new Option("24", "--");
>> data_2_5 = new Option("25", "--");
>> 
>> // third combo box
>> data_1_1_1 = new Option("111", "*");
>> data_1_1_2 = new Option("112", "*");
>> data_1_1_3 = new Option("113", "*");
>> data_1_2_1 = new Option("121", "*");
>> data_1_2_2 = new Option("122", "*");
>> data_1_2_3 = new Option("123", "*");
>> data_1_2_4 = new Option("124", "*");
>> data_2_1_1 = new Option("211", "**");
>> data_2_1_2 = new Option("212", "**");
>> data_2_2_1 = new Option("221", "**");
>> data_2_2_2 = new Option("222", "**");
>> data_2_3_1 = new Option("231", "***");
>> data_2_3_2 = new Option("232", "***");
>> 
>> // fourth combo box
>> data_2_2_1_1 = new Option("2211","%")
>> data_2_2_1_2 = new Option("2212","%%")
>> 
>> // other parameters
>> displaywhenempty="-empty-"
>> valuewhenempty=-1
>> 
>> displaywhennotempty="-select-"
>> valuewhennotempty=0
>> 
>> 
>> function change(currentbox)
>> {
>> var numb = currentbox.id.split("_");
>> var currentbox = numb[1];
>> var i=parseInt(currentbox)+1;
>> // I empty all combo boxes following the current one
>> var _t=eval("typeof(document.getElementById('combo_"+i+"'))!='undefined'");
>> while (_t && document.getElementById("combo_"+i)!=null)
>> {
>> var son = document.getElementById("combo_"+i);
>> // I empty all options except the first (it isn't allowed)
>> for (m=son.options.length-1;m>0;m--)
>> son.options[m]=null;
>> // I reset the first option
>> son.options[0]=new Option(displaywhenempty,valuewhenempty);
>> i=i+1;
>> }
>> 
>> // now I create the string with the "base" name ("stringa"), ie. "data_1_0"
>> // to which I'll add _0,_1,_2,_3 etc to obtain the name of the combo box
>> to fill
>> var stringa='data';
>> i=0;
>> _t=eval("typeof(document.getElementById('combo_"+i+"'))!='undefined'");
>> while (_t && document.getElementById("combo_"+i)!=null)
>> {
>> eval("stringa=stringa+'_'+document.getElementById(\"combo_"+i+"\").selectedIn
>> dex"); 
>> 
>> if (i==currentbox)
>> break;
>> i=i+1;
>> }
>> 
>> // filling the "son" combo (if exists)
>> var following=parseInt(currentbox)+1;
>> _t=eval("typeof(document.getElementById('combo_"+following+"'))!='undefined'"
>> ); 
>> 
>> if (_t && document.getElementById("combo_"+following)!=null)
>> {
>> son=document.getElementById("combo_"+following);
>> stringa=stringa+"_";
>> i=0;
>> while ((eval("typeof("+stringa+i+")!='undefined'")) || (i==0))
>> {
>> // if there are no options, I empty the first option of the "son" combo
>> // otherwise I put "-select-" in it
>> if ((i==0) && eval("typeof("+stringa+"0)=='undefined'"))
>> if (eval("typeof("+stringa+"1)=='undefined'"))
>> eval("son.options[0]=new Option(displaywhenempty,valuewhenempty)");
>> else
>> eval("son.options[0]=new Option(displaywhennotempty,valuewhennotempty)");
>> else
>> eval("son.options["+i+"]=new
>> Option("+stringa+i+".text,"+stringa+i+".value)")
>> i++;
>> }
>> //son.focus();
>> i=1;
>> combostatus='';
>> cstatus=stringa.split("_");
>> while (cstatus[i]!=null)
>> {
>> combostatus=combostatus+cstatus[i];
>> i=i+1;
>> }
>> return combostatus;
>> }
>> }
>> 
>> 
>> 
>> 
>> > style="width:200px;">
>> -

Application wide message resources

2005-08-10 Thread Daniel Schaller

Hi,

I have an application that has a default module and several sub modules.

Is it possible to define application wide message resources in the  
default module that can also be access from the sub modules?


Thanks,

Daniel



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



Re: Problems configuring Tiles

2005-08-08 Thread Daniel Schaller



On 8 Aug 2005, at 12:24, [EMAIL PROTECTED] wrote:


In my WEB-INF folder there is the following tiles-defs.xml:


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


Then you should change the URI to your local tiles config dtd, or  
switch validation off.


Cheers,

Daniel

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



Re: Login with authentication from database

2005-08-07 Thread Daniel Schaller

Hi,

look in the documention of your Web Container how to configure JAAS.  
Most of the container, such as Jetty, come with a JDBC JAAS Login  
module ready to use.


Cheers,
Daniel

On 7 Aug 2005, at 22:53, C.F. Scheidecker Antunes wrote:


Hello all,

I am learning my ways through Struts having done Servlets and JSPs  
before. In order to have authentication functionalities with my  
Servlets I used to have a user table and a roles table. Once the  
user logs in he/she would be authenticated with the user name,  
password through Tomcat as it was configured with the database  
information, table name, etc.


I would like to do pretty much the same with Struts. I have checked  
the O'Reilly Struts Cookbook but, although it has great  
authentication tips, it does not include a recipe to have  
authentication with a database. Is there any article on how to  
perform it with Struts? Any books that you would suggest?


So what I think is that I should have a model class to do this kind  
of authentication rather than using the XML config files. However  
how would I include all the roles in that class? Have a data  
structure like a list maybe? That way I could always check for a  
specific role for every JSP or action whether the user would be  
allowed or not. Any thoughts?


Thanks in advance,

C.F.

-
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: Forwarding to a global Forward

2005-08-07 Thread Daniel Schaller

Hello Geeta and Frank,

Thanks for you quick responses.

@Frank: The space of the ? was just a type when I was writing the mail.

@Geeta: You're right, I could forward directly from within my Action  
class. However, if I am doing so, then I have to hard code the  
Forward's name. Of course, I could define constants, however those  
would be specific and not according to the common methodology like  
using "success", "error" etc. for local forward names. I want to be  
flexible and keep the Actions classes as close as possible to the  
standard rules. And in case of a need to change the local forwards, I  
don't wanna go to the source code and change it there.


So if there would be a way to have this indirection, that would be  
great.


Thanks.

Cheers,
Daniel

On 7 Aug 2005, at 20:31, [EMAIL PROTECTED] wrote:




Hi Daniel:

Why do you even bother defining the "default" forward for your  
action? Why

not simply (in your Action class) forward to "AddUser" - the global
forward that you have defined already?.Is there something else  
you are

trying to achieve?

Regards,
Geeta




Daniel Schaller <[EMAIL PROTECTED]>
08/07/2005 03:02 PM
Please respond to
"Struts Users Mailing List" 


To
user@struts.apache.org
cc

Subject
{Spam?} Forwarding to a global Forward







Hi,

I have a global forward



In one of my actions, I would like to forward to "AddUser" like:


 


rather than using the entire path defintion "/ManageUsersEdit.do?
operation=add".

However, if I do so, I get a 404 error, page or path not found.


Any ideas? Or is it simple not possible to forward to another
(global) forward?

Thanks,

Daniel


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


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



CONFIDENTIALITY NOTICE:This email is intended solely for the person or
entity to which it is addressed and may contain confidential and/or
protected health information.  Any duplication, dissemination, action
taken in reliance upon, or other use of this information by persons or
entities other than the intended recipient is prohibited and may  
violate
applicable laws.  If this email has been received in error, please  
notify

the sender and delete the information from your system.  The views
expressed in this email are those of the sender and may not  
necessarily

represent the views of IntelliCare.








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



Forwarding to a global Forward

2005-08-07 Thread Daniel Schaller


Hi,

I have a global forward




In one of my actions, I would like to forward to "AddUser" like:





rather than using the entire path defintion "/ManageUsersEdit.do? 
operation=add".


However, if I do so, I get a 404 error, page or path not found.


Any ideas? Or is it simple not possible to forward to another  
(global) forward?


Thanks,

Daniel


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