You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Marcus Crafter <cr...@fztig938.bank.dresdner.net> on 2002/04/17 16:32:06 UTC

ComponentSelectors, finding out available selectables ?

Hi All,

	Hope all is well.
	
	Quick question, I'm wondering if there is any way to be able to
	dynamically find out all the possible selectables within a component
	selector?

	From the API this doesn't look like it's possible - if so, was there
	a reason not to	provide this functionality, or hasn't it brought
	up till now ?

	Cheers,
	
	Marcus
	
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ComponentSelectors, finding out available selectables ?

Posted by Peter Donald <pe...@apache.org>.
On Thu, 18 Apr 2002 01:15, Marcus Crafter wrote:
> 	I was hoping there might have been a way to get a list of configured
> 	datasources from the DataSourceSelector, which I could iterate
> 	over when creating the login page.
>
> 	There are a few other cases, but the idea is the same - find out
> 	what's been configured so the user can choose.

I would recomend you create a DataSourcesManager service or similar to do 
this. But then again I don't really like *Selector anyway :)

-- 
Cheers,

Peter Donald


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ComponentSelectors, finding out available selectables ?

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
Hi Berin,

	Attached is an example of the kind of thing I'm looking for, either
	as a separate class or part of the existing infrastructure. Thoughts ?
	
	Cheers,
	
	Marcus
	
On Wed, Apr 17, 2002 at 05:15:12PM +0200, Marcus Crafter wrote:
> On Wed, Apr 17, 2002 at 10:37:47AM -0400, Berin Loritsch wrote:
> > Marcus Crafter wrote:
> > >
> > >	Quick question, I'm wondering if there is any way to be able to
> > >	dynamically find out all the possible selectables within a component
> > >	selector?
> > 
> > No there isn't
> 
> 	ok.
> 
> > >	From the API this doesn't look like it's possible - if so, was there
> > >	a reason not to	provide this functionality, or hasn't it brought
> > >	up till now ?
> > 
> > It hasn't been brought up till now.  Generally, the logic for which
> > component to return should be in the Container, not the client.  As a
> > result, you either work with a known system (ala Cocoon), or you have
> > a really smart container (ala Phoenix).
> > 
> > What is the problem you want to solve with this apprach?
> 
> 	I'd like to be able to offer the user a choice of options in some
> 	situations.
> 	
> 	For example, in our application, the user can select which database
> 	they can log into. Previously on our login page we had a list of
> 	databases that they could choose from.
> 	
> 	I've since integrated the Avalon excalibur data sources into our
> 	application and would like to do the same, ie. supply the user with a
> 	list of configured databases at login time based on what's been
> 	specified between the <datasources>...</datasources> section
> 	of our config file.
> 	
> 	I was hoping there might have been a way to get a list of configured
> 	datasources from the DataSourceSelector, which I could iterate
> 	over when creating the login page.
> 	
> 	There are a few other cases, but the idea is the same - find out
> 	what's been configured so the user can choose.
> 	
> 	Cheers,
> 	
> 	Marcus
> 
> -- 
>         .....
>      ,,$$$$$$$$$,      Marcus Crafter
>     ;$'      '$$$$:    Computer Systems Engineer
>     $:         $$$$:   ManageSoft GmbH
>      $       o_)$$$:   82-84 Mainzer Landstrasse
>      ;$,    _/\ &&:'   60327 Frankfurt Germany
>        '     /( &&&
>            \_&&&&'
>           &&&&.
>     &&&&&&&:
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

Re: ComponentSelectors, finding out available selectables ?

Posted by Marcus Crafter <cr...@fztig938.bank.dresdner.net>.
On Wed, Apr 17, 2002 at 10:37:47AM -0400, Berin Loritsch wrote:
> Marcus Crafter wrote:
> >
> >	Quick question, I'm wondering if there is any way to be able to
> >	dynamically find out all the possible selectables within a component
> >	selector?
> 
> No there isn't

	ok.

> >	From the API this doesn't look like it's possible - if so, was there
> >	a reason not to	provide this functionality, or hasn't it brought
> >	up till now ?
> 
> It hasn't been brought up till now.  Generally, the logic for which
> component to return should be in the Container, not the client.  As a
> result, you either work with a known system (ala Cocoon), or you have
> a really smart container (ala Phoenix).
> 
> What is the problem you want to solve with this apprach?

	I'd like to be able to offer the user a choice of options in some
	situations.
	
	For example, in our application, the user can select which database
	they can log into. Previously on our login page we had a list of
	databases that they could choose from.
	
	I've since integrated the Avalon excalibur data sources into our
	application and would like to do the same, ie. supply the user with a
	list of configured databases at login time based on what's been
	specified between the <datasources>...</datasources> section
	of our config file.
	
	I was hoping there might have been a way to get a list of configured
	datasources from the DataSourceSelector, which I could iterate
	over when creating the login page.
	
	There are a few other cases, but the idea is the same - find out
	what's been configured so the user can choose.
	
	Cheers,
	
	Marcus

-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ComponentSelectors, finding out available selectables ?

Posted by Berin Loritsch <bl...@apache.org>.
Marcus Crafter wrote:
> Hi All,
> 
> 	Hope all is well.
> 	
> 	Quick question, I'm wondering if there is any way to be able to
> 	dynamically find out all the possible selectables within a component
> 	selector?

No there isn't

> 
> 	From the API this doesn't look like it's possible - if so, was there
> 	a reason not to	provide this functionality, or hasn't it brought
> 	up till now ?

It hasn't been brought up till now.  Generally, the logic for which
component to return should be in the Container, not the client.  As a
result, you either work with a known system (ala Cocoon), or you have
a really smart container (ala Phoenix).

What is the problem you want to solve with this apprach?


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>