[T4] Contrib Table Number Format
Hi, I'm using contrib table and I want to use number formating on some of the columns of the table's content. The tag is like this: table jwcid=[EMAIL PROTECTED]:Table class=table contribTable ssList id=ssList rowsClass=ognl:beans.rowsClass.next row=ognl:row source=ognl:topBroker columns=topBroker.firmId:firmId, topBroker.firmName:firmName, topBroker.volume:volume, topBroker.value:value, topBroker.frequency:frequency arrowUpAsset=asset:upArrow arrowDownAsset=asset:downArrow /table For example, I wan't to format the 'topBroker.volume' column. How can I do this? Thanks. -- Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Selected Option Example
Hi, I have this code on the html select jwcid=[EMAIL PROTECTED] multiple=ognl:false validators=validators:required span jwcid=@For source=ognl:reportTypeList value=ognl:reportTypeoption jwcid=@Option selected=ognl:typeSelected label=ognl:reportType.code//span /select the java: public void setTypeSelected(ReportType rpt) { this.typeSelected = rpt; } public boolean getTypeSelected() { return this.typeSelected.getCode().equalsIgnoreCase( getReportTemplate().getType()); } It's not working. If I change the html into: selected=ognl:getTypeSelected(reportType) it return Inapropriate OGNL expression exception. Could anyone post me a sample of using Select and Option component especially on the Option's selected property. I find it dificult to understand How to make an Item selected. Please don't post the sample code from the documentation. Thanks. -- Wassalamu'alaikum wr. wb. Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4] IPropertySelectionModel
Hi, How can I implements selected option in model class that implements IPropertySelectionModel? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4] IPropertySelectionModel
What's the purpose of IOptionRenderer? How can I set the selected option? On Wed, Oct 8, 2008 at 4:10 PM, Mohammad Irfan [EMAIL PROTECTED] wrote: Hi, How can I implements selected option in model class that implements IPropertySelectionModel? Thanks -- Wassalamu'alaikum wr. wb. Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T4.1 Property Selection component
On my POJO model, the equals method is like this: public boolean equals(Object obj) { if (this == obj) return true; // if (!super.equals(obj)) // return false; if (getClass() != obj.getClass()) return false; ReportType other = (ReportType) obj; if (code == null) { if (other.code != null) return false; } else if (!code.equals(other.code)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; if (reportTemplates == null) { if (other.reportTemplates != null) return false; } else if (!reportTemplates.equals(other.reportTemplates)) return false; return true; } It is generated from eclipse. And for the PropertySelectionModel the code is like this: public class ReportTypeSelectionModel implements IPropertySelectionModel, Serializable { private static final long serialVersionUID = 1823541941745724736L; private ListReportType rtList; public ReportTypeSelectionModel(ListReportType reptypList) { this.rtList = reptypList; } public String getLabel(int index) { return rtList.get(index).getCode(); } public Object getOption(int index) { return rtList.get(index); } public int getOptionCount() { return rtList.size(); } public String getValue(int index) { return Integer.toString(index); } public boolean isDisabled(int index) { // TODO Auto-generated method stub return false; } public Object translateValue(String value) { return getOption(Integer.parseInt(value)); } } Do the PropertySelectionModel will select the value which it set using setMyValue(theValue) on the page class? On Fri, Aug 29, 2008 at 11:32 AM, Andreas Andreou [EMAIL PROTECTED] wrote: is equals() implemented accordingly for your domain object? On Fri, Aug 29, 2008 at 7:09 AM, Mohammad Irfan [EMAIL PROTECTED] wrote: Hi, getting the selected object from the list is not a problem. The problem is if I want to edit an object where it has a property selection on it's form, I want to set it according to the object's value. The code: select jwcid=@PropertySelection value=ognl:myValue model=ognl:myValues / I have a setter and geter for both model and value object: public abstract Value getMyValue(); public abstract void setMyValue(Value val); public abstract IPropertySelectionModel getMyValues(){ ... } and on the page begin render, I have set the default value if I'm editting the object: public void pageBeginRender(PageEvent event) { . setMyValue( getObject().getValue() ); } But, nothing is happened. The list is always selecting the first value, not the object's value that I want. Thanks. On Wed, Aug 27, 2008 at 10:06 PM, Norman Franke [EMAIL PROTECTED] wrote: This is handled automatically based on the value parameter for the tapestry object. select jwcid=@PropertySelection value=ognl:myValue model=ognl:myValues / You can use an existing model, or implement IPropertySelectionModel which Tapestry uses to translate values and the like. Norman Franke Answering Service for Directors, Inc. www.myasd.com On Aug 27, 2008, at 5:54 AM, Mohammad Irfan wrote: Hi, I have success in using Property selection component but I found a problem. I'd like to ask, how can I set a selected value for the Selection list? So I can have this html output: select name=reportTypeSelection id=reportTypeSelection option value=0CSV/option option value=1DBF/option option value=2 selectedDELIM/option option value=3TXT/option option value=4XLS/option /select Thanks. -- Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wassalamu'alaikum wr. wb. Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com
Re: Tapestry working with other Servlets
Hi Agus, are you from Indonesia? me too. Btw, if you want to use the servlet object in tapestry 4 you can add this property in the .page file of the page: inject property=request object=service:tapestry.globals.HttpServletRequest/ inject property=response object=service:tapestry.globals.HttpServletResponse/ And in your java page model you could add this abstract method: public abstract HttpServletRequest getRequest(); public abstract HttpServletResponse getResponse(); Hope it helps. On Fri, Aug 29, 2008 at 2:28 PM, agus winarno [EMAIL PROTECTED] wrote: Hi, Can the servlet get object in session from tapestry 4? I try to get it, but can't. Looks like HttpSession in servlet is different from HttpSession in tapestry4. Thanks... Agus Winarno Norman Franke wrote: Those links are for Tapestry 5. I use multiple servlets in a single application and haven't had a problem with Tapestry 4. I just map the URLs uniquely in the web.xml. Norman Franke Answering Service for Directors, Inc. www.myasd.com On Apr 2, 2008, at 10:06 AM, Imran Amajd wrote: Hello everybody, I m using Tapestry4 with spring Hibernate. I am having a problem when i call my own java servlet with-in appcalication. The calling servlet sends response correctly but it causes HttpSession termination. i want tapestry to ignore this servlet request and let the container handle this request. The link http://tapestry.apache.org/tapestry5/tapestry-core/guide/ conf.html http://tapestry.apache.org/tapestry5/tapestry-core/guide/conf.html describes about configurig Tapestry. At the end its mentions how we can tell tapestry to ignore certain URLs but it doesnot explain it in depth. Can any body help on how can IgnoredPathsFilter service be used to make it work. if you need to have application web.xml/hivemodule.xml i am happy to provide these. Thanks In Advance buddies. -Imran Amjad -- View this message in context: http://www.nabble.com/Tapestry- working-with-other-Servlets-tp16447065p16447065.html Sent from the Tapestry - User mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Tapestry-working-with-other-Servlets-tp16447065p19215057.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Wassalamu'alaikum wr. wb. Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T4.1 Property Selection component
Hi, I have success in using Property selection component but I found a problem. I'd like to ask, how can I set a selected value for the Selection list? So I can have this html output: select name=reportTypeSelection id=reportTypeSelection option value=0CSV/option option value=1DBF/option option value=2 selectedDELIM/option option value=3TXT/option option value=4XLS/option /select Thanks. -- Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Display String Array
Hi, I'd like to display an array of string. on the java class (JobList.java) i have this get method: public abstract void setKonter(int kont); public abstract int getKonter(); public String[] getJobGroups() { try { this.jobGroupList = getQuartzScheduler().getJobGroupNames(); } catch (SchedulerException e) { log.error(Kegagalan Scheduler, e); } return this.jobGroupList; } Then on my JobList.html: table jwcid=[EMAIL PROTECTED]:Table class=table contribTable jobList id=jobList rowsClass=ognl:beans.rowsClass.next row=ognl:row source=ognl:jobGroups columns=job.name arrowUpAsset=asset:upArrow arrowDownAsset=asset:downArrow index=ognl:konter tr jwcid=[EMAIL PROTECTED] a jwcid=@DirectLink listener=listener:edit parameters=ognl:jobGroups[konter] span jwcid=@Insert value=ognl:jobGroups[konter]/ /a /tr /table Am I wrong? But the page seems doesn't show the list. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Display String Array
Hi, I have an array of String[]. I'd like to display it on a table. How am I do it? Thanks. -- Wassalamu'alaikum wr. wb. Mohammad Irfan --- www.doktermaya.com www.L-Ads.com (classifieds ads, iklan baris) www.komplain.org (complain about product) www.akarprima.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]