You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Pedro Emanuel de Castro Faria Salgado <pe...@junifeup.pt> on 2003/08/20 23:03:12 UTC

Horizon: a view management plugin

Hi,

   I have built a plugin for Struts that creates view beans using
dynabeans that are defined on a xml file and i was wondering if anyone
in the Struts project/mailing list was interested on checking the use
of it?

  It is a very simple plugin (i call it Horizon... because it can have a
lot of views :) )
but it gave me a big help on some projects i am currently working on...
who knows somebody may find it useful :)

  I will be waiting for a response for those who maybe interested
(i will send a war file with a sample application, source code and javadoc
documentation).

Pedro Salgado



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Horizon: a view management plugin

Posted by Pedro Emanuel de Castro Faria Salgado <pe...@junifeup.pt>.
> Pedro Emanuel de Castro Faria Salgado wrote:
>
>>Hi,
>>
>>   I have built a plugin for Struts that creates view beans using
>>dynabeans that are defined on a xml file and i was wondering if anyone
>> in the Struts project/mailing list was interested on checking the use
>> of it?
>>
> When I see dynabean are you saying BeanUtils.DynaBean and what is a
> 'view bean',
> do you mean a Action Form ?

yes

> If so what is the difference between  your
> plugin and  a DynaActionForm ?

i think, actually, there is none... the difference is for what i use
the view beans for: transfering data from actions to
build combobox on form and present data that isn't on a form.

i know i can use the form itself to put a collection to
build a combobox and use another form bean property
to store the user input but it is less
confusing if i define forms with only the properties the
user can enter data and
another bean for transmitting data (dto... in my case i call it view bean).

before the plugin i had to define a new java class
(attributes + getters/setters) for each
new dto i wanted, now, i only need to add some lines
to a xml file...

>
> Given that your plugin is generally useful then there are several
> options :
>
> 1) Since web space can gotten for free now days you could always post it
>  on a site with
>     some documentation on how to use it.

i will see what i can do...

> 2) We are using the http://www.sf.net/projects/struts site as an
> incubator for projects you can post there
>      to see if there is interest.

thank you for the tip...

> 3) Find someone else with a struts web site, that would host it.
>
> Most importantly having an example, that is documented is key.
>

I have already sent the source on another email so
you can take a look (src + javadoc + ant file)
and i am finishing a small web app.


thanks for the tips...

Pedro Salgado
>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Horizon: a view management plugin

Posted by Pedro Emanuel de Castro Faria Salgado <pe...@junifeup.pt>.
> Tell me more about your plugin.
>
> How are the beans defined?

The beans are defined on a xml file.
<views>
   <view name="myView">
      <dyna-property property="attributeName" type="javaClass"/>
   </view>
</views

> Can you specify validation with the beans?

no... what do you mean by validation with the beans?
i use my views like a DTO and i copy the dao/bo values
(never thought of doing validation on this step...)
to it with BeanUtils or PropertyUtils.

>
> How dependent is this project on being loaded within a servlet container
> or more specifically, a Struts plugin?  (e.g. Can I use it in a
> standalone app?)

i use it as a Struts plugin but you can use the factory in anyway you
want...

In attachment goes the source code.
Put in the lib directory:
  commons-beanutils
  commons-collections
  commons-digester
  log4j
  servlet.jar
  struts.jar

later i can email you an web app example... so you can take a peek
at a real cenario.

it doesn't do nothing yet but if you run ant javadoc you could check
the javadoc documentation docs/api...

the license is missing but it will be open (don't know
what open source/free software license to use).

Comments and ideas for improvement are welcome :)

Hope you find it has useful as i did,

Pedro Salgado

>
>
> --
> James Mitchell
> Software Engineer / Struts Evangelist
> http://www.struts-atlanta.org
> 678.910.8017
> AIM:jmitchtx
>
>
>
>
>> -----Original Message-----
>> From: Robert Leland [mailto:rleland@apache.org]
>> Sent: Wednesday, August 20, 2003 10:06 PM
>> To: Struts Users Mailing List
>> Subject: Re: Horizon: a view management plugin
>>
>>
>> Pedro Emanuel de Castro Faria Salgado wrote:
>>
>> >Hi,
>> >
>> >   I have built a plugin for Struts that creates view beans using
>> >dynabeans that are defined on a xml file and i was wondering
>> if anyone
>> >in the Struts project/mailing list was interested on checking the use
>> of it?
>> >
>> When I see dynabean are you saying BeanUtils.DynaBean and what is a
>> 'view bean',
>> do you mean a Action Form ? If so what is the difference
>> between  your
>> plugin and  a DynaActionForm ?
>>
>> Given that your plugin is generally useful then there are
>> several options :
>>
>> 1) Since web space can gotten for free now days you could
>> always post it
>> on a site with
>>     some documentation on how to use it.
>> 2) We are using the http://www.sf.net/projects/struts site as an
>> incubator for projects you can post there
>>      to see if there is interest.
>> 3) Find someone else with a struts web site, that would host it.
>>
>> Most importantly having an example, that is documented is key.
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>
>
> --------------------------------------------------------------------- To
> unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: struts-user-help@jakarta.apache.org



