You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Joakim Olsson <jo...@unbound.se> on 2011/07/27 18:17:08 UTC

ANN: Tapestry-tagselect version 1.0 released

Hi,

I just released tapestry-tagselect which is a select component similar
to the version select in recent JIRA-versions.

See https://github.com/argoyle/tapestry-tagselect for more information.

The artifacts should be available in Maven central within an hour or so.

Regards,
Joakim

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
I'll take a look at it once we get the core issues resolved. I'm sure I could
handle getting that working pretty easily. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4691043.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
Great, I just started looking into repairing the bug... you beat me to it :)

Yep I was thinking the samething with github. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690665.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
posted bugs with github

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4691018.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
Good catch on the first point. It's fixed now and pushed to GitHub.

Can you describe the problem in point 3 a bit? And if you could create
issues at GitHub for the enhancements would be great.

Regards,
Joakim


On Thu, Aug 11, 2011 at 5:58 PM, George Christman
<gc...@cardaddy.com> wrote:
> Excellent, thanks for incorporating that feature. I have encountered a few
> bugs though.
>
> 1. When using a value encoder, the component seams to be adding the label
> string value to the hidden field rather than the string id provided by the
> value encoder.
>
> &lt;input id=&quot;commentators-values&quot; type=&quot;hidden&quot;
> name=&quot;commentators-values&quot; value=&quot;George
> &lt;gmc07@myemail.org&gt; ;Charlie &lt;charlie@myemail.org&gt; ">
>
> This results in the following error
> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
> find a coercion from type java.lang.String to type
> org.company.eprs.entities.ApplicationUser.
>
> 2. The duplicated textarea's seemed to be a result of my auto resizing
> textarea script. Resolved
>
> 3. A new issue has been created with greater than less than now.
>
>       George Christman &lt;gmc@myemail.org&gt; &lt;/gmc@myemail.org&gt;
>
>
> Couple enhancements I feel could add more value and flexibility to the
> component.
>
> 1. I think adding a vertical parameter that takes a boolean would be a nice
> addition. This would allow the component to either display the box's
> horizontally as is, or if vertical == true, display the input fields with
> the box's vertically,  "Similar to the Facebook language selection under
> edit profile".
>
> 2. Giving the component the ability to use a comma to add new items that may
> not be contained within the autocomplete selection would be a great
> addition. This would be useful when using the component with email.
>
> Thanks Joakim, excellent job.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690017.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
Just thought a little on enhancement number one. One possible way to
solve this (not exactly like facebook though) is to add the following
CSS;
.u-tagselect .u-tag-container .u-tags .u-tag {
  clear: both;
}

Maybe with some CSS id-specifier if you don't want all tagselects to
behave the same way.

Regards,
Joakim


On Thu, Aug 11, 2011 at 5:58 PM, George Christman
<gc...@cardaddy.com> wrote:
> Excellent, thanks for incorporating that feature. I have encountered a few
> bugs though.
>
> 1. When using a value encoder, the component seams to be adding the label
> string value to the hidden field rather than the string id provided by the
> value encoder.
>
> &lt;input id=&quot;commentators-values&quot; type=&quot;hidden&quot;
> name=&quot;commentators-values&quot; value=&quot;George
> &lt;gmc07@myemail.org&gt; ;Charlie &lt;charlie@myemail.org&gt; ">
>
> This results in the following error
> Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
> find a coercion from type java.lang.String to type
> org.company.eprs.entities.ApplicationUser.
>
> 2. The duplicated textarea's seemed to be a result of my auto resizing
> textarea script. Resolved
>
> 3. A new issue has been created with greater than less than now.
>
>       George Christman &lt;gmc@myemail.org&gt; &lt;/gmc@myemail.org&gt;
>
>
> Couple enhancements I feel could add more value and flexibility to the
> component.
>
> 1. I think adding a vertical parameter that takes a boolean would be a nice
> addition. This would allow the component to either display the box's
> horizontally as is, or if vertical == true, display the input fields with
> the box's vertically,  "Similar to the Facebook language selection under
> edit profile".
>
> 2. Giving the component the ability to use a comma to add new items that may
> not be contained within the autocomplete selection would be a great
> addition. This would be useful when using the component with email.
>
> Thanks Joakim, excellent job.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690017.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
Excellent, thanks for incorporating that feature. I have encountered a few
bugs though.

