Re:
Layout.tml's head tag contain a lot of html codes and css style sheets, which need to be populated in LayoutWithSegments.tml. For some reason, they were filtered by this forum. Also LayoutWithSegments.tml - http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"; xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> -- View this message in context: http://tapestry.1045711.n5.nabble.com/t-head-tp5712176p5712397.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re:
Not sure if it helps, but here you - Layout.tml http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"; xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> ... Layout.java package app.components; public class Layout { //not sure if I need to put the codes here or ??? } LayoutWithSegments.java package app.components; public class LayoutWithSegments { //not sure if I need to put the codes here or ??? } -- View this message in context: http://tapestry.1045711.n5.nabble.com/t-head-tp5712176p5712396.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: tapestry-security and CAS integration?
There's an issue open for it (http://jira.codehaus.org/browse/TYNAMO-150), I'll put it in for the next version. Kalle On Fri, May 18, 2012 at 10:13 AM, Chris Cureau wrote: > Since Apache Shiro 1.2.0, there is a plugin that allows Schiro to > communicate directly with CAS SSO server. Has this functionality made it > into tapestry-security yet? It'd be handy to have. :) > > Cheers, > Chris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re:
and your code is ??? On May 19, 2012, at 7:18 PM, TG wrote: > If I follow the example using parameter, I got Caused by: > java.lang.RuntimeException: Block parameters are only allowed directly > within component elements. > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/t-head-tp5712176p5712324.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > - > 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:
If I follow the example using parameter, I got Caused by: java.lang.RuntimeException: Block parameters are only allowed directly within component elements. -- View this message in context: http://tapestry.1045711.n5.nabble.com/t-head-tp5712176p5712324.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re:
I would like to achieve the same thing like the one mentioned in http://blog.progs.be/45/using-a-tapestry5-layout-with-several-content-blocks. Except that LayoutWithSegments is the one that makes use of Layout. So how with the codes that are provided, where do they go? Thanks. -- View this message in context: http://tapestry.1045711.n5.nabble.com/t-head-tp5712176p5712323.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5.2.5 Select component's multiple property
You have not mentioned what error you are getting ? Also, what is myList ? It is never initialized regards Taha On May 19, 2012, at 12:49 PM, Ab wrote: > myList
Re:
On Sat, 19 May 2012 01:34:43 -0300, TG wrote: I got - Could not convert 'headBlock' into a component parameter binding: Exception generating conduit for expression 'headBlock': Class app.components.LayoutWithSegments does not contain a property (or public field) named 'headBlock'. There are 4 files involved (2 .tml and 2 java files), which one goes to which files? The files weren't attached, but I guess it should be to='prop:headBlock'/> -- Thiago H. de Paula Figueiredo Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor Owner, Ars Machina Tecnologia da Informação Ltda. http://www.arsmachina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tapestry 5.2.5 Select component's multiple property
Here's the java code: package edu.asu.wit.eadvisor.ds.t5.pages.t5.admin; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Comparator; import javax.servlet.http.HttpServletRequest; import org.apache.tapestry.annotations.Component; import org.apache.tapestry5.OptionGroupModel; import org.apache.tapestry5.OptionModel; import org.apache.tapestry5.PersistenceConstants; import org.apache.tapestry5.SelectModel; import org.apache.tapestry5.annotations.InjectPage; import org.apache.tapestry5.annotations.Persist; import org.apache.tapestry5.annotations.Property; import org.apache.tapestry5.internal.OptionModelImpl; import org.apache.tapestry5.ioc.annotations.Inject; import org.apache.tapestry5.util.AbstractSelectModel; import edu.asu.wit.eadvisor.ds.hib.dao.TransferAgreementsDao; import edu.asu.wit.eadvisor.ds.hib.eadvisor.TransferCaCollege; import edu.asu.wit.eadvisor.ds.hib.eadvisor.TransferCaCollegeMajor; import edu.asu.wit.eadvisor.ds.hib.eadvisor.TransferCaInterestArea; import edu.asu.wit.eadvisor.ds.t5.components.MultipleValueEncoder; public class TransferAddAreaToCollege { @Property //@Persist(PersistenceConstants.FLASH) private List interestCodes; @Property private List ficeCodes; @Property private String notes; @Property private Map collegesList; @Property private Map areasList; @Property private List myList; @Property private List myList1; @Property private List myList2; @Property @Persist("flash") private String message; @Inject private TransferAgreementsDao dao; @Inject private HttpServletRequest request; @InjectPage private TransferAddAreaToCollege page; public Object onActivate(){ if(!request.getRequestURL().toString().contains("admin")) return page; else{ if(interestCodes == null){ interestCodes = new ArrayList(); } if(ficeCodes == null){ ficeCodes = new ArrayList(); } List colleges = dao.getCollegeList(); Map m1 = new HashMap(); for (int i=0; i sortedM1 = sortByComparator(m1); collegesList = sortedM1; List areas = dao.getInterestAreaList(); Map m2 = new HashMap(); for (int i=0; i sortedM2 = sortByComparator(m2); areasList = sortedM2; //myList = new ArrayList(); //notice this what i used first and it worked with the model in the tml file set to model="myList" myList1 = new ArrayList(); // this is added when I wanted to have to fields with multiple select myList2 = new ArrayList(); // this is added when I wanted to have to fields with multiple select Object[] keys1 = areasList.keySet().toArray(); Object[] keys2 = collegesList.keySet().toArray(); for (int i=0; i< keys1.length; i++){ //System.out.println("---> " + i + ":" +areasList.get(i) ); MyObject obj = new MyObject(new Integer((String)keys1[i]), areasList.get((String)keys1[i])); myList1.add(obj); } for (int i=0; i< keys2.length; i++){ //System.out.println("---> " + i + ":" +areasList.get(i) ); MyObject obj = new MyObject(new Integer((String)keys2[i]), collegesList.get((String)keys2[i])); myList2.add(obj); } return null; } } public void onSuccess(){ System.out.println("interestCodes.length = " + interestCodes.size()); for (int i=0; i< interestCodes.size(); i++) { System.out.println("interstCodes("+interestCodes.get(i).getId()+"): "+interestCodes.get(i).getName() ); } System.out.println("ficeCodes.length = " + interestCodes.size()); for (int i=0; i< interestCodes.size(); i++) { System.out.println("ficeCodes("+interestCodes.get(i).getId()+"): "+ficeCodes.get(i).
Re: Charset problem of component event handler parameter
ah, I found the cause. it's because of the file encoding setting used in tomcat for working around TAP5-1741(https://issues.apache.org/jira/browse/TAP5-1741). So the parameter is actually decoded correctly but just output in log with malformation. Sorry for the trouble. ?? 2012/5/19 15:01, Rural Hunter : anyone has any idea? ?? 2012/5/18 22:43, Rural Hunter : Very very strange. I tried to encode Chinese first in javascript then sent to the component event handler. Javascript: new Ajax.Request(spec.url, { method: 'post', parameters: {content: encodeURIComponent('?? ?? ')}, contentType: "application/x-www-form-urlencoded; charset=UTF-8", }); Event handler: Object onContentChangeDetected(@RequestParameter("content") String content) { try { System.out.println(content); System.out.println(URLDecoder.decode(content,"UTF-8")); } catch (Exception ex) { ex.printStackTrace(); } return null; } I got this output: %E6%B5%8B%E8%AF%95 ??//these are bad characters but when I test this in a separate class: String str="%E6%B5%8B%E8%AF%95"; System.out.println(str); System.out.println(URLDecoder.decode(str, "UTF-8")); I got this: %E6%B5%8B%E8%AF%95 //good result How can this be explained? ?? 2012/5/18 9:56, Rural Hunter : Hi, I wrote a component which uses ajax request to trigger a component event: new Ajax.Request(spec.url, { method: 'post', parameters: {content: newContent} }); In the event handler: Object onContentChangeDetected(@RequestParameter("content") String content) { System.out.println(content); return null; } Now the problem is, the Chinese character I received in the event handler turns into garbage characters. Both my page and tomcat are set to use UTF-8. The Chinese in normal form inputs and even the autocomplete mixin are correct. I checked the source of autocomplete since the behavior of my component is somewhat like that. but I didn't find any additional process on char encoding. Did I miss anything and what's the best place to re-decoding/encoding the characters? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Charset problem of component event handler parameter
anyone has any idea? ?? 2012/5/18 22:43, Rural Hunter : Very very strange. I tried to encode Chinese first in javascript then sent to the component event handler. Javascript: new Ajax.Request(spec.url, { method: 'post', parameters: {content: encodeURIComponent(' ')}, contentType: "application/x-www-form-urlencoded; charset=UTF-8", }); Event handler: Object onContentChangeDetected(@RequestParameter("content") String content) { try { System.out.println(content); System.out.println(URLDecoder.decode(content,"UTF-8")); } catch (Exception ex) { ex.printStackTrace(); } return null; } I got this output: %E6%B5%8B%E8%AF%95 ??//these are bad characters but when I test this in a separate class: String str="%E6%B5%8B%E8%AF%95"; System.out.println(str); System.out.println(URLDecoder.decode(str, "UTF-8")); I got this: %E6%B5%8B%E8%AF%95 //good result How can this be explained? ?? 2012/5/18 9:56, Rural Hunter : Hi, I wrote a component which uses ajax request to trigger a component event: new Ajax.Request(spec.url, { method: 'post', parameters: {content: newContent} }); In the event handler: Object onContentChangeDetected(@RequestParameter("content") String content) { System.out.println(content); return null; } Now the problem is, the Chinese character I received in the event handler turns into garbage characters. Both my page and tomcat are set to use UTF-8. The Chinese in normal form inputs and even the autocomplete mixin are correct. I checked the source of autocomplete since the behavior of my component is somewhat like that. but I didn't find any additional process on char encoding. Did I miss anything and what's the best place to re-decoding/encoding the characters? - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org