Pedro Salgado
(JuniFEUP)


RE: Horizon: a view management plugin

Posted by James Mitchell <jm...@apache.org>.
Tell me more about your plugin.  

How are the beans defined?
Can you specify validation with the beans?

How dependent is this project on being loaded within a servlet container
or more specifically, a Struts plugin?  (e.g. Can I use it in a
standalone app?)


--
James Mitchell
Software Engineer / Struts Evangelist
http://www.struts-atlanta.org
678.910.8017
AIM:jmitchtx




> -----Original Message-----
> From: Robert Leland [mailto:rleland@apache.org] 
> Sent: Wednesday, August 20, 2003 10:06 PM
> To: Struts Users Mailing List
> Subject: Re: Horizon: a view management plugin
> 
> 
> Pedro Emanuel de Castro Faria Salgado wrote:
> 
> >Hi,
> >
> >   I have built a plugin for Struts that creates view beans using
> >dynabeans that are defined on a xml file and i was wondering 
> if anyone
> >in the Struts project/mailing list was interested on checking the use
> >of it?
> >
> When I see dynabean are you saying BeanUtils.DynaBean and what is a 
> 'view bean',
> do you mean a Action Form ? If so what is the difference 
> between  your 
> plugin and  a DynaActionForm ?
> 
> Given that your plugin is generally useful then there are 
> several options :
> 
> 1) Since web space can gotten for free now days you could 
> always post it 
> on a site with
>     some documentation on how to use it.
> 2) We are using the http://www.sf.net/projects/struts site as an 
> incubator for projects you can post there
>      to see if there is interest.
> 3) Find someone else with a struts web site, that would host it.
> 
> Most importantly having an example, that is documented is key.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Horizon: a view management plugin

Posted by Robert Leland <rl...@apache.org>.
Pedro Emanuel de Castro Faria Salgado wrote:

>Hi,
>
>   I have built a plugin for Struts that creates view beans using
>dynabeans that are defined on a xml file and i was wondering if anyone
>in the Struts project/mailing list was interested on checking the use
>of it?
>
When I see dynabean are you saying BeanUtils.DynaBean and what is a 
'view bean',
do you mean a Action Form ? If so what is the difference between  your 
plugin and  a DynaActionForm ?

Given that your plugin is generally useful then there are several options :

1) Since web space can gotten for free now days you could always post it 
on a site with
    some documentation on how to use it.
2) We are using the http://www.sf.net/projects/struts site as an 
incubator for projects you can post there
     to see if there is interest.
3) Find someone else with a struts web site, that would host it.

Most importantly having an example, that is documented is key.




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Horizon: a view management plugin

Posted by Robert Taylor <rt...@mulework.com>.
Pedro,

I'ld be interested in your implementation as I did the same thing.
I define what I call view configurations in an XML file. On startup
they are cached and I can access them at run time. It sure beats
writing a bunch of throw-away Java beans which are used to present
data.

Accessing a particular view configuration is as simple as:

DynaBean view = ViewFactory.getInstance().getView(viewName);

robert

> -----Original Message-----
> From: Pedro Emanuel de Castro Faria Salgado
> [mailto:pesalgado@junifeup.pt]
> Sent: Wednesday, August 20, 2003 5:03 PM
> To: struts-user@jakarta.apache.org
> Subject: Horizon: a view management plugin
>
>
> Hi,
>
>    I have built a plugin for Struts that creates view beans using
> dynabeans that are defined on a xml file and i was wondering if anyone
> in the Struts project/mailing list was interested on checking the use
> of it?
>
>   It is a very simple plugin (i call it Horizon... because it can have a
> lot of views :) )
> but it gave me a big help on some projects i am currently working on...
> who knows somebody may find it useful :)
>
>   I will be waiting for a response for those who maybe interested
> (i will send a war file with a sample application, source code and javadoc
> documentation).
>
> Pedro Salgado
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org