1. When using a value encoder, the component seams to be adding the label
string value to the hidden field rather than the string id provided by the
value encoder. 

&lt;input id=&quot;commentators-values&quot; type=&quot;hidden&quot;
name=&quot;commentators-values&quot; value=&quot;George 
&lt;gmc07@myemail.org&gt; ;Charlie &lt;charlie@myemail.org&gt; ">

This results in the following error 
Caused by: org.apache.tapestry5.ioc.util.UnknownValueException: Could not
find a coercion from type java.lang.String to type
org.company.eprs.entities.ApplicationUser.

2. The duplicated textarea's seemed to be a result of my auto resizing
textarea script. Resolved

3. A new issue has been created with greater than less than now. 
    
       George Christman &lt;gmc@myemail.org&gt; &lt;/gmc@myemail.org&gt;
    

Couple enhancements I feel could add more value and flexibility to the
component. 

1. I think adding a vertical parameter that takes a boolean would be a nice
addition. This would allow the component to either display the box's
horizontally as is, or if vertical == true, display the input fields with
the box's vertically,  "Similar to the Facebook language selection under
edit profile".

2. Giving the component the ability to use a comma to add new items that may
not be contained within the autocomplete selection would be a great
addition. This would be useful when using the component with email. 

Thanks Joakim, excellent job. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4690017.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
Alright, first try pushed to GitHub. Build it locally (mvn install)
and change your dependency to version 1.3-SNAPSHOT and see if it does
what you want now.

I think I solved the problem with greater/less-than signs in the
strings as well. :-)

Regards,
Joakim


On Wed, Aug 10, 2011 at 8:21 PM, George Christman
<gc...@cardaddy.com> wrote:
> That would be amazing if you got that working. I feel it would make for a
> much better UX. I'll check in with you tomorrow to see if you were able to
> make any progress.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4686771.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
That would be amazing if you got that working. I feel it would make for a
much better UX. I'll check in with you tomorrow to see if you were able to
make any progress. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4686771.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
I was thinking that it might be possible to have a check in the
component if the value is a collection then I keep the existing
behaviour and otherwise use it as a single value instead.

I need to change the javascript a bit as well but it should be possible I think.

I'll try to find some time for this tonight I think. :-)

/Joakim


On Wed, Aug 10, 2011 at 4:23 PM, George Christman
<gc...@cardaddy.com> wrote:
> So I'm seeing where my issue is based on your code.
>
> As indicated, I'd like to use this component as a replacement to a select
> menu, but here lies the problem.
>
> I have two tables, UserAccount and PurchaseRequest. There can only be one
> UserAccount per PurchaseRequest.
>
> I have a OneToMany from UserAccount to PurchaseRequest
>
> ManyToOne from PurchaseRequest to UserAccount.
>
> Within the template, I'm using PurchaseRequest as my object, so I'm unable
> to user a collection, only a single UserAccount object can be set.  Looks as
> if I'm asking the component to do something it wasn't designed to do.
> Perhaps it would be a nice addition to the component if we could figure out
> how to resolve this issue.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4685978.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
So I'm seeing where my issue is based on your code. 

As indicated, I'd like to use this component as a replacement to a select
menu, but here lies the problem. 

I have two tables, UserAccount and PurchaseRequest. There can only be one
UserAccount per PurchaseRequest. 

I have a OneToMany from UserAccount to PurchaseRequest

ManyToOne from PurchaseRequest to UserAccount. 

Within the template, I'm using PurchaseRequest as my object, so I'm unable
to user a collection, only a single UserAccount object can be set.  Looks as
if I'm asking the component to do something it wasn't designed to do.
Perhaps it would be a nice addition to the component if we could figure out
how to resolve this issue. 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4685978.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
Ok. A little example from my code then. :-)

I use this for tagging accounts and therefor I have a class called AccountTag:
@Entity
public class AccountTag extends AbstractBaseEntity implements Serializable {
    private static final long serialVersionUID = -6290070624732905399L;

    @ManyToOne(fetch = FetchType.EAGER, optional = false)
    @JoinColumns(@JoinColumn(name = "accountId"))
    private Account account;

    @ManyToOne(fetch = FetchType.EAGER, optional = false)
    @JoinColumns(@JoinColumn(name = "tagId"))
    private Tag tag;

    public Account getAccount() {
        return this.account;
    }

    public void setAccount(final Account account) {
        this.account = account;
    }

    public Tag getTag() {
        return this.tag;
    }

    public void setTag(final Tag tag) {
        this.tag = tag;
    }

    public String getTagName() {
        return this.tag.getName();
    }
}

My Account-class have a Set of AccountTag:
private final Set<AccountTag> tags = Sets.newHashSet();

The list of available tags are provided to the ValueEncoder in the
get-method (previously retrieved from the database):
    public ValueEncoder<AccountTag> getTagEncoder() {
        return new GenericValueEncoder<AccountTag>(this.tags,
"tagName", this.propertyAccess);
    }

The GenericValueEncoder is Daniel Jue's code from
http://wiki.apache.org/tapestry/Tapestry5SelectObject.

And in the template:
<div t:type="tag/tagselect" t:id="tags" t:value="editAccount.tags"
t:encoder="tagEncoder"></div>

As long as the field that t:value points to is updated with the
correct values the component should contain the correct values after
an update as well.

/Joakim


On Tue, Aug 9, 2011 at 9:52 PM, George Christman
<gc...@cardaddy.com> wrote:
> Yes I think it's an excellent start and very useful.
>
> I'm slightly confused with using an object.
>
> I have a list of users with a one to many relationship to a purchase request
> table. I gave it a value encoder and gave the tagselect value
> "pr.authorizor". Where I'm confused is the authorizer is just the user
> object and doesn't contain the list. I'm not entirely sure how to pass both
> the list and the object into the component. Perhaps you could show me an
> example of how you do it. I know with a loop we'd use source for the list
> and value for the object.
>
> I'd love to contribute to your project, but I don't think I know enough
> about custom tapestry components just yet. Not sure how to even run them
> locally to test. Any articles or docs would be appreciated though
>
> This could be an excellent alternative to very large select menus. I like
> how it has similar actions to autocomplete, but limits your choices to only
> what is available in the list while giving you the remove x. That would be
> the only reason I'd like to limit the result set to possible one.
>
> the issue I'm having when using greater than less than might end up being
> resolved when using object values rather than strings.
>
> When a user populates the input field and saves the form, I'd like to see
> the saved values reloaded back into the input field maintaining original
> format when updating page at a later time.
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4683389.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
Yes I think it's an excellent start and very useful. 

I'm slightly confused with using an object. 

I have a list of users with a one to many relationship to a purchase request 
table. I gave it a value encoder and gave the tagselect value
"pr.authorizor". Where I'm confused is the authorizer is just the user
object and doesn't contain the list. I'm not entirely sure how to pass both
the list and the object into the component. Perhaps you could show me an
example of how you do it. I know with a loop we'd use source for the list
and value for the object. 

I'd love to contribute to your project, but I don't think I know enough
about custom tapestry components just yet. Not sure how to even run them
locally to test. Any articles or docs would be appreciated though

This could be an excellent alternative to very large select menus. I like
how it has similar actions to autocomplete, but limits your choices to only
what is available in the list while giving you the remove x. That would be
the only reason I'd like to limit the result set to possible one.  

the issue I'm having when using greater than less than might end up being
resolved when using object values rather than strings. 

When a user populates the input field and saves the form, I'd like to see
the saved values reloaded back into the input field maintaining original
format when updating page at a later time.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4683389.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
I found an example of what I was referring to with facebook. If you log into
your account and edit profile,  you'll see an option to edit your location /
home town. It works exactly as desired. The way they handle languages is
very nice and clean too.  

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4686353.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
Hmmm...That looks really strange. It's only one of the textareas that
have an id as well. Haven't seen that behaviour as far as I know. I'll
look into that as well.

/Joakim


