|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Enum in searchHi there.
We added search by enums in our project. Can that be incorporated in the project? We did it as an extension to trails, but I can send a diff against 1.2-SNAPSHOT this week if you like. We also added the NONE search option in the association search block. And somebody in the team implemented 'cascaded combos': when one combo changes, the other combos are refreshed based on this changing combo. For example: Client -> Project -> Task. Create a new task and select a client. This populates the project combo with the projects of that client. And finally, 2 minor things: an unbalanced <li> and a clarification in the message for an exception. I can send diffs for these. regards --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: Enum in search
Alejandro is the uthority on what goes ito the project.
It makes sense to show the diffs... Are you doing this in tapestry script? Or under the hood tapestry component+handlers... ? Will it jive with j2ee enums model? Are you parsing int's or strings or both? Wondering how complicated it is. Anyway, if you shoot up some code I believe Alejandro will advise. The dynamic select's seem a bit on the custom side for me (not valid to place in the project). Nice to hear from users out there... So how do you like 1.2-SNAPSHOT ? - cheers Best regards Ken in nashua > Date: Mon, 7 Jul 2008 11:13:48 -0300 > From: pablo.grana@... > To: users@... > Subject: [trails-users] Enum in search > > Hi there. > > We added search by enums in our project. Can that be incorporated in the > project? We did it as an extension to trails, but I can send a diff against > 1.2-SNAPSHOT this week if you like. > > We also added the NONE search option in the association search block. > > And somebody in the team implemented 'cascaded combos': when one combo changes, > the other combos are refreshed based on this changing combo. For example: > > Client -> Project -> Task. Create a new task and select a client. This populates > the project combo with the projects of that client. > > And finally, 2 minor things: an unbalanced <li> and a clarification in the > message for an exception. > > I can send diffs for these. > > regards > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > Making the world a better place one message at a time. Check out the i'm Talkathon. Best regards
Ken in nashua |
|
|
Re: Enum in searchThe modifications for enums where really simple:
1- Create a new component EnumSearchField. It is a copy of AssociationSearchField, but using an EnumSelect component instead of HibernateAssociationSelect. We also bound: <binding name="allowNone" value="true"/> <binding name="noneLabel" value="literal:"/> 2- Created a CustomSearchBlocks page with: <!-- A block used to input the search condition on an enum. It is a combo box with an option to ignore this field in the search. --> <div jwcid="enumSearch@Block"> <li> <label class="desc"> <span jwcid="@Insert" value="ognl:descriptor.displayName"/> </label> <span jwcid="@EnumSearchField" propertyDescriptor="ognl:descriptor" class="select large"/> </li> </div> 3- Added this enumSearch block to the list of search block of the searchBlockFinder service: <!-- A custom search field for an enum. --> <entry> <key> <value> supportsExtension('org.trails.descriptor.EnumReferenceDescriptor') </value> </key> <bean class="org.apache.tapestry.util.ComponentAddress"> <constructor-arg index="0"> <value>CustomSearchBlocks</value> </constructor-arg> <constructor-arg index="1"> <value>enumSearch</value> </constructor-arg> </bean> </entry> I did the same for the AssociationSearchField component to bind the allowNone and noneLabel properties. regards Ken in nashua wrote: > Alejandro is the uthority on what goes ito the project. > > It makes sense to show the diffs... > > Are you doing this in tapestry script? Or under the hood tapestry > component+handlers... ? > > Will it jive with j2ee enums model? Are you parsing int's or strings or > both? > > Wondering how complicated it is. > > Anyway, if you shoot up some code I believe Alejandro will advise. > > The dynamic select's seem a bit on the custom side for me (not valid to > place in the project). > > Nice to hear from users out there... > > So how do you like 1.2-SNAPSHOT ? > > - cheers > > Best regards > Ken in nashua > > > > > Date: Mon, 7 Jul 2008 11:13:48 -0300 > > From: pablo.grana@... > > To: users@... > > Subject: [trails-users] Enum in search > > > > Hi there. > > > > We added search by enums in our project. Can that be incorporated in the > > project? We did it as an extension to trails, but I can send a diff > against > > 1.2-SNAPSHOT this week if you like. > > > > We also added the NONE search option in the association search block. > > > > And somebody in the team implemented 'cascaded combos': when one > combo changes, > > the other combos are refreshed based on this changing combo. For example: > > > > Client -> Project -> Task. Create a new task and select a client. > This populates > > the project combo with the projects of that client. > > > > And finally, 2 minor things: an unbalanced <li> and a clarification > in the > > message for an exception. > > > > I can send diffs for these. > > > > regards > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > ------------------------------------------------------------------------ > Making the world a better place one message at a time. Check out the i'm > Talkathon. > <http://www.imtalkathon.com/?source=EML_WLH_Talkathon_BetterPlace> --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Enum in searchAbout the dynamic selects, the implementation is generic enough, I guess:
We added two annotations: @InitialValue @PossibleValues As an example, imagine you have client -> project -> task. task is not directly mapped to client, only through the corresponding project. So InitialValue annotates a transient attribute named client: @Transient @InitialValue("project.client") private Client client; so to populate the client property, it evaluates the propect.client expression. (project can be null, in which case no client is pre-selected). And the client drop down is obtained evaluating another expression: @PossibleValues("client.projects") @ManyToOne private Project project; client.projects gives the list of projects for a client. If client is null (not yet selected), the project drop down is empty. This cascading can be chained to any limit (well, we tested it with three chained combos). This forces to declare both sides of a many-to-one relation. Hope it is clear enough. Alejandro, what do you think? regards. Ken in nashua wrote: > Alejandro is the uthority on what goes ito the project. > > It makes sense to show the diffs... > > Are you doing this in tapestry script? Or under the hood tapestry > component+handlers... ? > > Will it jive with j2ee enums model? Are you parsing int's or strings or > both? > > Wondering how complicated it is. > > Anyway, if you shoot up some code I believe Alejandro will advise. > > The dynamic select's seem a bit on the custom side for me (not valid to > place in the project). > > Nice to hear from users out there... > > So how do you like 1.2-SNAPSHOT ? > > - cheers > > Best regards > Ken in nashua > > > > > Date: Mon, 7 Jul 2008 11:13:48 -0300 > > From: pablo.grana@... > > To: users@... > > Subject: [trails-users] Enum in search > > > > Hi there. > > > > We added search by enums in our project. Can that be incorporated in the > > project? We did it as an extension to trails, but I can send a diff > against > > 1.2-SNAPSHOT this week if you like. > > > > We also added the NONE search option in the association search block. > > > > And somebody in the team implemented 'cascaded combos': when one > combo changes, > > the other combos are refreshed based on this changing combo. For example: > > > > Client -> Project -> Task. Create a new task and select a client. > This populates > > the project combo with the projects of that client. > > > > And finally, 2 minor things: an unbalanced <li> and a clarification > in the > > message for an exception. > > > > I can send diffs for these. > > > > regards > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > ------------------------------------------------------------------------ > Making the world a better place one message at a time. Check out the i'm > Talkathon. > <http://www.imtalkathon.com/?source=EML_WLH_Talkathon_BetterPlace> --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Enum in searchWe are using trails as a module in our projects, to implement certain parts of
the application. We used it in at least 6 projects, three ongoing and three currently in production. Two of the ongoing ones are using 1.2-SNAPSHOT, and the people using it noticed a significant improvement over 1.1.1. It really sped up the development. The only current problem is to know where trails can take us without using tapestry. But with a small amount of tapestry expertise (maybe one person for all projects), it is really a nice option. So, we will be using more of it in the next projects. regards Ken in nashua wrote: > Alejandro is the uthority on what goes ito the project. > > It makes sense to show the diffs... > > Are you doing this in tapestry script? Or under the hood tapestry > component+handlers... ? > > Will it jive with j2ee enums model? Are you parsing int's or strings or > both? > > Wondering how complicated it is. > > Anyway, if you shoot up some code I believe Alejandro will advise. > > The dynamic select's seem a bit on the custom side for me (not valid to > place in the project). > > Nice to hear from users out there... > > So how do you like 1.2-SNAPSHOT ? > > - cheers > > Best regards > Ken in nashua > > > > > Date: Mon, 7 Jul 2008 11:13:48 -0300 > > From: pablo.grana@... > > To: users@... > > Subject: [trails-users] Enum in search > > > > Hi there. > > > > We added search by enums in our project. Can that be incorporated in the > > project? We did it as an extension to trails, but I can send a diff > against > > 1.2-SNAPSHOT this week if you like. > > > > We also added the NONE search option in the association search block. > > > > And somebody in the team implemented 'cascaded combos': when one > combo changes, > > the other combos are refreshed based on this changing combo. For example: > > > > Client -> Project -> Task. Create a new task and select a client. > This populates > > the project combo with the projects of that client. > > > > And finally, 2 minor things: an unbalanced <li> and a clarification > in the > > message for an exception. > > > > I can send diffs for these. > > > > regards > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > ------------------------------------------------------------------------ > Making the world a better place one message at a time. Check out the i'm > Talkathon. > <http://www.imtalkathon.com/?source=EML_WLH_Talkathon_BetterPlace> --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
RE: Enum in search
Well I vote for enums in search. Nice addition.
If you can automate dependencies from one select to another, then that would be even better... dynamic dependencies could clutter it up but if it is simple then thats fine. How about optional checkboxes in addition to select... then we can search any/all. This might present a new UI on certain condition. If you have any need for @OneToOne semantics let me know. I am sure you might. I chiseled this area out last year. Got some good constructs if your interested, but they impact trails-core a bit. They never made it into the project. Best regards Ken in nashua > Date: Mon, 7 Jul 2008 11:13:48 -0300 > From: pablo.grana@... > To: users@... > Subject: [trails-users] Enum in search > > Hi there. > > We added search by enums in our project. Can that be incorporated in the > project? We did it as an extension to trails, but I can send a diff against > 1.2-SNAPSHOT this week if you like. > > We also added the NONE search option in the association search block. > > And somebody in the team implemented 'cascaded combos': when one combo changes, > the other combos are refreshed based on this changing combo. For example: > > Client -> Project -> Task. Create a new task and select a client. This populates > the project combo with the projects of that client. > > And finally, 2 minor things: an unbalanced <li> and a clarification in the > message for an exception. > > I can send diffs for these. > > regards > > > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > Need to know now? Get instant answers with Windows Live Messenger. IM on your terms. Best regards
Ken in nashua |
|
|
Re: Enum in searchLooks good to me. There's already a Tapestry @InitialValue annotation (for pages & components) so I wonder if it'd be better to use a different name, or just use the Tapestry annotation and process it differently for entities. @PossibleValues looks interesting - I've typically achieved somewhat similar effect with security annotation @ViewRequiresAssociation, but this is more useful when you arbitrarily want to limit the value pool. Can you open separate issues for each of these: @InitialValue, @PossibleValues and enum search and attach diffs (with relative paths) to them? If they are prepared against the trunk, they'd be pretty easy to add on.
Kalle On Mon, Jul 7, 2008 at 8:35 AM, Pablo Gra~na <pablo.grana@...> wrote: About the dynamic selects, the implementation is generic enough, I guess: |
|
|
Re: Enum in searchGood, give me this week and I'll send the patches. Didn't know about tapestry
InitialValue :(. thanks a lot Kalle Korhonen wrote: > Looks good to me. There's already a Tapestry @InitialValue annotation > (for pages & components) so I wonder if it'd be better to use a > different name, or just use the Tapestry annotation and process it > differently for entities. @PossibleValues looks interesting - I've > typically achieved somewhat similar effect with security annotation > @ViewRequiresAssociation, but this is more useful when you arbitrarily > want to limit the value pool. Can you open separate issues for each of > these: @InitialValue, @PossibleValues and enum search and attach diffs > (with relative paths) to them? If they are prepared against the trunk, > they'd be pretty easy to add on. > > Kalle > > On Mon, Jul 7, 2008 at 8:35 AM, Pablo Gra~na <pablo.grana@... > <mailto:pablo.grana@...>> wrote: > > About the dynamic selects, the implementation is generic enough, I > guess: > > We added two annotations: > > @InitialValue > @PossibleValues > > As an example, imagine you have client -> project -> task. task is > not directly mapped to client, only through the corresponding > project. So InitialValue annotates a transient attribute named client: > > @Transient > @InitialValue("project.client") > private Client client; > > so to populate the client property, it evaluates the propect.client > expression. (project can be null, in which case no client is > pre-selected). > > And the client drop down is obtained evaluating another expression: > > @PossibleValues("client.projects") > @ManyToOne > private Project project; > > client.projects gives the list of projects for a client. If client > is null (not yet selected), the project drop down is empty. > > This cascading can be chained to any limit (well, we tested it with > three chained combos). > > This forces to declare both sides of a many-to-one relation. > > Hope it is clear enough. > > Alejandro, what do you think? > > > regards. > > Ken in nashua wrote: > > Alejandro is the uthority on what goes ito the project. > It makes sense to show the diffs... > Are you doing this in tapestry script? Or under the hood > tapestry component+handlers... ? > > Will it jive with j2ee enums model? Are you parsing int's or > strings or both? > Wondering how complicated it is. > Anyway, if you shoot up some code I believe Alejandro will advise. > The dynamic select's seem a bit on the custom side for me (not > valid to place in the project). > Nice to hear from users out there... > So how do you like 1.2-SNAPSHOT ? > - cheers > > Best regards > Ken in nashua > > > > > Date: Mon, 7 Jul 2008 11:13:48 -0300 > > From: pablo.grana@... <mailto:pablo.grana@...> > > To: users@... <mailto:users@...> > > Subject: [trails-users] Enum in search > > > > Hi there. > > > > We added search by enums in our project. Can that be > incorporated in the > > project? We did it as an extension to trails, but I can send > a diff against > > 1.2-SNAPSHOT this week if you like. > > > > We also added the NONE search option in the association > search block. > > > > And somebody in the team implemented 'cascaded combos': when > one combo changes, > > the other combos are refreshed based on this changing combo. > For example: > > > > Client -> Project -> Task. Create a new task and select a > client. This populates > > the project combo with the projects of that client. > > > > And finally, 2 minor things: an unbalanced <li> and a > clarification in the > > message for an exception. > > > > I can send diffs for these. > > > > regards > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > ------------------------------------------------------------------------ > Making the world a better place one message at a time. Check out > the i'm Talkathon. > <http://www.imtalkathon.com/?source=EML_WLH_Talkathon_BetterPlace> > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |