Re: [ANN] AjaxUpload : An ajax based upload component

2011-06-26 Thread Taha Hafeez
Works on ie6 too !! (I seldom happens that your script runs unaltered on
ie6)

regards
Taha

On Sun, Jun 26, 2011 at 8:19 PM, Taha Hafeez wrote:

> I tested it on ie8, ie8 compatibility mode & ie7. I will try it on ie6
> tonight
>
> regards
> Taha
>
>
> On Sun, Jun 26, 2011 at 8:17 PM, Kalle Korhonen <
> kalle.o.korho...@gmail.com> wrote:
>
>> Which version of ie?
>>
>> Kalle
>>
>>
>> On Sun, Jun 26, 2011 at 4:13 AM, Taha Hafeez 
>> wrote:
>> > Tested with ie, works well
>> >
>> > regards
>> > Taha
>> >
>> > On Sat, Jun 25, 2011 at 9:38 PM, Taha Hafeez > >wrote:
>> >
>> >> Hi
>> >>
>> >> AjaxUpload is an ajax based tapestry upload component based on
>> >> https://github.com/valums/file-uploader. I have tested it on Opera 10,
>> >> Firefox 3.5 & Chrome 12. Will test it on ie6. A blog about its
>> >> implementation :
>> >> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
>> >>
>> >> regards
>> >> Taha
>> >>
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>


Improved Tapestry support in IntelliJ

2011-06-26 Thread Sebastian Hennebrueder
Hello,

my Intellij issue http://youtrack.jetbrains.net/issue/IDEA-52080 was fixed. If 
you start your application server or servlet engine in debug mode and activate 
'update classes and resources on frame deactivation', then you code switch to 
the browser and press 'reload'. Classes and resources are copied over to the 
server and Tapestry reloading in development mode does its job. Coding was 
never faster.

As it is not required to run the server in debug mode, and it is annoying as 
the IDE keeps telling that it cannot reload classes with Java means, I have 
added the following issue to get the same feature in normal startup mode.

Please vote for it.

http://youtrack.jetbrains.net/issue/IDEA-71437

Usage pattern in IntelliJ for Mac users:

CMD+Tab to switch to brower, CMD+R to reload browser (takes less than 0.5 
seconds)
CMD+F10 to redeploy complete application


-- 
Best Regards / Viele Grüße

Sebastian Hennebrueder

-
http://www.laliluna.de
Java software developer and trainer for Hibernate and Java Persistence


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



Re: select component

2011-06-26 Thread Tony Nelson
Is this the "correct" way to contribute multiple ValueEncoders?

@SuppressWarnings("unchecked")
public static void contributeValueEncoderSource(MappedConfiguration 
configuration) {
configuration.addInstance(Group.class, GroupEncoder.class);
configuration.addInstance(Office.class, OfficeEncoder.class);
}


Is there a way to tell Tap to look in a specific package and register all the 
ValueEncoders it finds?

Thanks
Tony

On Jun 26, 2011, at 2:57 PM, Bob Harner wrote:

> Tony,
> 
> The menu options are determined by your SelectModel. Rather than using
> your "groups" list as the select model, use SelectModelFactory to
> generate a SelectModel for you, specifying the attribute to be used
> for the visible options. See the SelectWithListDemo.java example at
> http://tapestry.apache.org/using-select-with-a-list.html and let me
> know if anything in that page isn't clear.
> 
> On Sun, Jun 26, 2011 at 1:09 PM, Tony Nelson  wrote:
>> Following the sample here: 
>> http://tapestry.apache.org/using-select-with-a-list.html
>> 
>> I created a ValueEncoder and ValueEncoderFactory for my select model.  That 
>> was simple enough.  I created the actual select like this:
>> 
>> > value="searchKeys.group" />
>> 
>> Is it possible to tell the select which attribute of my model should be used 
>> to generate the options? It seems to call toString() by default which isn't 
>> appropriate for this model.
>> 
>> Thanks
>> Tony Nelson
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: select component

2011-06-26 Thread Tony Nelson
Thank you very much for the nicely telling me to read the entire page, not just 
the part I thought I needed ;)

That solved everything.

Thanks to the Tap team for making selects _much_ easier to work with in 5!

Tony

On Jun 26, 2011, at 2:57 PM, Bob Harner wrote:

> Tony,
> 
> The menu options are determined by your SelectModel. Rather than using
> your "groups" list as the select model, use SelectModelFactory to
> generate a SelectModel for you, specifying the attribute to be used
> for the visible options. See the SelectWithListDemo.java example at
> http://tapestry.apache.org/using-select-with-a-list.html and let me
> know if anything in that page isn't clear.
> 
> On Sun, Jun 26, 2011 at 1:09 PM, Tony Nelson  wrote:
>> Following the sample here: 
>> http://tapestry.apache.org/using-select-with-a-list.html
>> 
>> I created a ValueEncoder and ValueEncoderFactory for my select model.  That 
>> was simple enough.  I created the actual select like this:
>> 
>> > value="searchKeys.group" />
>> 
>> Is it possible to tell the select which attribute of my model should be used 
>> to generate the options? It seems to call toString() by default which isn't 
>> appropriate for this model.
>> 
>> Thanks
>> Tony Nelson
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: select component

2011-06-26 Thread Bob Harner
Tony,

The menu options are determined by your SelectModel. Rather than using
your "groups" list as the select model, use SelectModelFactory to
generate a SelectModel for you, specifying the attribute to be used
for the visible options. See the SelectWithListDemo.java example at
http://tapestry.apache.org/using-select-with-a-list.html and let me
know if anything in that page isn't clear.

On Sun, Jun 26, 2011 at 1:09 PM, Tony Nelson  wrote:
> Following the sample here: 
> http://tapestry.apache.org/using-select-with-a-list.html
>
> I created a ValueEncoder and ValueEncoderFactory for my select model.  That 
> was simple enough.  I created the actual select like this:
>
>  value="searchKeys.group" />
>
> Is it possible to tell the select which attribute of my model should be used 
> to generate the options? It seems to call toString() by default which isn't 
> appropriate for this model.
>
> Thanks
> Tony Nelson
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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



Re: T5.2.5 - loop, zones and a save button

2011-06-26 Thread Alexander Rosemann
Removing the zone surrounding the textarea fixes the save issue but of 
course breaks the update functionality.


This is the code:

public class LoopWithZoneIssue {

private final Logger logger = LoggerFactory.getLogger(Feedback.class);
@Inject
private Request request;
@Property
private String currentLink;
@Property
private String currentCriteria;
@Property
private int linkIndex;
@Property
private int criteriaIndex;
@InjectComponent
@Property
private Zone textareaZone;
@Persist
private Map criteria;
@Persist
private Map links;
private String ajaxLink;
private String ajaxCriteria;

void onActivate() {
if (criteria == null) {
criteria = new HashMap();
criteria.put("Research", "Systematic identification and 
investigation of appropriate sources");
criteria.put("Communication and Presentation", "Clarity of 
purpose; skills in the selected media; "
+ "awareness and adoption of appropriate conventions; 
sensitivity to the needs of the audience");
criteria.put("Analysis", "Examination and interpretation of 
resources");
criteria.put("Personal and professional development", 
"Management of learning through reflection,  "
+ "planning,  self direction,  subject engagement and 
commitment");

}
if (links == null) {
links = new HashMap();
links.put("A", "Default value for A");
links.put("B", "Default value for B");
links.put("C", "Default value for C");
links.put("D", "Default value for D");
links.put("E", "Default value for E");
}
}

public void onSelectedFromSaveFeedback() {
logger.debug("Saving feedback form");
}

public Object onActionFromLink(String linkId, String criteriaId) {
ajaxLink = links.get(linkId);
ajaxCriteria = criteria.get(criteriaId);
return textareaZone.getBody();
}

public String getUniqueZoneId() {
return "uniqueZoneId_" + criteriaIndex;
}

public Collection getCriteria() {
return criteria.keySet();
}

public Collection getLinks() {
return links.keySet();
}

public ValueEncoder getCriteriaEncoder() {
return new ValueEncoder() {

public String toValue(String value) {
for (String key : criteria.keySet()) {
if (criteria.get(key).equals(value))
return key;
}
return "unknown";
}

public String toClient(String key) {
String value = criteria.get(key);
return value;
}
};
}

public String getTextareaValue() {
logger.debug("called getTextareaValue");
if (request.isXHR()) {
return ajaxLink;
}
else {
return criteria.get(currentCriteria);
}
}

public void setTextareaValue(String textareaValue) {
logger.debug("called setTextareaValue '{}' for criteria '{}'", 
textareaValue, currentCriteria);

criteria.put(currentCriteria, textareaValue);
}

}

And the tml:


  
${currentCriteria}

  ${currentLink}
  
     


  



  
  


Thanks,
Alex

On 24.06.2011 17:27, Taha Tapestry wrote:


Can you share the code of the event handler for the action.
I think all the textareas are getting bound to the last object of the loop's 
source


Regards
Taha

On Jun 24, 2011, at 7:35 PM, Alexander Rosemann  
wrote:


Hi Taha,

I should have put more thought in my example. The zone gets its unique id and 
is updated by a set of actionlinks that I have omitted in my previous example. 
This is the full one:



  


  some
text



  


  

  


The actionlinks fill the textarea with default data which can then be altered 
by the user and finally saved.

Regards,
Alex



On 24.06.2011 15:48, Taha Hafeez wrote:

Hi

Whenever you use a zone in a loop, you should provide the javascript id
yourself. You can use the index to create a unique one

e.g.




If you are using a non-ajax form, what is the use of zone here ??

regards
Taha

On Fri, Jun 24, 2011 at 7:01 PM, Alexander Rosemann
   wrote:


Hi,

I asked this before but couldn't resolve the issue based on the information 
that Taha forwarded me.
(http://tapestry.1045711.n5.nabble.com/loops-zones-and-encoders-td4425814.html#a4425945)

I have a loop that creates textareas within a form. Each textarea is wrapped by 
a zone. Outside the loop is a submit button to save the form. No matter whether 
I set the submit defer attribute to false or true, my code only persists the 
information of the last texarea in the loop.

That's how the form part of the tml looks like:


  

  

  
  


The odd thing is that the encoder (cEncoder) for the loop gets c

select component

2011-06-26 Thread Tony Nelson
Following the sample here: 
http://tapestry.apache.org/using-select-with-a-list.html

I created a ValueEncoder and ValueEncoderFactory for my select model.  That was 
simple enough.  I created the actual select like this:



Is it possible to tell the select which attribute of my model should be used to 
generate the options? It seems to call toString() by default which isn't 
appropriate for this model.

Thanks
Tony Nelson
-
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org



Re: [ANN] AjaxUpload : An ajax based upload component

2011-06-26 Thread Taha Hafeez
I tested it on ie8, ie8 compatibility mode & ie7. I will try it on ie6
tonight

regards
Taha

On Sun, Jun 26, 2011 at 8:17 PM, Kalle Korhonen
wrote:

> Which version of ie?
>
> Kalle
>
>
> On Sun, Jun 26, 2011 at 4:13 AM, Taha Hafeez 
> wrote:
> > Tested with ie, works well
> >
> > regards
> > Taha
> >
> > On Sat, Jun 25, 2011 at 9:38 PM, Taha Hafeez  >wrote:
> >
> >> Hi
> >>
> >> AjaxUpload is an ajax based tapestry upload component based on
> >> https://github.com/valums/file-uploader. I have tested it on Opera 10,
> >> Firefox 3.5 & Chrome 12. Will test it on ie6. A blog about its
> >> implementation :
> >> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
> >>
> >> regards
> >> Taha
> >>
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


Re: [ANN] AjaxUpload : An ajax based upload component

2011-06-26 Thread Kalle Korhonen
Which version of ie?

Kalle


On Sun, Jun 26, 2011 at 4:13 AM, Taha Hafeez  wrote:
> Tested with ie, works well
>
> regards
> Taha
>
> On Sat, Jun 25, 2011 at 9:38 PM, Taha Hafeez wrote:
>
>> Hi
>>
>> AjaxUpload is an ajax based tapestry upload component based on
>> https://github.com/valums/file-uploader. I have tested it on Opera 10,
>> Firefox 3.5 & Chrome 12. Will test it on ie6. A blog about its
>> implementation :
>> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
>>
>> regards
>> Taha
>>
>

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



Re: [ANNOUNCE] Tapestry 5.3.0

2011-06-26 Thread Tony Nelson
Answered my own question:

[ERROR] Failed to execute goal on project helpdesk: Could not resolve 
dependencies for project com.starpoint:helpdesk:war:1.0.0: The following 
artifacts could not be resolved: 
org.apache.tapestry:tapestry-core:jar:5.3.0-SNAPSHOT, 
org.apache.tapestry:tapestry-spring:jar:5.3.0-SNAPSHOT: Failure to find 
org.apache.tapestry:tapestry-core:jar:5.3.0-SNAPSHOT in 
http://repository.apache.org/snapshots/ was cached in the local repository, 
resolution will not be reattempted until the update interval of 
apache-snapshots has elapsed or updates are forced -> [Help 1]


On Jun 26, 2011, at 10:12 AM, Tony Nelson wrote:

> That's great.  I was just going to post a question about which version of Tap 
> I should target for an internal app that's used by about 5 of us.
> 
> I personally don't think 5.3.0 should be available as anything more than 
> 5.3.0-SNAPSHOT until 5.3.0 is finalized.
> 
> That being said, for my internal app, should I be using 5.3.0 or 
> 5.3.0-SNAPSHOT for my development?
> 
> Thanks for the help
> Tony
> 
> On Jun 26, 2011, at 6:13 AM, Robert Zeigler wrote:
> 
>> There's an ongoing discussion about this on the dev list right now.
>> 
>> Robert
>> 
>> On Jun 26, 2011, at 6/265:04 AM , Christian Köberl wrote:
>> 
>>> On Fri, Jun 24, 2011 at 10:30 PM, Howard Lewis Ship wrote:
 Apache Tapestry version 5.3.0 is now available. This is the first
 alpha release of Tapestry 5.3.
>>> 
>>> I have a suggestion for Tapestry version numbering. I think it's a bit 
>>> confusing to give a regular version number to a alpha or beta releases - 
>>> you never know which version is alpha/beta/release candidate/stable.
>>> 
>>> Other open source projects use special version numbers, e.g. JBoss projects 
>>> would use the following versions for a 5.3 release:
>>> 5.3.0.Alpha1
>>> 5.3.0.Beta1
>>> 5.3.0.CR1 (for release candidaten, CR because this version is smaller than 
>>> Final in Maven)
>>> 5.3.0.Final
>>> 
>>> What do you think?
>>> 
>>> -- 
>>> Chris
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: [ANNOUNCE] Tapestry 5.3.0

2011-06-26 Thread Tony Nelson
That's great.  I was just going to post a question about which version of Tap I 
should target for an internal app that's used by about 5 of us.

I personally don't think 5.3.0 should be available as anything more than 
5.3.0-SNAPSHOT until 5.3.0 is finalized.

That being said, for my internal app, should I be using 5.3.0 or 5.3.0-SNAPSHOT 
for my development?

Thanks for the help
Tony

On Jun 26, 2011, at 6:13 AM, Robert Zeigler wrote:

> There's an ongoing discussion about this on the dev list right now.
> 
> Robert
> 
> On Jun 26, 2011, at 6/265:04 AM , Christian Köberl wrote:
> 
>> On Fri, Jun 24, 2011 at 10:30 PM, Howard Lewis Ship wrote:
>>> Apache Tapestry version 5.3.0 is now available. This is the first
>>> alpha release of Tapestry 5.3.
>> 
>> I have a suggestion for Tapestry version numbering. I think it's a bit 
>> confusing to give a regular version number to a alpha or beta releases - you 
>> never know which version is alpha/beta/release candidate/stable.
>> 
>> Other open source projects use special version numbers, e.g. JBoss projects 
>> would use the following versions for a 5.3 release:
>> 5.3.0.Alpha1
>> 5.3.0.Beta1
>> 5.3.0.CR1 (for release candidaten, CR because this version is smaller than 
>> Final in Maven)
>> 5.3.0.Final
>> 
>> What do you think?
>> 
>> -- 
>> Chris
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: [ANN] AjaxUpload : An ajax based upload component

2011-06-26 Thread Taha Hafeez
Tested with ie, works well

regards
Taha

On Sat, Jun 25, 2011 at 9:38 PM, Taha Hafeez wrote:

> Hi
>
> AjaxUpload is an ajax based tapestry upload component based on
> https://github.com/valums/file-uploader. I have tested it on Opera 10,
> Firefox 3.5 & Chrome 12. Will test it on ie6. A blog about its
> implementation :
> http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
>
> regards
> Taha
>


Re: [ANNOUNCE] Tapestry 5.3.0

2011-06-26 Thread Christian Köberl

On Jun 26, 2011, Robert Zeigler wrote:

There's an ongoing discussion about this on the dev list right now.


Thanks Robert - I just read it. Seems that there are quite different 
opinions of the committers.


From a user point of view I just want one thing: mark pre-stable 
releases somehow.


--
Chris

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



Re: Method arguments in template expansions

2011-06-26 Thread Joel Halbert
Cool, it works!

I had tried it, but forgotten that method names are not shortened, so as
Robert suggested you have to use the full method name:

${getFoo('bar')}

works.

${foo('bar')}

does not.



On Sun, 2011-06-26 at 01:53 +0200, Martin Strand wrote:
> Just remember that method names are not "shortened" in the same way  
> property names are.
> 
> i.e. invoking this method:
> public String getClass(String link)
> 
> would look like:
> ${getClass('link1')}
> 
> On Sun, 26 Jun 2011 01:33:39 +0200, Robert Zeigler  
>  wrote:
> 
> > Have you tried? :)
> > ${} is using the property expression language under the hood, which  
> > /does/ support method evaluation/method arguments, so I would expect  
> > ${class('link1')} to work... but i haven't tried it, either. :)
> >
> > Robert
> >
> > On Jun 25, 2011, at 6/256:31 PM , Joel Halbert wrote:
> >
> >> I'm pretty sure the answer's NO, but just incase I'll ask anyway.
> >>
> >> Is it possible to include method arguments in template expansions?
> >>
> >> I would die to be able to just do this:
> >>
> >> link1
> >> link2
> >> link3
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 



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



Re: [ANNOUNCE] Tapestry 5.3.0

2011-06-26 Thread Robert Zeigler
There's an ongoing discussion about this on the dev list right now.

Robert

On Jun 26, 2011, at 6/265:04 AM , Christian Köberl wrote:

> On Fri, Jun 24, 2011 at 10:30 PM, Howard Lewis Ship wrote:
>> Apache Tapestry version 5.3.0 is now available. This is the first
>> alpha release of Tapestry 5.3.
> 
> I have a suggestion for Tapestry version numbering. I think it's a bit 
> confusing to give a regular version number to a alpha or beta releases - you 
> never know which version is alpha/beta/release candidate/stable.
> 
> Other open source projects use special version numbers, e.g. JBoss projects 
> would use the following versions for a 5.3 release:
> 5.3.0.Alpha1
> 5.3.0.Beta1
> 5.3.0.CR1 (for release candidaten, CR because this version is smaller than 
> Final in Maven)
> 5.3.0.Final
> 
> What do you think?
> 
> -- 
> Chris
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 


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



Re: [ANNOUNCE] Tapestry 5.3.0

2011-06-26 Thread Christian Köberl

On Fri, Jun 24, 2011 at 10:30 PM, Howard Lewis Ship wrote:

Apache Tapestry version 5.3.0 is now available. This is the first
alpha release of Tapestry 5.3.


I have a suggestion for Tapestry version numbering. I think it's a bit 
confusing to give a regular version number to a alpha or beta releases - 
you never know which version is alpha/beta/release candidate/stable.


Other open source projects use special version numbers, e.g. JBoss 
projects would use the following versions for a 5.3 release:

5.3.0.Alpha1
5.3.0.Beta1
5.3.0.CR1 (for release candidaten, CR because this version is smaller 
than Final in Maven)

5.3.0.Final

What do you think?

--
Chris

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