On Tue, Aug 9, 2011 at 10:10 PM, George Christman
<gc...@cardaddy.com> wrote:
> I'm seeing textarea duplicated  a few times, just wondering if this is a bug,
> or something I'm doing wrong.
>
> <input id="authorizers-values" type="hidden" name="authorizers-values"
> value="">
> <textarea class="u-textarea" autocomplete="off" style="position: absolute;
> top: 0px; left: -9999px; height: 17px; width: 399.7px; line-height: 16.5px;
> text-decoration: none; letter-spacing: normal; overflow-y: hidden;"
> tabindex="-1"></textarea>
> <textarea class="u-textarea" autocomplete="off" style="position: absolute;
> top: 0px; left: -9999px; height: 17px; width: 399.7px; line-height: 16.5px;
> text-decoration: none; letter-spacing: normal; overflow-y: hidden;"
> tabindex="-1"></textarea>
> <textarea class="u-textarea" autocomplete="off" style="position: absolute;
> top: 0px; left: -9999px; height: 0px; width: 399.7px; line-height: 16.5px;
> text-decoration: none; letter-spacing: normal; overflow-y: hidden;"
> tabindex="-1"></textarea>
> <textarea id="authorizers" class="u-textarea" autocomplete="off"
> style=""></textarea>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4683451.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
I'm seeing textarea duplicated  a few times, just wondering if this is a bug,
or something I'm doing wrong. 

<input id="authorizers-values" type="hidden" name="authorizers-values"
value="">
<textarea class="u-textarea" autocomplete="off" style="position: absolute;
top: 0px; left: -9999px; height: 17px; width: 399.7px; line-height: 16.5px;
text-decoration: none; letter-spacing: normal; overflow-y: hidden;"
tabindex="-1"></textarea>
<textarea class="u-textarea" autocomplete="off" style="position: absolute;
top: 0px; left: -9999px; height: 17px; width: 399.7px; line-height: 16.5px;
text-decoration: none; letter-spacing: normal; overflow-y: hidden;"
tabindex="-1"></textarea>
<textarea class="u-textarea" autocomplete="off" style="position: absolute;
top: 0px; left: -9999px; height: 0px; width: 399.7px; line-height: 16.5px;
text-decoration: none; letter-spacing: normal; overflow-y: hidden;"
tabindex="-1"></textarea>
<textarea id="authorizers" class="u-textarea" autocomplete="off"
style=""></textarea>

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4683451.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
Hi George,

Great to hear that the component can be of use to others than myself.

Using objects instead of strings is no problem. I do it myself. Just
use the t:encoder-parameter and provide a ValueEncoder for it.

I haven't had strings with less/greater than signs and have not
stumbled over this problem. I'll take a look at it (or if you want to
fork the project on GitHub and send a pull request I'll gladly accept
that as well :-) ).

I'll think about a solution for limiting the number of selectable
values as well.

I'm not sure I understand your last question though, which part do you
want to populate from a database? The autocompleter or the
input-field? I do both in my application without problems. Please
provide more information.

Regards,
Joakim


On Tue, Aug 9, 2011 at 6:50 PM, George Christman
<gc...@cardaddy.com> wrote:
> Hi Joakim,
>
> Thanks for the screen shot. Seems to be pretty close to exactly what I was
> looking for. I have a few questions which I hope you'll be able to answer.
> I'd like to pass an object into the component rather than a string and
> define it by it's entity label which would make updates a breeze. When using
> a string it also causes an issue when using greater than less than signs.
> example "Your Name &lt;youremail@domain.com&gt;. The String gets split on
> commit due to the < sign ending up with a comma.  See code below.
>
> I'd also like to limit the total number of results which could be used
> within the input field. Example, I might use this where only a single result
> would be allowed.
>
> Lastly, when updating a page, I'd like the component to populate from the
> database, is that possible?
>
>    public void onPrepare() {
>        if (this.authorizers == null) {
>            this.authorizers = new ArrayList<String>();
>        }
>    }
>
>    SelectModel onProvideCompletionsFromAuthorizers(String partial) {
>        HashSet<ApplicationUser> hashset = new HashSet<ApplicationUser>();
>        partial = partial.toUpperCase();
>
>        for (ApplicationUser applicationUser : applicationUsers) {
>
>            if (applicationUser.getName().toUpperCase().startsWith(partial))
> {
>                    hashset.add(applicationUser);
>            }
>
>            if
> (applicationUser.getEmail().toUpperCase().startsWith(partial)) {
>                    hashset.add(applicationUser);
>            }
>        }
>
>        return selectModelFactory.create(new
> ArrayList<ApplicationUser>(hashset), "Label");
>    }
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4682764.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by George Christman <gc...@cardaddy.com>.
Hi Joakim, 

Thanks for the screen shot. Seems to be pretty close to exactly what I was
looking for. I have a few questions which I hope you'll be able to answer.
I'd like to pass an object into the component rather than a string and
define it by it's entity label which would make updates a breeze. When using
a string it also causes an issue when using greater than less than signs.
example "Your Name &lt;youremail@domain.com&gt;. The String gets split on
commit due to the < sign ending up with a comma.  See code below.  

I'd also like to limit the total number of results which could be used
within the input field. Example, I might use this where only a single result
would be allowed. 

Lastly, when updating a page, I'd like the component to populate from the
database, is that possible?

    public void onPrepare() {
        if (this.authorizers == null) {
            this.authorizers = new ArrayList<String>();
        }
    }

    SelectModel onProvideCompletionsFromAuthorizers(String partial) {
        HashSet<ApplicationUser> hashset = new HashSet<ApplicationUser>();
        partial = partial.toUpperCase();
        
        for (ApplicationUser applicationUser : applicationUsers) {            

            if (applicationUser.getName().toUpperCase().startsWith(partial))
{
                    hashset.add(applicationUser);
            }

            if
(applicationUser.getEmail().toUpperCase().startsWith(partial)) {
                    hashset.add(applicationUser);
            }
        }

        return selectModelFactory.create(new
ArrayList<ApplicationUser>(hashset), "Label");
    }

--
View this message in context: http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4682764.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Joakim Olsson <jo...@unbound.se>.
Thanks Howard,

I have attached a small screenshot.

Regards,
Joakim


On Wed, Jul 27, 2011 at 7:22 PM, Howard Lewis Ship <hl...@gmail.com> wrote:
> I haven't run this, but once I realized what it was referring too, I'm
> sure it's very nice. �Including a screen shot would be worth a lot!
>
> The "JIRA version number selector" he reference to how version numbers
> are selected in JIRA. �It's an auto-completing text field; when a
> match is selected, it appears as a little "capsule" that can be
> clicked to remove it. �It's an elegant mix of text field,
> autocomplete, and Tapestry's own Palette.
>
> Note that I haven't seen how well this library implements the UI, but
> it is very promising.
>
> On Wed, Jul 27, 2011 at 9:17 AM, Joakim Olsson <jo...@unbound.se> wrote:
>> Hi,
>>
>> I just released tapestry-tagselect which is a select component similar
>> to the version select in recent JIRA-versions.
>>
>> See https://github.com/argoyle/tapestry-tagselect for more information.
>>
>> The artifacts should be available in Maven central within an hour or so.
>>
>> Regards,
>> Joakim
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


Re: ANN: Tapestry-tagselect version 1.0 released

Posted by Howard Lewis Ship <hl...@gmail.com>.
I haven't run this, but once I realized what it was referring too, I'm
sure it's very nice.  Including a screen shot would be worth a lot!

The "JIRA version number selector" he reference to how version numbers
are selected in JIRA.  It's an auto-completing text field; when a
match is selected, it appears as a little "capsule" that can be
clicked to remove it.  It's an elegant mix of text field,
autocomplete, and Tapestry's own Palette.

Note that I haven't seen how well this library implements the UI, but
it is very promising.

On Wed, Jul 27, 2011 at 9:17 AM, Joakim Olsson <jo...@unbound.se> wrote:
> Hi,
>
> I just released tapestry-tagselect which is a select component similar
> to the version select in recent JIRA-versions.
>
> See https://github.com/argoyle/tapestry-tagselect for more information.
>
> The artifacts should be available in Maven central within an hour or so.
>
> Regards,
> Joakim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org