Re: Fw: Pb installing Tobago examples app.
Hello, the demo (1.0.11 and 1.0.12-SNAPSHOT) is running on my tomcat 6 (MacOSX 10.4, Java 6) without problems. Which OS and which Java you are using? Do you using Tomcat standalone? I've seen Glassfish in the first stacktrace. Regards Udo clec schrieb: Hello, About my previous email, I scanned the log more closely and there is an exception preceeding the one I mentionned when the application starts. However, the '/WEB-INF/tobago-config.xml' IS present in the application directory !! Thanks to anyone that has ideas of what could be wrong, there. Clec - GRAVE: Exception lors de l'envoi de l'évènement contexte initialisé (context initialized) à l'instance de classe d'écoute (listener) org.apache.myfaces.tobago.webapp.TobagoServletContextListener java.lang.RuntimeException: Error while deploy process. Tobago can't be initialized! Application will not run! at org.apache.myfaces.tobago.webapp.TobagoServletContextListener.contextInitialized(TobagoServletContextListener.java:72) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920) at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) at org.apache.catalina.core.StandardHost.start(StandardHost.java:719) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:566) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) === Caused by: javax.faces.FacesException: No config file found: '/WEB-INF/tobago-config.xml'. Tobago can't run without configuration. === at org.apache.myfaces.tobago.config.TobagoConfigParser.parse(TobagoConfigParser.java:112) at org.apache.myfaces.tobago.config.TobagoConfigParser.parse(TobagoConfigParser.java:50) at org.apache.myfaces.tobago.webapp.TobagoServletContextListener.contextInitialized(TobagoServletContextListener.java:53) Créez votre adresse électronique [EMAIL PROTECTED] 1 Go d'espace de stockage, anti-spam et anti-virus intégrés.
Re: [tobago] how can I have a list of radio boxes in a sheet (one in each line) and belonging to the same group
Hallo Zied, there is a special tag for almost this job: tc:columnSelector. But AFAIK in the moment the only selection model is multiselect. This tag should be extended to other selection models like singleselect. You may add a JIRA issue for this. Regards Udo Zied Hamdi schrieb: is it possible to do sth like: tc:sheet id=phones columns=50px;15*;18px;18px value= #{personCtrl.current.bean.phones} var=phone ... tc:column label=#{i18n.main} sortable =true tc:selectOneRadio id= main value=#{phone.main} f:selectItem id= mainPhone itemValue=false itemLabel= / /tc:selectOneRadio /tc:column ... /tc:sheet and join occurences with a group name (to have the radio buttons behaviour) ???. Note: maybe if it's not possible today, may we extend the taglib selectOneRadio to see if the same id is many times in the sheet...
Re: [Tobago] Problem with JSTL
Hello Madan, seens this is not a Tobago but a JSTL question. Do you have an implementation for the JSTL in your classpath? You need both: API + Impl. You may use the apache implementation (standard.jar): See http://jakarta.apache.org/taglibs/ If using maven try to add: dependency groupIdtaglibs/groupId artifactIdstandard/artifactId version1.1.2/version scoperuntime/scope /dependency Hope that helps Udo madan chowdary schrieb: Hi all, i was having problem with JSTL tag. I want to display 20 text fields in each row. Thought to use tc:forEach/, but saw that its deprecated in tlddocs. So opted for c:forEach/. I included jstl.jar in lib directory. tried with both %@ taglib uri=http://java.sun.com/jsp/jstl/core; preifx=c % and %@ taglib uri=http://java.sun.com/jstl/core; preifx=c % But was getting error saying that the taglib is not specified in web.xml or either in the classpath. tried with different versions of JSTL.But same error. how to achieve my task using c:forEach/ thnx in regards, Madan Here’s a new way to find what you're looking for - Yahoo! Answers http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/
Re: Unable to deploy Tobago 1.0.9 demo App in WebLogic 8.1.4
Hello Alan, which Java Version you are using? Default for WLS is JRockit 1.4.2_05. But the Tobago Demo is running with Java 5 only, by default. To running Tobago Example Demo with JDK 1.4 you have to build it with the retrotranslated dependencies. Regards Udo TUCKER Alan schrieb: Just trying to deploy the demo application (tobago-example-demo-1.0.9.war) as downloaded. I was presuming this contains everything it needs. Seems to be causing a problem with Commons Logging. WebLogic 8.1 sp4 Standard domain configured with the domain creation wizard – nothing special Windows 2000 professional The stack trace below is seen as WLS tries to deploy the WAR Any Ideas? java.lang.NullPointerException at java.util.Hashtable.get(Hashtable.java:333) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:233) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.apache.myfaces.tobago.webapp.TobagoServletContextListener.clinit(TobagoServletContextListener.java:34) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:308) at java.lang.Class.newInstance(Class.java:261) at weblogic.servlet.internal.WebAppServletContext.registerEventListener(WebAppServletContext.java:2886) at weblogic.servlet.internal.WebAppHelper.parseAndRegisterListeners(WebAppHelper.java:394) at weblogic.servlet.internal.WebAppHelper.registerImplicitTagLibListeners(WebAppHelper.java:359) at weblogic.servlet.internal.WebAppServletContext.activateFromDescriptors(WebAppServletContext.java:2434) at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:5904) at weblogic.servlet.internal.WebAppServletContext.setActive(WebAppServletContext.java:5882) at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:834) at weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationContainer.java:3315) at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2194) at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2167) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2503) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2421) at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2138) at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2237) at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2132) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2384) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) --- nested within: -- weblogic.management.ManagementException: - with nested exception: [java.lang.NullPointerException] at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2396) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) ** *AXA Investment Managers* *Alan Tucker* **Java Consultant** IT Core Services - Enterprise Frameworks 7 Newgate Street, London EC1A 7NX Tel: +44 (0) 20 7003 1184 e-mail:_ [EMAIL PROTECTED] BLOCKED::mailto:[EMAIL PROTECTED]_ Website: www.axa-im.com BLOCKED::http://www.axa-im.com/ Le contenu de ce message electronique est confidentiel et destine a l usage du (des) destinataire(s) designe(s). Si vous n etes pas le destinataire, nous vous informons que toute utilisation, diffusion, retransmission ou copie de cet
Re: [Tobago] global settings possible?
Hallo Michał, its not possible yet. I think you can use alternativly some technologies: * JSP Tag-Files (Has the disadvantage that when you not set an attribute the tag file will set it to (empty string), which may problematic in some cases) * Write your own tag. Like InExtensionTag in Tobago. * Other template frameworks... Best regards Udo Michał 'Gandalf' Stawicki schrieb: Hi, is it possible to set some global (default) settings for ex. for tc:sheet? I know that I could make a managed-bean and for every sheet get attributes values from that bean, but this would be troblesome - setting default values would be much simpler. So, is there a way? regards, michael
Re: [Tobago] global settings possible?
Hello Michał, You can see how to create a new tag by composing other tag here: https://svn.apache.org/repos/asf/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/taglib/extension/LabelExtensionTag.java You will need to write a TLD-file, an may register it. (In Tobago the file is autogenerated). For writing TLD see Servlet-Spec. etc. Regards, Udo Michał 'Gandalf' Stawicki schrieb: Hello Udo, * Write your own tag. Like InExtensionTag in Tobago. Are there any examples of how it should be done, or should I look at Tobago's sources? I did some search, but couldn't find anything usefull. Thanks, michael
Re: [ Tobago ] Regarding Alignment Problems with gridLayout
Hello Madan, tc:column is only for Columns inside of tc:sheet. tc:cell is useful if there is a tc:gridLayout facet in the parent container to set spanX and/or spanY tc:panel may have its own layout-manager. A simple sample you can see here: http://tobago.atanion.net/tobago-example-demo/faces/overview/layout.jsp You may click on the view source button in the footer. Hope that helps, Udo madan chowdary schrieb: Hi Volker, Thnx for the reply... Gone through the code, hope this would help me... But can u suggest whats the best manner to write code with tc:gridLayout/ i need to display some textboxes and other components in a page. Right now i am using tc:cell/ . But what does tc:column/ does ? where can i use tc:cell/ and tc:column/ can i use a panel instead of tc:cell ? Regards, Madan - Original Message From: Volker Weber [EMAIL PROTECTED] To: MyFaces Discussion users@myfaces.apache.org Sent: Saturday, 24 February, 2007 12:06:36 AM Subject: Re: [ Tobago ] Regarding Alignment Problems with gridLayout Hi Madan, please see https://issues.apache.org/jira/browse/TOBAGO-295 hope it helps. Regards, Volker 2007/2/23, madan chowdary [EMAIL PROTECTED]: Hi All, I have a gridLayout in which i display some data in ordered manner. Based upon some conditions, i need to show data. I use rendered for condition checking, so for a tc:cell i place the rendered attribute. But when rendering the table is including this tc:cell also. The rows i specified for this cell is aslo rendered , but this doesn't show anything as the condition is false. But the space is shown. This makes all my alignment look awkward , Any Suggestions regarding this, Think many would have faced this problem. I need to fix some UI Issues which includes these things also.. Thnx in Advance Regards, Madan Here's a new way to find what you're looking for - Yahoo! Answers Here’s a new way to find what you're looking for - Yahoo! Answers http://us.rd.yahoo.com/mail/in/yanswers/*http://in.answers.yahoo.com/
Re: [Tobago] tc:tab won't resize
Hallo Michał, I think I've the same scenario working, with 1.0.9 and also 1.0.10-SNAPSHOT How do you realize the resizing of the page? Udo Michał 'Gandalf' Stawicki schrieb: Hi, I have a tc:page that always sets its' size to maximum. So, if a user resizes his window, after next submit the size of tc:page will change. Now, I have a tc:tabGroup, which resizes correctly. The problem is, that tc:tab won't. When I first open a tab, it calculates the size correctly, but then this size will be permanent - in spite of resizing tc:page and tc:tabGroup, the tc:tab will have a constant size, all I get are scrollbars. Did anyone experience this? Regards, michael
Re: [Tobago] nesting tc:sheet
tc:selectItems may resolve your problem, it is similar to f:selectItems but allows $-Expressions, as far as I know. So you can use forEach. Do you really need nested loops? Is the inner a loop over the items? Then you can use ?:selectItems instead of ?:selectItem. Regards Udo Michał 'Gandalf' Stawicki schrieb: Hi, no answers to this one... Is there any way in Tobago to do double-iteration (so I iterate over some List, and than I iterate over some elements than I get from the first list)? I can't use forEach as I need to use tc:selectOneChoice and f:selectItems and these won't work with forEach regards, michael On 14/02/07, Michał 'Gandalf' Stawicki [EMAIL PROTECTED] wrote: Hi, did anyone tried nesting tc:sheet inside another tc:sheet's column? I don't get any errors, but the inner tc:sheet just isn't rendered regards, michael -- [EMAIL PROTECTED] http://stawicki.jasliska.pl GG: 369 JID: [EMAIL PROTECTED]
Re: tobago demo 109 : tc tree control: Faces Tree recurring problem
Hello, you may use the upcoming new tree from the sandbox. I've added a simple editor in the tobago-example-sandbox. It shows how an editor may written (in the moment it is a VERY simple example, it only adds one node to the selected node). Regards, Udo ws_dev2001 schrieb: Hi all, I am using tobago 109 and myfaces 114 on tomcat. My interest is in the tobago component tree control. I am not able to operate the copy and edit functionality. If anyone can help me out it would be really useful. I get this stack trace in the tobago demo log : Caused by: org.apache.jasper.JasperException: Client-id : m1172375745580 is duplicated in the faces tree. Component : page:mytree:m1172375745580, path: {Component-Path : [Class: org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /overview/treeCnt.jsp][Class: org.apache.myfaces.tobago.component.UIPage,Id: page][Class: org.apache.myfaces.tobago.component.UITreeOld,Id: mytree][Class: org.apache.myfaces.tobago.component.UITreeOldNode,Id: root][Class: org.apache.myfaces.tobago.component.UITreeOldNode,Id: movies][Class: org.apache.myfaces.tobago.component.UITreeOldNode,Id: m1172375745580]} TIA, May the source be with u R2D2. ___ All New Yahoo! Mail – Tired of unwanted email come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html
Re: [Tobago] Problem with immediate=true
Hello Helmut, immediate means, that the values will not validated and will not update the model. But the submitted values are still in the component. To fix your problem your reset() should return the correct outcome != null. In this case you will get a brand new UI-component-tree. Hope that helps Udo Helmut Swaczinna schrieb: Hi, I have a page with a reset button with immediate=true to reset the input fields of the page to standard values without submitting and validating entered values. But this doesn't work. The fields remains unschanchend. Here's a simple example: test.jsp tc:page id=testPage3 width=300px height=200px tc:button label=Reset immediate=true action=#{controller.reset}/ tc:in value=#{controller.value}/ /tc:page Controller.java private Integer value; public String reset() { LOG.debug(reset); value = null; return null; } public Integer getValue() { LOG.debug(getValue: + value); return value; } public void setValue(Integer value) { this.value = value; } When you click the reset button the reset action is called but not the getValue method. I think this is a bug. I'm using Tobago 1.0.11. Regards Helmut
Re: [ Tobago ] Help Regarding invoking Managed Bean from dos/unix shell
You may extend the NonFacesRequestServlet like in the tobago-example-nonfacesrequest. Regards Udo Madan Narra schrieb: Hi All, I have a doubt which may / may not be related to Tobago , but its sure that its related to JSF. I have a cron job running on UNIX platform , which is scheduled to perform a specific operation. Previously the job calls a URL with a parameter passed to the Servlet , something like this http://localhost:8080/myApp/helloWorld?command=xxxyyy; . Based upon the request parameter command the code is executed in the servlet. Now i need to perform the same action but with the managed beans as now we were using JSF (Tobago) I am not able to guess how to achieve this... * Have to implement the logic in Managed Beans and not in Servlet's. Any suggestions ... ? -- Regards, Madan N
Re: [ Tobago ] Help Regarding invoking Managed Bean from dos/unix shell
In the FishServlet is a reference to the managed bean fishPond. It can be used after: FishPond fishPond = (FishPond) VariableResolverUtil.resolveVariable(facesContext, fishPond); Regards Udo By the way, the NonFacesRequestServlet is a way to provide external links with parameters to a JSF application. Internal command should be processed with the JSF methods (outcome/navigation-hander/...) Madan Narra schrieb: Hi Udo, Thnx for the quick response. I have another doubt to get clarified . In the NonFacesRequest Example, the FishServlet extends NonFacesRequestServlet. This class is specified in web.xml. Can the same servlet be used as a Managed bean (registered in faces-config.xml) ie if it can be referred in a Tobago Page and invoke those methods that are attached to some of the components in that page ?
Re: [Tobago] tx:date EndDate not before BeginDate
I only see 2 options, both standard JSF: 1. check manually in the action method, use facesContext.addMessage() 2. write your own validator I don't know a more declarative way in the moment. Regards, Udo Clemens Sietas schrieb: Hello, I have another question regarding the datepicker. Can I easily ensure in JSF-coding that the selectedVldtyEnd cannot be selected with a smaller date than the selectedVldtyBeg? For example with f:validate... Regards, Clemens tx:date id=vldtyBeg value=#{controller.selectedVldtyBeg} label=#{controller.keyLblValidityBegin} readonly=#{controller.forEditSelected} f:convertDateTime pattern=dd.MM./ /tx:date tx:date id=vldtyEnd value=#{controller.selectedVldtyEnd} label=#{controller.keyLblValidityEnd} f:convertDateTime pattern=dd.MM./ /tx:date
Re: [Tobago] Locale changed when handling exceptions
Hi Alf, where do you call FacesContext.getCurrentInstance().getViewRoot().setLocale(selectedLocale)? Do you use the f:view locale= attribute? Refards, Udo Alf Felis schrieb: Hi all, my assumption was wrong that the session will be invalidated! But my problem still exist... the locale will be overwritten. Any ideas? Regards, Alf -Ursprüngliche Nachricht- Von: Alf Felis alf.fe...@gmx.de Gesendet: 20.01.10 15:27:27 An: MyFaces Discussion users@myfaces.apache.org Betreff: Re: [Tobago] Locale changed when handling exceptions Hi again :) I noticed, that apparently the whole session will be invalidated, because some other attributes will be lost, too. Is there any parameter or something else to disable this behaviour? Regards, Alf - original Nachricht Betreff: [Tobago] Locale changed when handling exceptions Gesendet: Mi, 20. Jan 2010 Von: Alf Felisalf.fe...@gmx.de Hi all, I have a problem with the locale and the error handling. My application provides the possibility to choose the preferred language. I set the selected locale with the following code FacesContext.getCurrentInstance().getViewRoot().setLocale(selectedLocale); Everything works fine until the error page is called. For any exception I use one error page set within the web.xml. error-page exception-typejava.lang.Throwable/exception-type location/faces/ErrorPage.jsp/location /error-page If now an error occurred the locale set by my code above will be overridden and set to the browser locale. How can I avoid this? Best regards, Alf --- original Nachricht Ende
Re: Tobago Renderer with JSF RI
Hi, generally Tobago can not be combined with any other tags libs freely. You can use f: tags, but not h: tags. The main reason is, that in Tobago every container has a layout-manager which set the position of the component. You may use tc:link instead of h:commandLink. An other effect is, that the tc:link will be rendered with the configured theme automatically. Hope that helps. Udo Pierre Martin schrieb: Hi all, I got this project that runs basically with simple JSF RI components. Now I'm trying to include Tobago components in the project. Since I included all the libs required, it seems taht my RI components are trying to get rendered by my tobago renderer. In glassfish I got this stack : Wrong type: Need org.apache.myfaces.tobago.component.UICommand, but was javax.faces.component.html.HtmlCommandLink I'm very new to tobago. Am I doing something wrong? Here is my tobago-config.xml tobago-config theme-config default-themerichmond/default-theme /theme-config resource-dirtobago-resource/resource-dir resource-dirorg/apache/myfaces/tobago/renderkit/resource-dir /tobago-config tanx! -- A man is rich in proportion to the number of things he can afford to let alone. - Thoreau
Re: [TOBAGO] Master-Detail
Hello Fernando, here are the allowedValues = {click, dblclick} of event in tc:columnEvent (I've added this to the docu, now). The tc:attribute is the Tobago-version for f:attribute. The allowed (and reasonable) values for name and value depends on the parent UIComponent. Regards, Udo Fernando Augusto schrieb: Thanks for your help, Marcus. But now comes the doubt... Where can I find which column events can I work with? and, already referring to the last msg I sent, which attributes does tc:attribute accepts and when? Regards, Fernando Augusto Marcus Kröger escreveu: Hi Fernando, pls have a look at the tobago addressbook example. There you can find a solution how to react on click-events in a tobago sheet. For example, by using tc:columnEvent event=dblclick tc:command action=#{controller.editAddress}/ /tc:columnEvent you would react on a double click on the row. The addressbook example can be found in the current build 1.0.24 below /example/addressbook and can be started by using mvn jetty:run-expploded in the war directory. Cheers Marcus 2010/3/9 Fernando Augusto ferna...@osmanager.com.br Hello, I am new to Tobago and to JSF, and I got a problem while thinking in a way to implement a master-detail form, or any way to show the details of a row when clicked on somewhere. The problem is: that action needs to be performed by a *single click* action, for usability reasons. I cant make the user to select a row AND click a button. I was doing it with plain JSF using a commandLink and f:param tag passing the row ID to a method called by the actionListener and then redirecting, using a static action, to another page. But my boss have seen how easy is to make popups and form rendering in Tobago, and asked me to make a Tobago version of our system. Everything seems to be pretty straightforward in tobago, RANT except this and those weird and undocumented tc:attribute uses... I still need to find anything about them... /RANT So, is there a way to implement Master-Detail approach in Tobago??? Best Regards, Fernando Augusto
Re: [Tobago] Problem using JSP tags with attributes
Hi Alf, The expression #{${dataBean}.errors} works in older Servlet APIs with Tobago. It should work until Tomcat 5.5, but doen't work with Tomcat 6.0. It also doesn't work with Facelets, but in Facelets you may use #{dataBean.errors} instead. For JSPs #{dataBean.errors} will work, when dataBean is in some context, it depends on your application, what is the best way to put in in the context. Regards, Udo Am 18.03.10 09:26, schrieb Alf Felis: Hi all, I have a problem using jsp tags with attributes in tobago. Tobago version: 1.0.24-SNAPSHOT Myfaces version: 1.1.6 Tomcat version: 6.0.18 I'm using a tag with the attribute %@ attribute name=dataBean %. If I try to access this attribute inside the tag I get a ParseException. Access: --- tc:sheet value=#{${dataBean}.errors} ... Exception: -- org.apache.commons.el.parser.ParseException: Encountered { at line 1, column 4. Was expecting one of: } ... . ... ... gt ... Is there a problem with the EL parser? Do I have to use a different one? Best regards, Alf
Re: [TOBAGO] formatting fields with tx:in
Hi Fernando, this feature is not implemented yet. A global solution might be, sending the String via AJAX on blur to the Converter and let him Format it. We should add this into JIRA. But I don't know, if I want that while typing. It may be irritating the user. Nevertheless you can realize it for your application writing JavaScript. Regards, Udo Am 17.03.10 17:44, schrieb Fernando Augusto: Hello, Is there a way to make tx:in to format the string passed (like a phone number, or anything like) while the user is typing? I tried f:convertNumber to make the currency format but it is not working. Any help on the issue? Best Regards, Fernando Augusto
Re: [TOBAGO] tx:date in a popup
Hi, It seems to be a bug. It is correct that you tested it with Internet Explorer? With Firefox it works fine. On the demo app, the AJAX variant to open the popup hasn't this bug. Maybe this is a quick workaround for you. Regards, Udo Am 17.03.10 17:41, schrieb Fernando Augusto: Hello, I am using Tobago 1.0.24 and just ran in a weird situation... I have a form inside a popup, that uses tx:date. When I click in the calendar icon, only the modal DIV appears, behind the popup. I must click the calendar again to show it correctly. I already tried to change the modal property of the popup window to false, but the behavior continues... How can I make the calendar icon to appear in a single click, while the form is inside the popup? Best Regards, Fernando Augusto
Re: [Tobago] Problem using JSP tags with attributes
Okay, I think I understand what you need. In Tobago the tx:-library was similar. Take some components and combine it to a new one. But because of the disadvantages of Tag-Files we coded it with Java-Code :-( Did you tried running your app with Tomcat 5.5? There are different solutions. The old solutions doesn't work in new Containers with the new JSF spec. When using Facelets, this will work also with JSF 1.1 and JSF 1.2. There might be an ugly solution, but I didn't tried it: JSP: % request.put(x, Foo) % my:tag/ % request.put(x, Bar) % my:tag/ Tag-File: tc:label value=#{x} / It is ugly, because the parameter x can't be seen and I think it will run only with JSF 1.1, but not with JSF 1.2. You can't use % % in Tag-Files, so you can't nest it. My suggestions is: Use Facelets when you can. The good end: The JSF 2.0 Composite Components is the *real* solution for that issue :-) Regards, Udo Am 18.03.10 16:17, schrieb Alf Felis: I will try to discribe what I am going to do... For example I will create a sheet (panel, box, etc.) which I can use in different pages. The sheet content should be filled from different beans. Some pages should contain the sheet twice with two different beans containing the data to be displayed. How do I solve this problem? My approach was using jsp tag files containing the sheet part with%@ attribute name=... %, but apparently this doesn't work. Possibly there is a better solution? Best regards, Alf
Re: [TOBAGO] tx:date in a popup
Hi Fernando, we have fixed the bug in IE. Can you please test the 1.0.25-SNAPSHOT if it works for you? You have to build it by yourself. Is this okay for you? Regards Udo Am 18.03.10 14:29, schrieb Udo Schnurpfeil: Hi, It seems to be a bug. It is correct that you tested it with Internet Explorer? With Firefox it works fine. On the demo app, the AJAX variant to open the popup hasn't this bug. Maybe this is a quick workaround for you. Regards, Udo Am 17.03.10 17:41, schrieb Fernando Augusto: Hello, I am using Tobago 1.0.24 and just ran in a weird situation... I have a form inside a popup, that uses tx:date. When I click in the calendar icon, only the modal DIV appears, behind the popup. I must click the calendar again to show it correctly. I already tried to change the modal property of the popup window to false, but the behavior continues... How can I make the calendar icon to appear in a single click, while the form is inside the popup? Best Regards, Fernando Augusto
Re: [TOBAGO] SelectOneChoice and Rendered attribute
You may have a type problem. Maybe the itemValue allows only Strings. When you don't set immediate=true you will see an error in that case. You can also use tc:selectItems with a class model. With that integer value should work. The value for tc:attribute is the clientId of the component: This is the chain of all naming containers. On a simple page, you have only tc:page as naming container. Put id=page then you need value=page:panel. You can check the clientId in the HTML Source Code. Am 19.03.10 19:40, schrieb Fernando Augusto: Well... Getting deeper in the problem, I've seen that the problem is in the ajax return, for it does not change the content of the box (or panel). I guess it is something related with the value passed as tc:attribute value. I've seen in a few tutorials and codes around, that addressing nested containers, you should use a long value, full of :, but I couldn't understand that part... Can someone help me with that??? Fernando Augusto escreveu: Hello, I´ve seen that the AJAX part works and the value changes, but the tx:date keeps hidden even with the right value... Any other newbie mistake in the code? Regards, Fernando Augusto Helmut Swaczinna escreveu: I think, yes, this should work too. Helmut Am 19.03.2010 15:58, schrieb ferna...@osmanager.com.br: Helmut, Can I do it with the tc:box they are inside? Regards, Fernando Augusto Hi Fernando, add a command tag to the selectOneChoice and enclose the selectOneChoice and date within a panel: tc:panel id=panel tx:selectOneChoice ... f:facet name=change tc:command tc:attribute name=renderedPartially value=panel/ /tc:command /f:facet /tx:selectOneChoice tx:date ... /tc:panel Now the panel gets reloaded by Ajax, when the selection changes. Regards Helmut
Re: [TOBAGO] Controls self-adjusted in the page
Hi Fernando, a usual solution is to have a start/welcome/waiting page. This page may automatically forwards to your application, after checking the size of the browser (which will be done automatically). You can also use a login page for that. Is this a solution for you? If not, you may call the Tobago page with a script, and add the browser size as parameter, but this is not the preferred solution. I, don't know why you have wrong sizes on your 2nd page. Have you a simple example for that? Regards, Udo Am 23.03.10 04:52, schrieb Fernando Augusto: Hello, While working with my app using TOBAGO 1.0.25-SNAPSOT, I found the following situation: I use GridLayout with * sizes in some rows and columns. When the page is first loaded, the page organization is quite messy, with heights and widths different from the window size. When it first repaints, the controls are ALMOST (by 50px error) aligned correctly. When the screen is repainted in the 2nd time, the controls are correctly placed. How do I fix it, so the controls can be fit the first time the page is loaded??? Best Regards, Fernando Augusto
Re: [TOBAGO] Controls self-adjusted in the page
In Tobago 1.5 the layout management (was rewritten) a moved to core. Udo Am 23.03.10 04:55, schrieb Fernando Augusto: Another question regarding GridLayout class... Why is it inside scarborough theme JAR instead of a core jar, that will be distributed even if I change themes and remove scarborough Fernando Em Ter, 2010-03-23 às 00:52 -0300, Fernando Augusto escreveu: Hello, While working with my app using TOBAGO 1.0.25-SNAPSOT, I found the following situation: I use GridLayout with * sizes in some rows and columns. When the page is first loaded, the page organization is quite messy, with heights and widths different from the window size. When it first repaints, the controls are ALMOST (by 50px error) aligned correctly. When the screen is repainted in the 2nd time, the controls are correctly placed. How do I fix it, so the controls can be fit the first time the page is loaded??? Best Regards, Fernando Augusto
Re: [TOBAGO] Controls self-adjusted in the page
For Tobago 1.0 it is a good thing to put a managed bean in the session, which manages the layout sizes like: tc:page state=#{layout} width=#{layout.width} height=#{layout.height} The bean has to implement PageState or extend PageStateImpl resp. With this bean you can also influence min/max values for your application. When the bean in in the session, the sizing also works when the user reloads a page directly in the browser. Regards, Udo Am 23.03.10 15:25, schrieb Fernando Augusto: Hey Udo, Thanks for your support again. I already have a login form in the app, and what happens is: 1 - Login Form (the login page has a rows/columns problem and the form doesn't want to be in the center, but I am trying to fix it myself). User uses ID/PWD and validates itself; 2 - Main Form (with the alignment problem stated here). Clicking in the buttons or menus and making the page refresh a few times makes the appearance get better. @Udo: I am sending you in PVT the URL, with login/pwd for you to see the problem. Best Regards, Fernando Augusto Udo Schnurpfeil escreveu: Hi Fernando, a usual solution is to have a start/welcome/waiting page. This page may automatically forwards to your application, after checking the size of the browser (which will be done automatically). You can also use a login page for that. Is this a solution for you? If not, you may call the Tobago page with a script, and add the browser size as parameter, but this is not the preferred solution. I, don't know why you have wrong sizes on your 2nd page. Have you a simple example for that? Regards, Udo Am 23.03.10 04:52, schrieb Fernando Augusto: Hello, While working with my app using TOBAGO 1.0.25-SNAPSOT, I found the following situation: I use GridLayout with * sizes in some rows and columns. When the page is first loaded, the page organization is quite messy, with heights and widths different from the window size. When it first repaints, the controls are ALMOST (by 50px error) aligned correctly. When the screen is repainted in the 2nd time, the controls are correctly placed. How do I fix it, so the controls can be fit the first time the page is loaded??? Best Regards, Fernando Augusto
Re: grid layouts in Tobago
Hi tobagouser, you can put 2 tc:panel in the box like this: tc:box f:facet name=layout tc:gridLayout columns=*;*/ /f:facet tc:panel f:facet name=layout tc:gridLayout rows=fixed;fixed/ /f:facet tc:in/ tc:in/ tc:in/ /tc:panel tc:panel f:facet name=layout tc:gridLayout rows=fixed;fixed/ /f:facet tc:in/ tc:selectOneChoice/ tc:in/ /tc:panel /tc:box but I'm not sure I understand what you need. If I'm wrong please send a little picture of the layout you wish. Regards, Udo Am 16.04.10 11:00, schrieb tobagouser: Any suggestions on this please.. tobagouser wrote: HI All, I am using tobago to put some pages.I have a requirement, Inside a box left part is having input rows (tc:in) and remaining half right part has a separate border and css and has input rows (tc:in and select boxes). I can not have a single grid layout and have them left rows and right rows in different columns.because the input rows in the left half and right half are not in same Order.They are in zigzag manner.so I need to have a separate gridlayout for left half and separate gridlayout for right half. Could you please let me know whether it is separate gridlayouts for left and right portion of the box (screen). Please let me know how to implement it. Thanks KSK
Re: [TOBAGO] problem selecting current item in tx:selectOneChoice
Hi, there is still a little problem with that. #{0} is a Long value, so the getter/setter needs be a also a Long and not an Integer. I don't know, if in EL there is something like a cast operator... Regards, Udo Am 22.04.10 18:20, schrieb Volker Weber: Hi Michael, (btw yes i work together with Dirk Fangohr. sorry for the delay, was a bit busy last Friday) the problem is you has int as value in getActive() but String in select items. Try tc:selectItem itemValue=#{2} itemLabel=active/ tc:selectItem itemValue=#{1} itemLabel=suspended/ tc:selectItem itemValue=#{0} itemLabel=inactice/ you don't need a converter! Regards, Volker 2010/4/21 Michael Kakuschkykakusc...@elbe-net.de: Hello, I have a strange problem selecting the correct item of tx:selectOneChoice boxes if the itemValue of the tc:selectItem item is an Integer. Storing the selected values works fine as aspected. I will find the correct values in mybackend database What does not work is that after rerendering the correct value is selected. If in my example the MyController.active Integer attribute has a value of 1 suspended should be selected. But it's always the first value of the tc:selectItem elements selected. I tried already to use a converter because I guessed that there is an conversion problem between Integer and String but it does not help. If the selectItem bind to a String it works fine (sure without the integerConverter). With the tomahawk h:selectOneMenu component it works also with Integers. Knows anybody how to solve this problem for tobago to use an Integer as value attribute? tc:cell tx:selectOneChoice value=#{myController.active} label=active converter=integerConverter tc:selectItem itemValue=2 itemLabel=active/ tc:selectItem itemValue=1 itemLabel=suspended/ tc:selectItem itemValue=0 itemLabel=inactice/ /tx:selectOneChoice /tc:cell public class MyController{ private Integer active = 1; public Integer getActive() { return active; } public void setActive(Integer active) { this.active = active; } } public class IntegerConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { return Integer.getInteger(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { if (value instanceof Integer) { return ((Integer) value).toString(); } return ; } } Thanks and best regards Michael
Re: [TOBAGO] How to add new css to Tobago
Hi, The simple way: You can also put a file style/style.css (exactly this name) in the webapp directory. The ResourceManager will find it and add it to the list of needed resources. The style will be effect all Tobago pages in one application. Helmut solution is also possible. The advantage is, you can decide, which pages need the style. It is also possible to make changes in more than one theme, if needed. If you want to make bigger changes to the design of the pages (specially for more than one application), you may want to write a Tobago theme, that contains your custom look and feel. Regards, Udo Am 22.04.10 15:55, schrieb Helmut Swaczinna: Hi, wich style.css do you mean exactly? Where is it located? You can add your own styles with the tc:style tag, e.g. tc:style style=style/mystyles.css /, under your resource path. Regards Helmut Am 22.04.2010 15:51, schrieb tobagouser: Any inputs on this please.. tobagouser wrote: Hi All, I have tried to add tobago-box-footer to the style.css ,but it never affected the pages.Please could you let me know how to add a new css to tobago. Thanks, KSK
Re: [TOBAGO] problem selecting current item in tx:selectOneChoice
Hi Michael, there are more than one solution for that, but as far as I know there is not cast operator... 1. use a managed bean faces-config.xml: managed-bean managed-bean-nameintValues/managed-bean-name managed-bean-classjava.util.ArrayList/managed-bean-class managed-bean-scopeapplication/managed-bean-scope !-- or use none -- list-entries value-classjava.lang.Integer/value-class value0/value value1/value value2/value /list-entries /managed-bean JSP/Facelet: tc:selectItem itemValue=#{intValues[1]} itemLabel=suspended/ (simple, scales not good, works with JSF 1.1, 1.2 and JSP and Facelets) 2. write a EL-function AFAIK: works with facelets and/or JSF 1.2 but may not work with JSP and JSF 1.1. What do you are using? 3. write a converter that implements the list, or map interface and use it as managed bean (a little bit complicated, scales good, works with JSF 1.1, 1.2 and JSP and Facelets) 4. write an additional getter/setter activeLong. (needs Java) 5. use tc:selectItems (instead of tc:selectItem) and you may also want to use enums. (may be the best solution but more work, needs Java 1.5, scales good, refactoring is easy: there is only one position in the code to define the values, type save: use the enum in your Controller, so you know the meaning of the value from the enum) For a simple application or demo I would prefer #1 or #4, for an enterprise application I would prefer #5... Regards, Udo Am 22.04.10 22:33, schrieb Michael Kakuschky: Hello Udo, hello Volker, both together (using braces for EL expression and long data type for getter and setter) helped to get the tx:selectOneChoice working like expected :-) Since I use many int getters and setters where I want to use the tx:selectOneChoice component it would be nice if there is some way to convert the int to long in EL. It would help to save a lot of work.. Thanks best regards Michael Udo Schnurpfeil schrieb: Hi, there is still a little problem with that. #{0} is a Long value, so the getter/setter needs be a also a Long and not an Integer. I don't know, if in EL there is something like a cast operator... Regards, Udo Am 22.04.10 18:20, schrieb Volker Weber: Hi Michael, (btw yes i work together with Dirk Fangohr. sorry for the delay, was a bit busy last Friday) the problem is you has int as value in getActive() but String in select items. Try tc:selectItem itemValue=#{2} itemLabel=active/ tc:selectItem itemValue=#{1} itemLabel=suspended/ tc:selectItem itemValue=#{0} itemLabel=inactice/ you don't need a converter! Regards, Volker 2010/4/21 Michael Kakuschkykakusc...@elbe-net.de: Hello, I have a strange problem selecting the correct item of tx:selectOneChoice boxes if the itemValue of the tc:selectItem item is an Integer. Storing the selected values works fine as aspected. I will find the correct values in mybackend database What does not work is that after rerendering the correct value is selected. If in my example the MyController.active Integer attribute has a value of 1 suspended should be selected. But it's always the first value of the tc:selectItem elements selected. I tried already to use a converter because I guessed that there is an conversion problem between Integer and String but it does not help. If the selectItem bind to a String it works fine (sure without the integerConverter). With the tomahawk h:selectOneMenu component it works also with Integers. Knows anybody how to solve this problem for tobago to use an Integer as value attribute? tc:cell tx:selectOneChoice value=#{myController.active} label=active converter=integerConverter tc:selectItem itemValue=2 itemLabel=active/ tc:selectItem itemValue=1 itemLabel=suspended/ tc:selectItem itemValue=0 itemLabel=inactice/ /tx:selectOneChoice /tc:cell public class MyController{ private Integer active = 1; public Integer getActive() { return active; } public void setActive(Integer active) { this.active = active; } } public class IntegerConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { return Integer.getInteger(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { if (value instanceof Integer) { return ((Integer) value).toString(); } return ; } } Thanks and best regards Michael
Re: [TOBAGO] problem selecting current item in tx:selectOneChoice
Hi Michael, I've thought about that problem and implemented a solution that works for the most cases. See: https://issues.apache.org/jira/browse/TOBAGO-877 With the current sources your example should work now, without any of the modifications I told you. Which version of JSF you are using? The f:selectItem works not with JSF 1.1, but the tc:selectItem works with 1.1 and 1.2. Regards, Udo Am 23.04.10 09:59, schrieb Udo Schnurpfeil: Hi Michael, there are more than one solution for that, but as far as I know there is not cast operator... 1. use a managed bean faces-config.xml: managed-bean managed-bean-nameintValues/managed-bean-name managed-bean-classjava.util.ArrayList/managed-bean-class managed-bean-scopeapplication/managed-bean-scope !-- or use none -- list-entries value-classjava.lang.Integer/value-class value0/value value1/value value2/value /list-entries /managed-bean JSP/Facelet: tc:selectItem itemValue=#{intValues[1]} itemLabel=suspended/ (simple, scales not good, works with JSF 1.1, 1.2 and JSP and Facelets) 2. write a EL-function AFAIK: works with facelets and/or JSF 1.2 but may not work with JSP and JSF 1.1. What do you are using? 3. write a converter that implements the list, or map interface and use it as managed bean (a little bit complicated, scales good, works with JSF 1.1, 1.2 and JSP and Facelets) 4. write an additional getter/setter activeLong. (needs Java) 5. use tc:selectItems (instead of tc:selectItem) and you may also want to use enums. (may be the best solution but more work, needs Java 1.5, scales good, refactoring is easy: there is only one position in the code to define the values, type save: use the enum in your Controller, so you know the meaning of the value from the enum) For a simple application or demo I would prefer #1 or #4, for an enterprise application I would prefer #5... Regards, Udo Am 22.04.10 22:33, schrieb Michael Kakuschky: Hello Udo, hello Volker, both together (using braces for EL expression and long data type for getter and setter) helped to get the tx:selectOneChoice working like expected :-) Since I use many int getters and setters where I want to use the tx:selectOneChoice component it would be nice if there is some way to convert the int to long in EL. It would help to save a lot of work.. Thanks best regards Michael Udo Schnurpfeil schrieb: Hi, there is still a little problem with that. #{0} is a Long value, so the getter/setter needs be a also a Long and not an Integer. I don't know, if in EL there is something like a cast operator... Regards, Udo Am 22.04.10 18:20, schrieb Volker Weber: Hi Michael, (btw yes i work together with Dirk Fangohr. sorry for the delay, was a bit busy last Friday) the problem is you has int as value in getActive() but String in select items. Try tc:selectItem itemValue=#{2} itemLabel=active/ tc:selectItem itemValue=#{1} itemLabel=suspended/ tc:selectItem itemValue=#{0} itemLabel=inactice/ you don't need a converter! Regards, Volker 2010/4/21 Michael Kakuschkykakusc...@elbe-net.de: Hello, I have a strange problem selecting the correct item of tx:selectOneChoice boxes if the itemValue of the tc:selectItem item is an Integer. Storing the selected values works fine as aspected. I will find the correct values in mybackend database What does not work is that after rerendering the correct value is selected. If in my example the MyController.active Integer attribute has a value of 1 suspended should be selected. But it's always the first value of the tc:selectItem elements selected. I tried already to use a converter because I guessed that there is an conversion problem between Integer and String but it does not help. If the selectItem bind to a String it works fine (sure without the integerConverter). With the tomahawk h:selectOneMenu component it works also with Integers. Knows anybody how to solve this problem for tobago to use an Integer as value attribute? tc:cell tx:selectOneChoice value=#{myController.active} label=active converter=integerConverter tc:selectItem itemValue=2 itemLabel=active/ tc:selectItem itemValue=1 itemLabel=suspended/ tc:selectItem itemValue=0 itemLabel=inactice/ /tx:selectOneChoice /tc:cell public class MyController{ private Integer active = 1; public Integer getActive() { return active; } public void setActive(Integer active) { this.active = active; } } public class IntegerConverter implements Converter { public Object getAsObject(FacesContext context, UIComponent component, String value) throws ConverterException { return Integer.getInteger(value); } public String getAsString(FacesContext context, UIComponent component, Object value) throws ConverterException { if (value instanceof Integer) { return ((Integer) value).toString(); } return ; } } Thanks and best regards Michael
Re: [TOBAGO] How to add new css to Tobago
Hi, there is no style class tobago-box-footer defined for any HTML tag. So the style will not be applied. When you want to give some panels a different style, you can assign a markup like: tc:panel markup=important ... this will result in HTML with the class tobago-panel-markup-important. Than you can define a style for that class. First, you have to register a markup for a renderer. See: http://myfaces.apache.org/tobago/faq.html#tobagocustommarkup If you want to see which styles from which files will be applied, you may use Firebug, or any other browser development tool, which are very helpful. Regards, Udo Am 26.04.10 20:06, schrieb tobagouser: Hi Udo,Helmut Thanks for the info.Its really useful. My requirements are 1.I want to have a different background color and shade to some of the panels in the pages.This color and shade should be different from the default panel css ,so it should have a different css . 2.As mentioned earlier I want to add a new css to the border footer.I added it similar to the box header css in the speyside style.css file ..like .tobago-box-footer { values here... } But this footer css never applied on the pages. please let me know whether tc:style tag applies at the page level only or applies at the child tags like panel and box. also please let me know how to add a new css to box footer and why the above css does not worked. Thanks, KSK Udo Schnurpfeil wrote: Hi, The simple way: You can also put a file style/style.css (exactly this name) in the webapp directory. The ResourceManager will find it and add it to the list of needed resources. The style will be effect all Tobago pages in one application. Helmut solution is also possible. The advantage is, you can decide, which pages need the style. It is also possible to make changes in more than one theme, if needed. If you want to make bigger changes to the design of the pages (specially for more than one application), you may want to write a Tobago theme, that contains your custom look and feel. Regards, Udo Am 22.04.10 15:55, schrieb Helmut Swaczinna: Hi, wich style.css do you mean exactly? Where is it located? You can add your own styles with the tc:style tag, e.g.tc:style style=style/mystyles.css /, under your resource path. Regards Helmut Am 22.04.2010 15:51, schrieb tobagouser: Any inputs on this please.. tobagouser wrote: Hi All, I have tried to add tobago-box-footer to the style.css ,but it never affected the pages.Please could you let me know how to add a new css to tobago. Thanks, KSK
Re: [TOBAGO] problem selecting current item in tx:selectOneChoice
I've fixed it in the current trunk and the current 1.0.x branch, so it will be available in version 1.0.26. (See my mail form 23. April, 23:19 CEST) Regards Udo I'm not really understanding why the mapping does not works with tc:selectItem but for know I have a working solution.
Re: [Tobago] foreach in c:sheet
Hello Hani, I've never tried to use c:set, so I have no experience with that tag. Your code will not work, because the content inside of the tc:sheet will be visited only one time. The JSTL Tag needs to be called in each row to make it work. Mixing JSTL and JSF and use of iterators have some drawbacks. This depends also on the version of the libraries. Which version you are using? You may try to make your data accessible via the var-attribute of the sheet: tc:sheet var=row ... ... tc:column tc:out value=#{row.subListAsString} / /tc:column ... /tc:sheet Regards, Udo Am 20.05.10 16:39, schrieb Abushammala, Hani (EXTERN: FTP): Hello, We want to visualize some dynamic content within a column for each row of sheet with jstl. We tried to incrment a variable (defined outside of the tc:sheet element) with:c:set var=counter value=${counter + 1} / to get the row index, but it doesn't work. Jsp: tc:sheet .. ... tc:column c:set var=counter value=${counter + 1} / c:forEach items=${bean.itmesList[counter].subList} var=w varStatus=status tc:out value=${w} / /c:forEach /tc:column ... /tc:sheet Is it possible and how? Thank you.
Re: [Tobago] foreach in c:sheet
Hi Hani, to find the optimal solution for your problem it whould be helpful to have a screenshot of your app. The question is: is the number of links in one column limited? Are the links mostly the same, or are they completely independent? When we have limited links, we can use static links with rendered attributes and we don't have to create lots of components in each row. Regards, Udo Am 27.05.10 12:04, schrieb Abushammala, Hani (EXTERN: FTP): Hi Volker, By component binding i used actually your tip for using rendered attribut (thank you!) After creating the main panel and his children panels for each row of the sheet, i've defined the rendered attribut of the children panels with: ComponentUtil.setBooleanProperty(childPanel /* the i child panel */, TobagoConstants.ATTR_RENDERED, #{ + sheetVar + .index == + item.getIndex() /* for i child panel */ + }); So that the first panel will be in rendered in the first row and the rest of panels will be disabled and etc. It works fine, but i need a better solution. The jstl way works also, but all panels will be displayed in each row of sheet. I didn't think about a new implementation of the UIPanel, i will try this one now. Thank you Regards, Hani -Ursprüngliche Nachricht- Von: weber.vol...@googlemail.com [mailto:weber.vol...@googlemail.com] Im Auftrag von Volker Weber Gesendet: Donnerstag, 27. Mai 2010 09:45 An: MyFaces Discussion Betreff: Re: [Tobago] foreach in c:sheet Hi, as Udo wrote, you can't use jstl inside tc:sheet! Or to be more precise: the var param of tc:sheet is not available when jstl iterates, because jstl evaluates before tobago starts renderring. I also can't imagine how you do this with component binding, because this is also done before rendering starts. Can you explain how you do this? But there is a way to solve this, you need binding to a extended UIPanel implementation which drops and recreates children depending on sheets var in each process* method. Regards, Volker 2010/5/27 Abushammala, Hani (EXTERN: FTP) extern.hani.abushamma...@volkswagen.de: Hello Udo, Sorry, i forget to list the important libraries in use: avalon-framework-4.1.3.jar tobago-core-1.0.24.jar jstl-1.1.0.jar myfaces-impl-1.1.7.jar myfaces-api-1.1.7.jar commons-el-1.0.jar standard-1.1.2.jar Thank you. -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Mittwoch, 26. Mai 2010 15:12 An: MyFaces Discussion Betreff: AW: [Tobago] foreach in c:sheet Hello Udo, I want to add a dynamic panel to a column, which has many elements for each row in the sheet, that means the content of the panel for each row is different (like sheet in sheet). I could do it with programming of whole panel in java and binding it in the jsp, but i am looking now for a different way. I've tried to use jstl, but it doesn`t work to render the right dynamic panel for right row: tc:column sortable=false align=left tc:panel id=headPanel c:forEach items=${myBean.list} var=x varStatus=status1 tc:panel id=subPanel${x.nr} rendered=${status1.index} == ${x.nr} c:forEach items=${x.subList} var=w varStatus=status2 tc:link image=${w.iconUrl} id=link_${x.nr}_${w.nr} / /c:forEach /tc:panel /c:forEach /tc:panel /tc:column I've used jstl 1.1. Thank you. -Ursprüngliche Nachricht- Von: Udo Schnurpfeil [mailto:u...@schnurpfeil.de] Gesendet: Dienstag, 25. Mai 2010 09:16 An: users@myfaces.apache.org Betreff: Re: [Tobago] foreach in c:sheet Hello Hani, I've never tried to usec:set, so I have no experience with that tag. Your code will not work, because the content inside of thetc:sheet will be visited only one time. The JSTL Tag needs to be called in each row to make it work. Mixing JSTL and JSF and use of iterators have some drawbacks. This depends also on the version of the libraries. Which version you are using? You may try to make your data accessible via the var-attribute of the sheet: tc:sheet var=row ... ... tc:column tc:out value=#{row.subListAsString} / /tc:column ... /tc:sheet Regards, Udo Am 20.05.10 16:39, schrieb Abushammala, Hani (EXTERN: FTP): Hello, We want to visualize some dynamic content within a column for each row of sheet with jstl. We tried to incrment a variable (defined outside of the tc:sheet element) with:c:set var=counter value=${counter + 1} /to get the row index, but it doesn't work. Jsp: tc:sheet .. ... tc:column c:set var=counter value=${counter + 1} / c:forEach items
Re: [Tobago] foreach in c:sheet
Hi Hani, didn't you sent the image or removes the list the attachment? If so, you can also send me the image directly... Regards, Udo Am 31.05.10 09:22, schrieb Abushammala, Hani (EXTERN: FTP): Sorry, i forget to attach the image. Regards, Hani -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Freitag, 28. Mai 2010 12:00 An: MyFaces Discussion Betreff: AW: [Tobago] foreach in c:sheet Hi Udo, To explain the problematic i will use the same image in topic [Tobago] dynamic panels in tc:sheet. I want to create panel within a column to visualize a list of dynamic items as icons for each row of the sheet and the elements of the sheet has a list of the elements to visualize. Also the panel in each row is completely independent, so that the number of elements to visualize is not limted and the links of elements has differnent attributes. Thank you for the help. Regards, Hani -Ursprüngliche Nachricht- Von: Udo Schnurpfeil [mailto:u...@schnurpfeil.de] Gesendet: Freitag, 28. Mai 2010 09:30 An: users@myfaces.apache.org Betreff: Re: [Tobago] foreach in c:sheet Hi Hani, to find the optimal solution for your problem it whould be helpful to have a screenshot of your app. The question is: is the number of links in one column limited? Are the links mostly the same, or are they completely independent? When we have limited links, we can use static links with rendered attributes and we don't have to create lots of components in each row. Regards, Udo Am 27.05.10 12:04, schrieb Abushammala, Hani (EXTERN: FTP): Hi Volker, By component binding i used actually your tip for using rendered attribut (thank you!) After creating the main panel and his children panels for each row of the sheet, i've defined the rendered attribut of the children panels with: ComponentUtil.setBooleanProperty(childPanel /* the i child panel */, TobagoConstants.ATTR_RENDERED, #{ + sheetVar + .index == + item.getIndex() /* for i child panel */ + }); So that the first panel will be in rendered in the first row and the rest of panels will be disabled and etc. It works fine, but i need a better solution. The jstl way works also, but all panels will be displayed in each row of sheet. I didn't think about a new implementation of the UIPanel, i will try this one now. Thank you Regards, Hani -Ursprüngliche Nachricht- Von: weber.vol...@googlemail.com [mailto:weber.vol...@googlemail.com] Im Auftrag von Volker Weber Gesendet: Donnerstag, 27. Mai 2010 09:45 An: MyFaces Discussion Betreff: Re: [Tobago] foreach in c:sheet Hi, as Udo wrote, you can't use jstl inside tc:sheet! Or to be more precise: the var param of tc:sheet is not available when jstl iterates, because jstl evaluates before tobago starts renderring. I also can't imagine how you do this with component binding, because this is also done before rendering starts. Can you explain how you do this? But there is a way to solve this, you need binding to a extended UIPanel implementation which drops and recreates children depending on sheets var in each process* method. Regards, Volker 2010/5/27 Abushammala, Hani (EXTERN: FTP) extern.hani.abushamma...@volkswagen.de: Hello Udo, Sorry, i forget to list the important libraries in use: avalon-framework-4.1.3.jar tobago-core-1.0.24.jar jstl-1.1.0.jar myfaces-impl-1.1.7.jar myfaces-api-1.1.7.jar commons-el-1.0.jar standard-1.1.2.jar Thank you. -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Mittwoch, 26. Mai 2010 15:12 An: MyFaces Discussion Betreff: AW: [Tobago] foreach in c:sheet Hello Udo, I want to add a dynamic panel to a column, which has many elements for each row in the sheet, that means the content of the panel for each row is different (like sheet in sheet). I could do it with programming of whole panel in java and binding it in the jsp, but i am looking now for a different way. I've tried to use jstl, but it doesn`t work to render the right dynamic panel for right row: tc:column sortable=false align=left tc:panel id=headPanel c:forEach items=${myBean.list} var=x varStatus=status1 tc:panel id=subPanel${x.nr} rendered=${status1.index} == ${x.nr} c:forEach items=${x.subList} var=w varStatus=status2 tc:link image=${w.iconUrl} id=link_${x.nr}_${w.nr} / /c:forEach /tc:panel /c:forEach /tc:panel /tc:column I've used jstl 1.1. Thank you. -Ursprüngliche Nachricht- Von: Udo Schnurpfeil [mailto:u...@schnurpfeil.de
Re: [Tobago] foreach in c:sheet
Hi Hani, I got your image, finally. When the boxes are a kind of rating, you may use only one image and vary the value from rating0.gif to rating5.gif like here http://www.macdesktops.net/core/images/rating2.gif Another solution may be using tc:progress instead of tc:image. (Unfortunately there is a little style problem with tc:progress inside of tc:sheet (line break between the elements, when the column is too small), but I will fix it in the next version) Hope that helps Udo Am 01.06.10 09:49, schrieb Udo Schnurpfeil: Hi Hani, didn't you sent the image or removes the list the attachment? If so, you can also send me the image directly... Regards, Udo Am 31.05.10 09:22, schrieb Abushammala, Hani (EXTERN: FTP): Sorry, i forget to attach the image. Regards, Hani -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Freitag, 28. Mai 2010 12:00 An: MyFaces Discussion Betreff: AW: [Tobago] foreach in c:sheet Hi Udo, To explain the problematic i will use the same image in topic [Tobago] dynamic panels in tc:sheet. I want to create panel within a column to visualize a list of dynamic items as icons for each row of the sheet and the elements of the sheet has a list of the elements to visualize. Also the panel in each row is completely independent, so that the number of elements to visualize is not limted and the links of elements has differnent attributes. Thank you for the help. Regards, Hani -Ursprüngliche Nachricht- Von: Udo Schnurpfeil [mailto:u...@schnurpfeil.de] Gesendet: Freitag, 28. Mai 2010 09:30 An: users@myfaces.apache.org Betreff: Re: [Tobago] foreach in c:sheet Hi Hani, to find the optimal solution for your problem it whould be helpful to have a screenshot of your app. The question is: is the number of links in one column limited? Are the links mostly the same, or are they completely independent? When we have limited links, we can use static links with rendered attributes and we don't have to create lots of components in each row. Regards, Udo Am 27.05.10 12:04, schrieb Abushammala, Hani (EXTERN: FTP): Hi Volker, By component binding i used actually your tip for using rendered attribut (thank you!) After creating the main panel and his children panels for each row of the sheet, i've defined the rendered attribut of the children panels with: ComponentUtil.setBooleanProperty(childPanel /* the i child panel */, TobagoConstants.ATTR_RENDERED, #{ + sheetVar + .index == + item.getIndex() /* for i child panel */ + }); So that the first panel will be in rendered in the first row and the rest of panels will be disabled and etc. It works fine, but i need a better solution. The jstl way works also, but all panels will be displayed in each row of sheet. I didn't think about a new implementation of the UIPanel, i will try this one now. Thank you Regards, Hani -Ursprüngliche Nachricht- Von: weber.vol...@googlemail.com [mailto:weber.vol...@googlemail.com] Im Auftrag von Volker Weber Gesendet: Donnerstag, 27. Mai 2010 09:45 An: MyFaces Discussion Betreff: Re: [Tobago] foreach in c:sheet Hi, as Udo wrote, you can't use jstl inside tc:sheet! Or to be more precise: the var param of tc:sheet is not available when jstl iterates, because jstl evaluates before tobago starts renderring. I also can't imagine how you do this with component binding, because this is also done before rendering starts. Can you explain how you do this? But there is a way to solve this, you need binding to a extended UIPanel implementation which drops and recreates children depending on sheets var in each process* method. Regards, Volker 2010/5/27 Abushammala, Hani (EXTERN: FTP) extern.hani.abushamma...@volkswagen.de: Hello Udo, Sorry, i forget to list the important libraries in use: avalon-framework-4.1.3.jar tobago-core-1.0.24.jar jstl-1.1.0.jar myfaces-impl-1.1.7.jar myfaces-api-1.1.7.jar commons-el-1.0.jar standard-1.1.2.jar Thank you. -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Mittwoch, 26. Mai 2010 15:12 An: MyFaces Discussion Betreff: AW: [Tobago] foreach in c:sheet Hello Udo, I want to add a dynamic panel to a column, which has many elements for each row in the sheet, that means the content of the panel for each row is different (like sheet in sheet). I could do it with programming of whole panel in java and binding it in the jsp, but i am looking now for a different way. I've tried to use jstl, but it doesn`t work to render the right dynamic panel for right row: tc:column sortable=false align
Re: [Tobago] Problem using tc:tree and request parameters
Hi Alf, I've some questions: Which Tobago version and which JSF implementation and version you are using (and which container)? In which scope is the managed bean that holds the state? I don't exactly know what happens, because I've not the sources of you code. But I can try some supposition... The usual usage of Tobago is to write an application, with one or more pages that will be called by clicking on some controls on the page. It was a difference of calling the URL and clicking a tc:button. The click on a button will submit the current expansion state of the tree and sends it to the server (via a hidden input field), which manipulates the tree state object. When calling the URL (manually) the expansion state information is not part of the request. When JSF now restores the UIViewRoot and begins to decode the request it clears the expand state and tries to apply the new information from the browser (which are not available in this case). It is correct, that you want to provide external links (non faces request to faces response)? Are you also use internal actions? If not, you don't need to save the expansion state for each user. You can try to put the tree state in the none scope. Regards, Udo Am 15.06.10 15:51, schrieb Alf Felis: Any idea? Original-Nachricht Datum: Thu, 03 Jun 2010 13:31:44 +0200 Von: Alf Felisalf.fe...@gmx.de An: MyFaces Discussionusers@myfaces.apache.org Betreff: [Tobago] Problem using tc:tree and request parameters Hi all, I have a problem with tc:tree. In my code I expand the tree after creation using the TreeState: state.expand(tree, 1); This works fine till I use a request parameter... e.g. http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp?param=123 In this case the first/initial call will show an expanded tree... the second call shows a collapsed tree. - first and second call with parameter: - 1.) Call the URL - tree expanded 2.) Reload the URL - tree collapsed - first call with, second without parameter: - 1.) Call the URL - tree expanded 2.) Call http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp - tree expanded 3.) any call/reload without parameter - tree expanded I figured out that the method 'TreeState.clearExpandState()' will be called, but I can't find any hints on that issue. Regards, Alf
Re: [Tobago] calling of renderer class
Hi, there is also an example-theme in the project (https://svn.apache.org/repos/asf/myfaces/tobago/branches/tobago-1.0.x/example/tobago-theme-example/) which overrides the InRenderer. Regards Udo Am 23.06.10 09:45, schrieb Volker Weber: Hi Hani, the easiest way to overwrite a Renderer is to put your own int the tobago-resource-path into your application. e.g. if you use the speyside theme put your renderer, which must be named SheetRenderer, into the package tobago-resource-path/html/standard/speyside/tag/ Regards, Volker 2010/6/21 Abushammala, Hani (EXTERN: FTP) extern.hani.abushamma...@volkswagen.de: Another question. How can i configure another renderer for the tobago component like the sheet component. Any ideas or solutions? Regards, Hani -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Montag, 21. Juni 2010 09:52 An: MyFaces Discussion Betreff: [Tobago] calling of renderer class Hi, I`ve developed a component to create a dynamic panel with a renderer class, but the renderer could not be called. The rendering works if the compoent class renders the output stream. I don`t know how i can configure the renderer for the new component in tobago. faces-config.xml: component descriptionThe dynamic panel component./description display-nameDynamicPanel/display-name !-- The name for registering the component. -- component-typeextn.DynamicPanel/component-type !-- The implementation class. -- component-classweb.components.UIDynamicPanel/component-class component-extension renderer-typeextn.DynamicPanelRenderer/renderer-type /component-extension /component render-kit renderer descriptionRenderer for DynamicPanel./description component-familyextn.DynamicPanelFamily/component-family renderer-typeextn.DynamicPanelRenderer/renderer-type renderer-classweb.components.DynamicPanelRenderer/renderer-class /renderer /render-kit Regards, Hani
Re: [Tobago] calling of renderer class
Hallo Hani, I'm not know exactly what you need. I assume, you have a sheet with headers, and the headers should have more than one row? Do you needed wrapping of the text in one header element, or do you need to have two header elements (with border etc.?). A feature like this will be added in Tobago 1.5, but is not scheduled yet. Regards, Udo Am 25.06.10 10:38, schrieb Abushammala, Hani (EXTERN: FTP): Thanks for the Info. I`m trying now to extend the sheet renderer to visualize a label in two rows (or one label for each header row) in the header of the sheet. Is this the best way or is there another way to solve it? Regards, Hani -Ursprüngliche Nachricht- Von: Udo Schnurpfeil [mailto:u...@schnurpfeil.de] Gesendet: Freitag, 25. Juni 2010 07:46 An: users@myfaces.apache.org Betreff: Re: [Tobago] calling of renderer class Hi, there is also an example-theme in the project (https://svn.apache.org/repos/asf/myfaces/tobago/branches/tobago-1.0.x/example/tobago-theme-example/) which overrides the InRenderer. Regards Udo Am 23.06.10 09:45, schrieb Volker Weber: Hi Hani, the easiest way to overwrite a Renderer is to put your own int the tobago-resource-path into your application. e.g. if you use the speyside theme put your renderer, which must be named SheetRenderer, into the package tobago-resource-path/html/standard/speyside/tag/ Regards, Volker 2010/6/21 Abushammala, Hani (EXTERN: FTP) extern.hani.abushamma...@volkswagen.de: Another question. How can i configure another renderer for the tobago component like the sheet component. Any ideas or solutions? Regards, Hani -Ursprüngliche Nachricht- Von: Abushammala, Hani (EXTERN: FTP) [mailto:extern.hani.abushamma...@volkswagen.de] Gesendet: Montag, 21. Juni 2010 09:52 An: MyFaces Discussion Betreff: [Tobago] calling of renderer class Hi, I`ve developed a component to create a dynamic panel with a renderer class, but the renderer could not be called. The rendering works if the compoent class renders the output stream. I don`t know how i can configure the renderer for the new component in tobago. faces-config.xml: component descriptionThe dynamic panel component./description display-nameDynamicPanel/display-name !-- The name for registering the component. -- component-typeextn.DynamicPanel/component-type !-- The implementation class. -- component-classweb.components.UIDynamicPanel/component-class component-extension renderer-typeextn.DynamicPanelRenderer/renderer-type /component-extension /component render-kit renderer descriptionRenderer for DynamicPanel./description component-familyextn.DynamicPanelFamily/component-family renderer-typeextn.DynamicPanelRenderer/renderer-type renderer-classweb.components.DynamicPanelRenderer/renderer-class /renderer /render-kit Regards, Hani
Re: [Tobago] Problem using tc:tree and request parameters
Hi Alf, I think the request parameters are working like expected. Only in the case of reload it will depend, if you make a reload of the get or the reload of a later post request. A reload of a post will normally reposted after the browser has asked the user (may depends on browser and configuration). For solving the problem, I want to understand why you use the get request with the non-jsf parameter (see the last section from my last mail). Regards, Udo Am 17.06.10 13:01, schrieb Alf Felis: Hi Udo, sorry... I forgot the environment information: MyFaces 1.1.6 Tobago 1.0.24 and 1.0.27 The bean has session scope. managed-bean managed-bean-nametobagoTreeTestBean/managed-bean-name managed-bean-classTobagoTreeTestBean/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean I have attached my test bean and the jsp page to this mail. First I thought that the request always contains the state of the navigation, but I checked the request parameters (using a servlet filter) and figured out that the state information will only be sent when I click the navigation tree. Nevertheless reloading the page (browser reload) collapses the tree when using parameters and saves the state without using parameters. In both situations there are no request parameters from the navigation state. Request parameters using parameters: Parameters: param: 123 Request parameters without parameters: Parameters: Request parameters when clicking the tree: Parameters: _idJsp0::form-action: _idJsp0:nav:Number1 jsf_tree: 5 _idJsp0::action-position: 0px,0px,0px,0px _idJsp0::context-path: /Tobago jsf_viewid: /TobagoTreeTest.jsp _idJsp0::form-clientDimension: 913;700 _idJsp0:nav: ;Home;Number1; _idJsp0:nav-marker: _idJsp0:nav:Number1 tobago.dummy: _idJsp0:nav-scrollPosition: Regards, Alf -Ursprüngliche Nachricht- Von: Udo Schnurpfeilu...@schnurpfeil.de Gesendet: 17.06.2010 09:59:42 An: MyFaces Discussionusers@myfaces.apache.org Betreff: Re: [Tobago] Problem using tc:tree and request parameters Hi Alf, I've some questions: Which Tobago version and which JSF implementation and version you are using (and which container)? In which scope is the managed bean that holds the state? I don't exactly know what happens, because I've not the sources of you code. But I can try some supposition... The usual usage of Tobago is to write an application, with one or more pages that will be called by clicking on some controls on the page. It was a difference of calling the URL and clicking atc:button. The click on a button will submit the current expansion state of the tree and sends it to the server (via a hidden input field), which manipulates the tree state object. When calling the URL (manually) the expansion state information is not part of the request. When JSF now restores the UIViewRoot and begins to decode the request it clears the expand state and tries to apply the new information from the browser (which are not available in this case). It is correct, that you want to provide external links (non faces request to faces response)? Are you also use internal actions? If not, you don't need to save the expansion state for each user. You can try to put the tree state in the none scope. Regards, Udo Am 15.06.10 15:51, schrieb Alf Felis: Any idea? Original-Nachricht Datum: Thu, 03 Jun 2010 13:31:44 +0200 Von: Alf Felis[ An: MyFaces Discussion Betreff: [Tobago] Problem using tc:tree and request parameters Hi all, I have a problem with tc:tree. In my code I expand the tree after creation using the TreeState: state.expand(tree, 1); This works fine till I use a request parameter... e.g. http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp?param=123 In this case the first/initial call will show an expanded tree... the second call shows a collapsed tree. - first and second call with parameter: - 1.) Call the URL - tree expanded 2.) Reload the URL - tree collapsed - first call with, second without parameter: - 1.) Call the URL - tree expanded 2.) Call http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp - tree expanded 3.) any call/reload without parameter - tree expanded I figured out that the method 'TreeState.clearExpandState()' will be called, but I can't find any hints on that issue. Regards, Alf
Re: [Tobago] Problem using tc:selectOneChoice
Hi Hani, please report an issue in the Jira. (The problem looks like the known issue with ie6 and select tags in IE6) Regards, Udo Am 29.07.10 12:22, schrieb Abushammala, Hani (EXTERN: FTP): Hi all, I habe a problem by using tc:selectOneChoice in a sheet. Internet Explorer displays the drop down menu in the header of the sheet by scrolling. Rendering with firefox works fine. I don`t know, what it`s wrong? Tabago: 1.0.27 MyFaces: 1.1.7 IE: 6 Best regards, Hani
Re: [Tobago] Problem using tc:tree and request parameters
Hi, Alf, after taking a close look to your problem, we have discovered a problem in the decision if there is a post back, or not. I've added an issue in JIRA: https://issues.apache.org/jira/browse/TOBAGO-905 You may test the current 1.0.x branch or use the nightly build from tomorrow. Regards, Udo Am 25.06.10 09:30, schrieb Alf Felis: Hi Udo, I noticed that the attachments has been removed from my mail. Should I send them to your email account? Regards, Alf -Ursprüngliche Nachricht- Von: Alf Felisalf.fe...@gmx.de Gesendet: 17.06.2010 13:01:43 An: MyFaces Discussionusers@myfaces.apache.org Betreff: Re: [Tobago] Problem using tc:tree and request parameters Hi Udo, sorry... I forgot the environment information: MyFaces 1.1.6 Tobago 1.0.24 and 1.0.27 The bean has session scope. managed-bean managed-bean-nametobagoTreeTestBean/managed-bean-name managed-bean-classTobagoTreeTestBean/managed-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean I have attached my test bean and the jsp page to this mail. First I thought that the request always contains the state of the navigation, but I checked the request parameters (using a servlet filter) and figured out that the state information will only be sent when I click the navigation tree. Nevertheless reloading the page (browser reload) collapses the tree when using parameters and saves the state without using parameters. In both situations there are no request parameters from the navigation state. Request parameters using parameters: Parameters: param: 123 Request parameters without parameters: Parameters: Request parameters when clicking the tree: Parameters: _idJsp0::form-action: _idJsp0:nav:Number1 jsf_tree: 5 _idJsp0::action-position: 0px,0px,0px,0px _idJsp0::context-path: /Tobago jsf_viewid: /TobagoTreeTest.jsp _idJsp0::form-clientDimension: 913;700 _idJsp0:nav: ;Home;Number1; _idJsp0:nav-marker: _idJsp0:nav:Number1 tobago.dummy: _idJsp0:nav-scrollPosition: Regards, Alf -Ursprüngliche Nachricht- Von: Udo Schnurpfeil Gesendet: 17.06.2010 09:59:42 An: MyFaces Discussion Betreff: Re: [Tobago] Problem using tc:tree and request parameters Hi Alf, I've some questions: Which Tobago version and which JSF implementation and version you are using (and which container)? In which scope is the managed bean that holds the state? I don't exactly know what happens, because I've not the sources of you code. But I can try some supposition... The usual usage of Tobago is to write an application, with one or more pages that will be called by clicking on some controls on the page. It was a difference of calling the URL and clicking atc:button. The click on a button will submit the current expansion state of the tree and sends it to the server (via a hidden input field), which manipulates the tree state object. When calling the URL (manually) the expansion state information is not part of the request. When JSF now restores the UIViewRoot and begins to decode the request it clears the expand state and tries to apply the new information from the browser (which are not available in this case). It is correct, that you want to provide external links (non faces request to faces response)? Are you also use internal actions? If not, you don't need to save the expansion state for each user. You can try to put the tree state in the none scope. Regards, Udo Am 15.06.10 15:51, schrieb Alf Felis: Any idea? Original-Nachricht Datum: Thu, 03 Jun 2010 13:31:44 +0200 Von: Alf Felis[ An: MyFaces Discussion Betreff: [Tobago] Problem using tc:tree and request parameters Hi all, I have a problem with tc:tree. In my code I expand the tree after creation using the TreeState: state.expand(tree, 1); This works fine till I use a request parameter... e.g. http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp?param=123 In this case the first/initial call will show an expanded tree... the second call shows a collapsed tree. - first and second call with parameter: - 1.) Call the URL - tree expanded 2.) Reload the URL - tree collapsed - first call with, second without parameter: - 1.) Call the URL - tree expanded 2.) Call http://localhost:8080/Tobago/faces/TobagoTreeTest.jsp - tree expanded 3.) any call/reload without parameter - tree expanded I figured out that the method 'TreeState.clearExpandState()' will be called, but I can't find any hints on that issue. Regards, Alf
MyFaces Test with JSF 1.1
Hi, in version 1.0.0 there is no support for JSF 1.1, but I've seen some code, that consider JSF 1.1. Is there a plan to make the test12 version also runnable with JSF 1.1? It seems to me, that we can build an artifact, that supports JSF 1.1 and 1.2 coexistent, to keep the management overhead small. Regards, Udo
Re: MyFaces Test with JSF 1.1
Hi Jakob, there is an easy solution to make myfaces-test12 usable to test applications running with JSF 1.1. I will create an Jira issue and fix that. To make the project build-able with JSF 1.1 is more complex and not needed for me. Regards, Udo Am 14.09.10 16:47, schrieb Jakob Korherr: Hi Udo, I guess the idea of shale-test (= original test12) was to provide support for both JSF 1.1 and 1.2, however test12 now only supports JSF 1.2. If you think it is easily possible to support both versions in one module, I'd prefer that. If not, we could create a test11 module and use the dependency plugin (or the shade plugin) to re-use existing classes from test12. Regards, Jakob 2010/9/14 Udo Schnurpfeilu...@schnurpfeil.de: Hi, in version 1.0.0 there is no support for JSF 1.1, but I've seen some code, that consider JSF 1.1. Is there a plan to make the test12 version also runnable with JSF 1.1? It seems to me, that we can build an artifact, that supports JSF 1.1 and 1.2 coexistent, to keep the management overhead small. Regards, Udo
Re: [Tobago] FileUpload from popup supported?
Hello Michael, there are two options to use the fileupload, see http://myfaces.apache.org/tobago/faq.html#tobagofileupload The jar-option might be better than the filter-option. You can find an example in the addressbook demo. If you still have problems with the Java exceptions, please sent it, with the Tobago version and the way you chose (jar or filter). Regards, Udo An example you can find in the Am 21.09.10 09:56, schrieb Michael Kakuschky: Hello, I use a form in a popup to submit some data. It worked fine until I add the tx:file component to the form. If I submit the form with a file selected I receive the data but it seems that it corrupts somehow the memory and I got some strange Java exceptions about (existing) methods that can't be found. If the file upload is supported can somebody give me a basic example and maybe tell me which attributes have to be set and which maybe not? KInd regards Michael
Re: [tobago] Validation in Popups
Hello Michael, please try to put the form outside of the command tag, which opens the popup. This should solve your problems. The background is: The popup must be inside the form to consider it was already active. Regards, Udo Am 23.09.10 22:29, schrieb Michael Kakuschky: Hello, I have a form in a popup. Now it works fine and I add some validators to it. I checked that they are executed and throws the ValidatorException if the input does not match the requirements. In case of exceptions the action behind the popup form is not executed but unfortunately the popup is closed without any notification about the wrong input. Is there a way to keep the popup open so that the user is informed about the wrong input? thanks regards Michael
Re: [tobago] Validation in Popups
Hi Michael, I've just rechecked you sample, but I can't reproduce the problem. So, it may depends on some odd diffence of my and you environment. Let be describe what I did: 1. svn co https://svn.apache.org/repos/asf/myfaces/tobago/tags/tobago-1.0.30/example/demo/ demo 2. cd demo 3. edit src/main/webapp/popup-test.jsp (this is a modified version of you sniplet, the EL to the Java code was removed) %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib tagdir=/WEB-INF/tags/layout prefix=layout % layout:overview jsp:body tc:box label=Test for Popups to be open in case of an validation error f:facet name=layout tc:gridLayout rows=fixed;1*/ /f:facet tc:form tc:panel f:facet name=layout tc:gridLayout rows=fixed columns=fixed/ /f:facet tc:button label=new item tc:attribute name=renderedPartially value=non_modal_popup1/ f:facet name=popup tc:popup width=500 height=325 id=non_modal_popup1 modal=true tc:box label=create new item f:facet name=layout tc:gridLayout columns=1* rows=fixed;fixed/ /f:facet tc:cell tx:in label=contact name value=some value required=true/ /tc:cell tc:cell tc:button width=100 label=add tc:attribute name=popupClose value=afterSubmit/ /tc:button /tc:cell /tc:box /tc:popup /f:facet /tc:button /tc:panel /tc:form /tc:box /jsp:body /layout:overview 4. mvn jetty:run-exploded 5. browse: http://localhost:8080/tobago-example-demo/faces/popup-test.jsp 6. click new item - popup opens 7. click add - popup closes 8. click new item - popup opens 9. remove the value of contact name 10. click add - popup keeps open and the input will be colored red Can you check, if this works the same way on your box. Regards, Udo Am 04.10.10 10:59, schrieb Volker Weber: Hi Michael, yes we have validation in Popups, but this is a bit hack like, nothing to show as example. The problem is the partial rendering and the popup handling in tobago 1.0.x: If you need validation inside a popup, you should not close the popup via popupClose attribute, but rerender the popup content partial and, on success, close the popup via hidden button and javascript. something like this should work, if you set the #{myController.closePopup} value in your newItem action. tc:cell f:facet name=layout tc:gridLayout colums=fixed;1* / /f:facet tc:button width=100 label=add action=#{myController.newitem} tc:attribute name=popupClose value=afterSubmit/ /tc:button tc:text escape=false rendered=#{myController.closePopup} value=script type=\text/javascript\Tobago.submitAction('full clientId of hiddenCloseButton');/script / f:facet name=hiddenCloseButton tc:button id=hiddenCloseButton tc:attribute name=popupClose value=afterSubmit/ /tc:button /f:facet /tc:cell In tobago 1.5 this would be easier. Regards, Volker 2010/10/4 Michael Kakuschkykakusc...@elbe-net.de: Does nobody has an working example for validation in popus? Regards Michael Am 29.09.2010 08:57, schrieb Michael Kakuschky: Hello Udo, thanks for the answer but my form is already around the tc:button which I used to open the popup. Here is a snippset of my original version. The popup works and the form data will processed. Only validations and required checks doesn't work. In case of missing or wrong data the pop is just closing without calling the action method of the popups submit button. Can you show on this example what's todo or maybe wrong ? Thanks best regards Michael tc:form tc:panel f:facet name=layout tc:gridLayout rows=fixed columns=fixed / /f:facet tc:button label=new item tc:attribute name=renderedPartially value=non_modal_popup1/ f:facet name=popup tc:popup width=500 height=325 id=non_modal_popup1 modal=true tc:box label=create new item f:facet name=layout tc:gridLayout columns=1* rows=fixed;fixed / /f:facet tc:cell tx:in label=contact name value=#{myController.itemToAdd.contact_name} required=true / /tc:cell tc:cell tc:button width=100 label=add action=#{myController.newitem} tc:attribute name=popupClose value=afterSubmit/ /tc:button /tc:cell /tc:box /tc:popup /f:facet /tc:button /tc:panel /tc:form Am 28.09.2010 15:12, schrieb Udo Schnurpfeil: Hello Michael, please try to put the form outside of the command tag, which opens the popup. This should solve your problems. The background is: The popup must be inside the form to consider it was already active. Regards, Udo Am 23.09.10 22:29, schrieb Michael Kakuschky: Hello, I have a form in a popup. Now it works fine and I add some validators to it. I checked that they are executed and throws the ValidatorException if the input does not match the requirements. In case of exceptions the action behind the popup form is not executed but unfortunately the popup is closed without any notification about the wrong input. Is there a way to keep the popup open so
Re: [tobago] Validation in Popups
Addition (but I don't think the problem rely on that): Server: Mac OS 10.6.4, Maven 2.2.1, Java 1.6.0_20 Clients: Firefox 3.6.10, Mac OS 10.6.4 Safari 5.0.2, Mac OS 10.6.4 Internet Explorer 6.0, Windows XP SP 3 Internet Explorer 8.0, Windows 7 Firefox 3.6.8, Ubuntu 10.4 Am 08.10.10 18:30, schrieb Udo Schnurpfeil: Hi Michael, I've just rechecked you sample, but I can't reproduce the problem. So, it may depends on some odd diffence of my and you environment. Let be describe what I did: 1. svn co https://svn.apache.org/repos/asf/myfaces/tobago/tags/tobago-1.0.30/example/demo/ demo 2. cd demo 3. edit src/main/webapp/popup-test.jsp (this is a modified version of you sniplet, the EL to the Java code was removed) %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib tagdir=/WEB-INF/tags/layout prefix=layout % layout:overview jsp:body tc:box label=Test for Popups to be open in case of an validation error f:facet name=layout tc:gridLayout rows=fixed;1*/ /f:facet tc:form tc:panel f:facet name=layout tc:gridLayout rows=fixed columns=fixed/ /f:facet tc:button label=new item tc:attribute name=renderedPartially value=non_modal_popup1/ f:facet name=popup tc:popup width=500 height=325 id=non_modal_popup1 modal=true tc:box label=create new item f:facet name=layout tc:gridLayout columns=1* rows=fixed;fixed/ /f:facet tc:cell tx:in label=contact name value=some value required=true/ /tc:cell tc:cell tc:button width=100 label=add tc:attribute name=popupClose value=afterSubmit/ /tc:button /tc:cell /tc:box /tc:popup /f:facet /tc:button /tc:panel /tc:form /tc:box /jsp:body /layout:overview 4. mvn jetty:run-exploded 5. browse: http://localhost:8080/tobago-example-demo/faces/popup-test.jsp 6. click new item - popup opens 7. click add - popup closes 8. click new item - popup opens 9. remove the value of contact name 10. click add - popup keeps open and the input will be colored red Can you check, if this works the same way on your box. Regards, Udo Am 04.10.10 10:59, schrieb Volker Weber: Hi Michael, yes we have validation in Popups, but this is a bit hack like, nothing to show as example. The problem is the partial rendering and the popup handling in tobago 1.0.x: If you need validation inside a popup, you should not close the popup via popupClose attribute, but rerender the popup content partial and, on success, close the popup via hidden button and javascript. something like this should work, if you set the #{myController.closePopup} value in your newItem action. tc:cell f:facet name=layout tc:gridLayout colums=fixed;1* / /f:facet tc:button width=100 label=add action=#{myController.newitem} tc:attribute name=popupClose value=afterSubmit/ /tc:button tc:text escape=false rendered=#{myController.closePopup} value=script type=\text/javascript\Tobago.submitAction('full clientId of hiddenCloseButton');/script / f:facet name=hiddenCloseButton tc:button id=hiddenCloseButton tc:attribute name=popupClose value=afterSubmit/ /tc:button /f:facet /tc:cell In tobago 1.5 this would be easier. Regards, Volker 2010/10/4 Michael Kakuschkykakusc...@elbe-net.de: Does nobody has an working example for validation in popus? Regards Michael Am 29.09.2010 08:57, schrieb Michael Kakuschky: Hello Udo, thanks for the answer but my form is already around the tc:button which I used to open the popup. Here is a snippset of my original version. The popup works and the form data will processed. Only validations and required checks doesn't work. In case of missing or wrong data the pop is just closing without calling the action method of the popups submit button. Can you show on this example what's todo or maybe wrong ? Thanks best regards Michael tc:form tc:panel f:facet name=layout tc:gridLayout rows=fixed columns=fixed / /f:facet tc:button label=new item tc:attribute name=renderedPartially value=non_modal_popup1/ f:facet name=popup tc:popup width=500 height=325 id=non_modal_popup1 modal=true tc:box label=create new item f:facet name=layout tc:gridLayout columns=1* rows=fixed;fixed / /f:facet tc:cell tx:in label=contact name value=#{myController.itemToAdd.contact_name} required=true / /tc:cell tc:cell tc:button width=100 label=add action=#{myController.newitem} tc:attribute name=popupClose value=afterSubmit/ /tc:button /tc:cell /tc:box /tc:popup /f:facet /tc:button /tc:panel /tc:form Am 28.09.2010 15:12, schrieb Udo Schnurpfeil: Hello Michael, please try to put the form outside of the command tag, which opens the popup. This should solve your problems. The background is: The popup must be inside the form to consider it was already active. Regards, Udo Am 23.09.10 22:29, schrieb Michael Kakuschky: Hello, I have a form in a popup. Now it works fine and I add some validators to it. I checked that they are executed
Re: [tobago] tx:in update problem
Hi Michael, the behavior you describe seems to be normal for JSF (in the moment I doesn't now that this has changed from JSF 1.1 to JSF 1.2). When readonly is false the value will be submitted, but not written into the model. After an action with outcome null the same view root will be rendered again. So the local value will be used instead of the actual value from the model. If the action was completed and you do not need old value of other forms on that page, you should return an outcome different from null to create a new view. Hope that helps. Udo Am 16.10.10 23:04, schrieb Michael Kakuschky: Hello, I stripped down my tx:in update problem. In a simple JSP page I have have to forms. If I click the button in the first form I want to update the tx:in element in the second form. The update does only works if the readonly attribute of the tc:in element is set to true. But them I'm not able to edit the value. Is this a bug or is there a way fix this behaviour? Regards Michael I use tobago 1.0.30 and Myfaces 1.1.18 with tomcat 6.0.18 Here is the page JSP Page %@ taglib uri=http://java.sun.com/jsf/core; prefix=f% %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc% %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx% %@ page contentType=text/html;charset=UTF-8 language=java% f:view tc:page f:facet name=layout tc:gridLayout columns=1* rows=fixed;fixed;* / /f:facet tc:form tc:cell tc:button label=addone action=#{myTestBean.addOne} / /tc:cell /tc:form tc:form tc:cell tc:in value=#{myTestBean.theNumber} readonly=false / /tc:cell /tc:form tc:cell / /tc:page /f:view and the Bean looks like the following public class MyTestBean { Integer number = 11880; public Integer getNumber() { return number; } public void setNumber(Integer number) { this.number = number; } public String addOne() { number += 1; return null; } }
Re: [Tobago] Multiple dynamically created menu items.
Hi DOM! I'm not sure what you are looking for. You can use this: Am 20.10.10 18:42, schrieb d.o@gmx.net: Dear all, Is it possible to dynamically create multiple tc:menuItems. I am looking for a similar behavior that can be implemented with tc:selectItems for e.g. tx:menuRadio. Something like: tc:menu label=test tc:menuItems tc:selectItems value=foo / /tc:menuItems /tc:menu Where foo references to a ListSelectItem in a backing bean. The elements in this list should be displayed as individual menu items. Thanks a lot for any hints. Greetings, dom
Re: [Tobago] Multiple dynamically created menu items.
(ups, pressed wrong key) Hi DOM! I'm not sure what you are looking for. Do you know you can use this? tx:menuRadio action=#{clientConfigController.submit} value=#{clientConfigController.locale} f:selectItems value=#{clientConfigController.localeItems} / /tx:menuRadio Are you looking for a similar to create more than one menuItem with actions? If so. I think this will not work, because the selectItems doesn't contains an action. An other solution might be to use ui:repeat with facelets, but I didn't tested it. Regards, Udo Am 20.10.10 18:42, schrieb d.o@gmx.net: Dear all, Is it possible to dynamically create multiple tc:menuItems. I am looking for a similar behavior that can be implemented with tc:selectItems for e.g. tx:menuRadio. Something like: tc:menu label=test tc:menuItems tc:selectItems value=foo / /tc:menuItems /tc:menu Where foo references to a ListSelectItem in a backing bean. The elements in this list should be displayed as individual menu items. Thanks a lot for any hints. Greetings, dom
Re: [tobago] How to use tc:tree control for navigation
Hi Michael, the navigation of the tobago-example-demo is implemented with tc:tree. For Tobago 1.0 you need a Java object that holds the nodes, see navigation.jsp (you need a facet for action/navigation). For Tobago 1.5 you can also create the node directly in the page, see navigation.xhtml (the tree was reimplemented completely in 1.5). Regards, Udo Am 22.10.10 22:29, schrieb Michael Kakuschky: Hello, how to use the tc:tree control to navigate to pages? Is it possible? And if yes how I can set the outcome? Thanks regards Michael
Re: [Tobago] Text of labels is too much shifted to the top.
Hi dom, I totally agree with you. Please file a ticket in Jira. Regard, Udo Am 27.10.10 12:02, schrieb d.o@gmx.net: Hi all, the text of all labels is too much shifted to the top. Examples can be seen in the Tobago Demo for any of those themes: Richmond, Speyside, Charlotteville (http://www.irian.biz/tobago-example-demo). This happens to me with Firefox 3.6.11 and Tobago 1.0.30 (and obviously the Tobago version currently used in the demo). So, I think it should rather be vertically centered. Of course, one could do this by manipulating the CSS style, however I think the default behavior should be vertically centered. Since this might simply be a matter of taste, I didn't want to file a ticket in Jira and wanted to discuss it here first. What do you think? Best, dom
Re: [Tobago] Problem while determining the view id
Hallo Hani, sorry, but I'm not sure what your scenario is. Where do you use '../faces' and why? In the link attribute of a tc:link or tc:button or in navigation rules? Or in links from outside of JSF? There is a part in JSF that guesses the view id from the URL and it might be a problem when using ../faces. What is the application case? Regards, Udo Am 15.02.12 14:59, schrieb Abushammala, Hani (EXTERN: conceptQ): Hello, I've a problem by determining the view id when using the url '../faces' and '../faces/' to call the web application. Is it a normal behavior of Tobago or jsf that the determined view id null or '/' in this case? I got this error log Assumed extension mapping, but there is no extension in '/faces' or '/faces/'. In this case the RestoreViewExecutor of Tobago tries to create the view from ExternalContext.getRequestServletPath(). With '/faces' as ExternalContext.getRequestServletPath() the redirection doesn't works correctly, the redirection ignores the context path of the application. With '/faces/' as ExternalContext.getRequestServletPath() the restoring or creating the view doesn't works with null as view id. By calling the application with '../faces/' i've also noticed that the determining of ExternalContext.getRequestPathInfo() and ExternalContext.getRequestServletPath() returns different values on different servers (e.g tomcat and Websphere). The application details: Servlet mapping: servlet-mapping servlet-nameFacesServlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping Libs: tobago-core-1.0.38.jar myfaces-impl-1.1.9.jar myfaces-api-1.1.9.jar Server: Tomcat 6.0.18 Websphere 6.1 Regards, Hani
Re: [Tobago] Is migration to Tobago 1.5.* recommended?
Hi Dom, sorry for the late response. Generally I encourage you to migrate to 1.5.x. I think you should update JSF to 1.2 and Tobago to 1.5.x at the same time. That might be less effort for programming and testing. In special, it depends a little from you application, because we need some API changes using the tc:tree. These changes we make in version 1.6.x. If you are using the tree minor or not, you can migrate to 1.5.x and later to 1.6.x with low effort. If you are using the tree intensively, you may wait until 1.6.x will be release. Both versions will contain bugfixes and important features for a while. Regards, Udo Am 12.04.12 13:13, schrieb d.o@gmx.net: Dear all, I will repeat my question: Would you recommend migrating from Tobago 1.0.* to Tobago 1.5.* at this time (1.5.4)? Furthermore, how would you suggest to proceed: First migrate to JSF 1.2, then to Tobago 1.5 (if that is possible), or migrate both at the same time? Thanks for your help, Dom Original-Nachricht Datum: Thu, 26 Jan 2012 05:40:07 +0100 Von: d.o@gmx.net An: users@myfaces.apache.org Betreff: [Tobago] Is migration to Tobago 1.5.* recommended? Dear developers, dear all, It is good to see that Tobago 1.5 has lost its beta status. Thanks for all the work and time you put into the development. The question is, do you recommend migrating from Tobago 1.0.* to 1.5.* at this stage? The migration guide (http://myfaces.apache.org/tobago/migration-1.5.html) still says work in progress. So is there still information missing in the guide, or is version 1.5.* not yet stable enough? Could you please clarify? Another suggestion: In the migration guide, you could list a few advantages (and disadvantages) to motivate migration. Thanks a lot. Best, Dom -- Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
Re: facelet
I think it is not possible to combine tobago with facelets. I haven't used facelets, but I think facelets are based on HTML-designed JSP source code. Tobago on the other side abstracts from HTML. There are no HTML-Tags in the JSP source code. There are only abstract tags. The Renderkit converts it to HTML or any other ML. The idea of Tobago is: The theme controls the look-and-feel of the page. Udo Mike Kienenberger wrote: There's quite a few people using this framework. Which license issue are you needing to solve? As I recall, tobago is just using a different renderkit. I don't think there would be any issues using it with facelets. You'd just need to set up a facelets taglib.xml file for it, but that's true for all nonstandard JSF components. However, I haven't tried using tobago with facelets. You'll probably receive more in-depth answers on the facelets users mailing list. On 12/3/05, Arash Bijanzadeh [EMAIL PROTECTED] wrote: Hi, I would like to here any advise regarding to facelets. Did anybody used this framework? What is the situation? How could license issue be solved? Is there the possibility to combine tobago and facelets? Thanks in advance -- from debian manifesto: Debian Linux is a brand-new kind of Linux distribution. Rather than being developed by one isolated individua l or group, as other distributions of Linux have been developed in the past, Debian is being developed openly in the spirit of Linux and GNU.
Re: myfaces in weblogic
Which service pack? Udo Peter Maas wrote: Hi all, I'm trying to get a basic myfaces application to run on weblogic 8.1 but without any luck yet. I googled arround a bit and found some contradicting bits on form but no 'THIS is how to to it, THIS is why'. The problem I'm running into seems to be related to context initialisation: java.lang.ExceptionInInitializerError. at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java :822) at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3236) at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3181) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3154) at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:654) at weblogic.servlet.internal.WebService.preloadResources (WebService.java:483) at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30) at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131) at weblogic.t3.srvr.T3Srvr.resume (T3Srvr.java:964) at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359) at weblogic.Server.main(Server.java:32) A forum on the sun site recommends the use of a specific listener, which is not included in the myfaces distribution... another post on yet another forum recommended the use of a different servlet ( net.sourceforge.myfaces.webapp.MyFacesServlet) which is no part at of the myfaces distribution either? any help appriciated! -P
Re: How can I redirect from a servlet to a JSF page (that isbacked by a bean)?
Hi Jeff, please try to map the NonFacesRequestServlet like: servlet-mapping servlet-nameNonFacesRequestServlet/servlet-name url-pattern/NonFacesRequestServlet/url-pattern /servlet-mapping And use the external URL: http://localhost:8080/ebusiness/faces/NonFacesRequestServlet?id=1 By the way: Which ServletContainer? Version? Hope that helps Udo Jeffrey Porter wrote: I'm still really stuck over this. Has anyone any ideas why I, when I click on a commandButton, get 404 Error no call is made to the code behind the commandButton. This only occurs on the page when it is displayed via the NonFacesRequestServlet and not when I get to the page from another action. I have the following settings. The web.xml contains... servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern*.jsf/url-pattern /servlet-mapping The URL I request is.. http://localhost:8080/ebusiness/faces/view/task?id=1 /view/ is mapped to my NonFacesRequestServlet The NonFacesRequestServlet sets the following.. UIViewRoot view = viewHandler.createView(facesContext, /jsp/view.jsp); navigationHandler.handleNavigation(facesContext, null, showExistingNCM); The faces-config.xml contains... navigation-rule from-view-id/jsp/view.jsp/from-view-id navigation-case from-outcomeshowExistingNCM/from-outcome to-view-id/jsp/theNCM.jsp/to-view-id /navigation-case /navigation-rule The commandButton that's clicked is... h:commandButton immediate=true value=Cancel action=#{managerDocument.abortSaveNCM }/ The code called is (or not called in this case, since I never hit the break point on it)... public String abortSaveNCM() { //insert any bus logic here return (abort); } The faces-config.xml contains for the page that is displayed... navigation-rule from-view-id/jsp/theNCM.jsp/from-view-id navigation-case from-outcomeabort/from-outcome to-view-id/jsp/taskList.jsp/to-view-id redirect/ /navigation-case /navigation-rule The URL shown after I click the commandButton... http://localhost:8080/ebusiness/view/task/jsp/theNCM.jsp HTML: HTTP Status 404 - /view/task/jsp/theNCM.jsp A screen shot of the page I get from the sevlet... http://www.porter.eu.com/jeff/1a.JPG A screen shot of the page I get when I click the cancel commandButton http://www.porter.eu.com/jeff/2a.JPG -Original Message- From: Simon Kitching [mailto:[EMAIL PROTECTED] Sent: 13 January 2006 06:01 To: MyFaces Discussion Subject: Re: How can I redirect from a servlet to a JSF page (that isbacked by a bean)? Hi Mike, I've gathered the info posted so far and created this page: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls Anyone who actually gets this working, please review the wiki page and make any necessary corrections/enhancements! Cheers, Simon Corrections or enhancements On Wed, 2006-01-11 at 13:50 -0500, Mike Kienenberger wrote: If nothing else, this question has been asked enough times that someone who's using it or has ideas how to solve it should write up a wiki page on the topic :) On 1/11/06, Volker Weber [EMAIL PROTECTED] wrote: Hi Jeffrey, you are in the situation to serve a Non-Faces Request to a Faces Response as described in the jsf 1.1 spec in section 2.1.1. Take a look at tobagos NonFacesRequestServlet [1] how this situation could handled. I don't know if there is somthing like this in tomahawk, could be a candidate for commons.jar. Regards, Volker [1]: http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-core/src /main/java/org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java ?view=markup Jeffrey Porter wrote: Hello all. I have the situation where I want to send a URL out in an email for a person to click on, so that they can then see a page in my system. Normally I'd have a backing servlet that takes the parameters in and redirects to the page I want the user to view. But since I'm using myfaces, I don't know how to redirect to a JSF page. In this case I'm at a complete loss to where I should start. Can some one please prod me in the correct direction. Thanks Jeff -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain.
Re: myFaces - servlet redirect.
I've also tested it, and figured out, that it works also with the Sun Implementation WITHOUT Volkers change. So the Sun stuff works a little different. We should find the correct way (without hacking) and put an full example somewhere... Jeffrey Porter schrieb: THANKS! I defiantly owe you a beer or two! So when you say you changed the servlet mapping for NonFacesRequestServlet. Do you mean you changed... servlet-mapping servlet-nameNonFacesRequestServlet/servlet-name url-pattern/NonFacesRequestServlet/url-pattern /servlet-mapping to servlet-mapping servlet-nameNonFacesRequestServlet/servlet-name url-pattern/faces/url-pattern /servlet-mapping And then just used the URL... http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1 Thanks Jeff -Original Message- From: Volker Weber [mailto:[EMAIL PROTECTED] Sent: 17 January 2006 18:54 To: MyFaces Discussion Subject: Re: myFaces - servlet redirect. Hi Jeff, i just played a bit with your app. when i change the mapping for the NonFacesRequestServlet to /faces than it works! For a reason i currently don't know, (and also have no time to investigate) the form action is prefixed with the servlet name. So using the mapping /faces is a hack, but works. BTW: the download url just points to a frameset, i need to extract the correct download url from the html source. Regards Volker Jeffrey Porter wrote: Firstly I'd like to thank Matthias Volker for there help so far with this! Ok, I've stripped out all the excess code and got a sample of problem together. Download the ear (inc src) http://www.porter.eu.com/jeff/servletRedirect.ear URL to request once running... http://localhost:8080/servredirect/faces/NonFacesRequestServlet?id=1 The two class files are located in... servredirect-support.jar - \org\iarc\ebusiness\model\ - BackingBean.class servredirect.war - \WEB-INF\lib - servredirect-support-action.jar - \org\iarc\ebusiness\reports - NonFacesRequestServlet.class The page should contain a textfield with ... Jeff Porter - request completed when the page is first requested. When the cancel button is clicked, the text should change to alfa. The src is contained in a separate zip file in the route of the ear. I'm hoping that someone else can also see my problem. Thanks Jeff p.s. I've read the wiki page and have followed it. Part of me is hoping that this all turns out to me some stupid mistake on my part. url: http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls Note: jboss-4.0.3SP1 myfaces-1.1.1.zip -Original Message- From: Volker Weber [mailto:[EMAIL PROTECTED] Sent: 17 January 2006 14:38 To: Matthias Wessendorf Cc: [EMAIL PROTECTED]; MyFaces Discussion Subject: Re: myFaces - servlet redirect. Hi, i didn't implement this, i just have mentioned we have this in tobago :-). @Jeff: i don't understand yout last post on [EMAIL PROTECTED] you have a mapping of /view/ for the servlet ant the url http://localhost:8080/ebusiness/faces/view/task?id=1 i wonder why /view/task is mapped to the Servlet . try mapping /view and url http://localhost:8080/ebusiness/faces/view?id=1 If this not works, create a small example app we can work with. regards Volker Matthias Wessendorf wrote: Hi Volker, since you implemented the NonFacesRequestServlet, could you helpout? I have not used the mentioned Servlet, just looked at the source to talk about how to redirect to a faces page that part seems to work, but his commandbutton has some issues. Thanks, Matthias On 1/17/06, Jeff Porter [EMAIL PROTECTED] wrote: Hi Matthias, Sorry to email you directly, but I'm stuck and in need of help. We talked on the myFaces mailing list, the subject was How can I redirect from a servlet to a JSF page. I've still got the problem that after I redirect from the servlet to my JSF, the commandButtons on the page no longer work. (I get a 404 page displayed) If I do not add the following to web.xml, then the commandButton's requests are passed to my NonFacesRequestServlet. With the following added, the commandButton's requests are not passed to NonFacesRequestServlet, but they also do not invoke the action in the commandButton link. Web.xml code... servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping If you have any ideas, that would be great. I'm going nuts over this problem. Thanks for taking the time to read this. Jeff -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com
Re: myFaces - servlet redirect.
I think, the mapping for the NonFacesRequestServlet can also called /faces/NonFacesRequestServlet (it might be a little nicer) to the difference of myfaces and the sun-ri: I've setup an example here http://svn.apache.org/repos/asf/incubator/tobago/trunk/tobago-example/tobago-example-nonfacesrequest/ web.xml snip: !--for sun ri (tested with version 1.1.01)-- url-pattern/FishServlet/url-pattern !--for myfaces (tested with version 1.1.1)-- url-pattern/faces/FishServlet/url-pattern Matthias Wessendorf schrieb: On 1/17/06, Volker Weber [EMAIL PROTECTED] wrote: No ! /faces/* is the mapping for FacesServlet /faces is the mapping for NonFacesRequestServlet I don't like it, but this works with Jeff's example app. ah! that is a hack :-) Udo's email sounds *interesting*. I'll look at it! Regards, Matthias Regards Volker Matthias Wessendorf wrote: url-pattern/faces/url-pattern /faces/* just like discussed here: http://www.mail-archive.com/users@myfaces.apache.org/msg13865.html (sent you the link already ;)) -Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com
Re: myFaces - servlet redirect.
for Jeffs app, please try the *.jsf variant I've described in the example here: http://svn.apache.org/repos/asf/incubator/tobago/trunk/tobago-example/tobago-example-nonfacesrequest/src/main/webapp/WEB-INF/web.xml servlet-mapping servlet-nameFacesServlet/servlet-name url-pattern*.jsf/url-pattern /servlet-mapping servlet-mapping servlet-nameFishServlet/servlet-name url-pattern/FishServlet.jsf/url-pattern /servlet-mapping Volker Weber wrote: Hi, Udo, this did not work with Jeffs application. I had tested this yesterday an now again. If i use the mapping /faces/NonFacesRequestServlet i got /servredirect/faces/NonFacesRequestServlet/jsp/theBackingBean.jsp for the action attribute of the form element. Regards, Volker Udo Schnurpfeil wrote: I think, the mapping for the NonFacesRequestServlet can also called /faces/NonFacesRequestServlet (it might be a little nicer) to the difference of myfaces and the sun-ri: I've setup an example here http://svn.apache.org/repos/asf/incubator/tobago/trunk/tobago-example/tobago-example-nonfacesrequest/ web.xml snip: !--for sun ri (tested with version 1.1.01)-- url-pattern/FishServlet/url-pattern !--for myfaces (tested with version 1.1.1)-- url-pattern/faces/FishServlet/url-pattern Matthias Wessendorf schrieb: On 1/17/06, Volker Weber [EMAIL PROTECTED] wrote: No ! /faces/* is the mapping for FacesServlet /faces is the mapping for NonFacesRequestServlet I don't like it, but this works with Jeff's example app. ah! that is a hack :-) Udo's email sounds *interesting*. I'll look at it! Regards, Matthias Regards Volker Matthias Wessendorf wrote: url-pattern/faces/url-pattern /faces/* just like discussed here: http://www.mail-archive.com/users@myfaces.apache.org/msg13865.html (sent you the link already ;)) -Matthias -- Don't answer to From: address! Mail to this account are droped if not recieved via mailinglist. To contact me direct create the mail address by concatenating my forename to my senders domain. -- Matthias Wessendorf Zülpicher Wall 12, 239 50674 Köln http://www.wessendorf.net mwessendorf-at-gmail-dot-com
Re: t:sheet autostretching
Hi Olexandr, do you have a width and height in the tc:page tag? You may set it in almost all cases. (this might be required) The LayoutManager computes in the moment only fix sizes. If you want your application to autoresize to the browser-window you have to define the page like this: tc:page id=page state=#{layout} width=#{layout.width} height=#{layout.height} and define a managed bean like this (in faces-config.xml): managed-bean managed-bean-namelayout/managed-bean-name managed-bean-classmypackage.Layout/managed-bean-class managed-bean-scopesession/managed-bean-scope managed-property property-namewidth/property-name property-classint/property-class value1000/value /managed-property managed-property property-nameheight/property-name property-classint/property-class value600/value /managed-property /managed-bean with a class Layout like package mypackage; import org.apache.myfaces.tobago.model.PageStateImpl; public class Layout extends PageStateImpl { private int width; private int height; public int getWidth() { if (getClientWidth() != 0) { return getClientWidth(); } return width; } public void setWidth(int width) { this.width = width; } public int getHeight() { if (getClientHeight() != 0) { return getClientHeight(); } return height; } public void setHeight(int height) { this.height = height; } } there is one disadvantage in the moment. The resizing is will take effect after the next server-request. Hope that helps. Udo Olexandr Zakordonskyy schrieb: Hi. Look at the example: t:panel t:sheet columns=25px;1*;90px;80px;80px;50px;80px forceVerticalScrollbar=false showHeader=true . The sheet is hiding. When is set the width and height in pixels: t:panel width=800 height=800 t:sheet columns=25px;1*;90px;80px;80px;50px;80px forceVerticalScrollbar=false showHeader=true It works fine. But I need the sheet to autoresize to 100% to do not use scrolls. What you may advise in this situation? Thanks, Olexandr.
Re: Tobago t:tree : visual indicator for the current node.
Not in the moment, but it should, so I've added an issue: https://issues.apache.org/jira/browse/MYFACES-1107 Regards Udo Iryna Stetska schrieb: I'm using t:tree. I would like to have some visual indicator (different backgroung, color or style) for the tree node currently selected (which is changed when TreeState.setMarker(DefaultMutableTreeNode node) is called). Is it possible??
Re: There's an issue with synching tobago sheet to backing bean
I think this is not a tobago issue. It is evident. The problem seems, that the index can't be use it identify an item. Solutions: 1. You may put your list in the session scope. 2. Using request scope: I need some information. How do you access to the selected item? Code sample? Regards Udo Nazar Stasiv schrieb: Provided backing bean contains collection of items and is in the request scope. If other user deletes an item from the bean there will be irrelevant data on your own screen. If you perform delete action on the very same item in the sheet you'll get loss of data. The issue itself is that tobago sheet doesn't recognize backing bean was changed. and in case of delete operation as above some items in backing bean shift up. And there is very big chance you'll delete item which was next to item you meant to delete. Had anyone experienced such kind of problems? Thank You
[Tobago] Simplified theme handling
Hello, the theme handling was simplified, so you need to change something in your build process. See https://issues.apache.org/jira/browse/TOBAGO-20 You have 2 possibilities: 1. For easy development: a) Put the theme jar in the classpath *) b) Define a ResourceServlet in the web.xml and bind it to the url-pattern of the theme-path c) Ensure load-theme-resources-from-classpath=true in tobago-config.xml (is default) You can see the use in the tobago-example-blank 2. For production: a) Put the theme jar in the classpath *) b) Unpack the resources (no classes and no properties) of the theme into the war. You may use the maven-theme-plugin c) Set load-theme-resources-from-classpath=false in tobago-config.xml You can see the use in the tobago-example-demo *) The tobago-theme-name-version-THEME.jar is no longer needed. You need only the tobago-theme-name-version.jar So you may remove some tags the pom, if using maven2: classifierTHEME/classifier scopeprovided/scope Regards Udo
Re: How Does JDeveloper Compare with Java Studio Creator
The EAP build 5175 of IntelliJ has JSF support. It's not ready-made, but it looks promising :-) Udo Martin Marinschek schrieb: Ok I'd have moved from IntelliJ if that was better (IntelliJ not offering JSF support at all). Have to stay some more ;) regards, Martin On 3/4/06, Yee CN [EMAIL PROTECTED] wrote: Eclipse + myEclipseIDE is performing OK. For one thing eclipse is not opening every file you have - only the ones you left opened in your last session. For that matter starting up time is rather independent of the size of the project. In my 3yr old notebook eclipse + myeclipse + BIRT starts up in around 20 seconds. Full recompilation takes forever. JSP/JSF validation is the culprit. I have 50+ xhtmls - and it takes the order of 10min to compile. Regards, Yee -Original Message- From: Martin Marinschek [mailto:[EMAIL PROTECTED] Sent: Saturday, 4 March 2006 6:35 PM To: MyFaces Discussion Subject: Re: How Does JDeveloper Compare with Java Studio Creator Can you guys tell how well your IDEs would perform with large apps? I was trying to get an app with 200 jspx files (admittedly, rather large) up and running in JDeveloper, and the thing didn't start up until after 10min. Is work being done on making this situation better? Maybe I'm doing something wrong here, too. regards, Martin On 3/4/06, Adam Winer [EMAIL PROTECTED] wrote: On 3/3/06, Yee CN [EMAIL PROTECTED] wrote: Is there any supports for Facelets in JDeveloper or JSC? I am using MyEclipse - and I am seriously looking for an alternative. Unfortunately not. Facelets has come on strong basically at exactly the wrong point in the development cycle for JDeveloper (and JSC too, I'd imagine). I'm certainly pushing Facelets to anyone in earshot. :) -- Adam -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces -- http://www.irian.at Your JSF powerhouse - JSF Consulting, Development and Courses in English and German Professional Support for Apache MyFaces
Re: [Tobago] Simplified theme handling
I've forgotten something: Put the tag resource-dirorg/apache/myfaces/tobago/renderkit/resource-dir in your tobago-config.xml. Instead of resource-dirtobago/resource-dir In further versions, this will be unnecessary. The resource-dir will be automatically resolved by the theme configuration. Sorry for any trouble. Udo Udo Schnurpfeil schrieb: Hello, the theme handling was simplified, so you need to change something in your build process. See https://issues.apache.org/jira/browse/TOBAGO-20 You have 2 possibilities: 1. For easy development: a) Put the theme jar in the classpath *) b) Define a ResourceServlet in the web.xml and bind it to the url-pattern of the theme-path c) Ensure load-theme-resources-from-classpath=true in tobago-config.xml (is default) You can see the use in the tobago-example-blank 2. For production: a) Put the theme jar in the classpath *) b) Unpack the resources (no classes and no properties) of the theme into the war. You may use the maven-theme-plugin c) Set load-theme-resources-from-classpath=false in tobago-config.xml You can see the use in the tobago-example-demo *) The tobago-theme-name-version-THEME.jar is no longer needed. You need only the tobago-theme-name-version.jar So you may remove some tags the pom, if using maven2: classifierTHEME/classifier scopeprovided/scope Regards Udo
Re: Using VariableResolver or ValueBinding in NonFacesRequestServlet
Hallo Hubert, can you show me the example, and the error stack trace? The way with the VariableResolver works in my case, with Sun RI and MyFaces. The ValueBinding I've not tried. There is also an example with tobago: http://svn.apache.org/viewcvs.cgi/incubator/tobago/trunk/tobago-example/tobago-example-nonfacesrequest/ HTH Udo Hubert Rabago schrieb: I'm working on a servlet based on the code in NonFacesRequestServlet. I read the example in http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls. At the point where it says put your initialization stuff here it shows using either a VariableResolver (VR) or a ValueBinding (VB) to retrieve a backing bean. I tried both approaches in the invokeApplication() method of NonFacesRequestServlet. What I found is that using MyFaces, neither of these approaches work. Using RI, the VR approach works, but the VB approach doesn't. I don't have the resulting stack trace right now, but I do remember that MyFaces ends in a NoSuchMethodError. My question is, is it supposed to work? Because if you say yes, that means I'm doing something wrong. If so, I'll share the entire WAR (or just the service() method I wrote) later today and ask for further help finding the problem. If you say it's not supposed to work, then is there another way to get to a managed bean in this situation? thanks, Hubert ps. Add'l info: * The call to NonFacesRequestServlet is the first request in the application, made directly after server startup. * I used the Tobago NonFacesRequestServlet as starting point. * In the invokeAppication() method, I tried using both VB and VR to retrieve a properly configured backing bean. * Switching jars from MyFaces to RI allows the VR approach to work. * The VB approach fails in both implementations.
Re: [TOBAGO] removing label attributes from components
Please do not remove it now. Keep it deprecated for a short while. And please keep the labelWithAccessKey and accessKey attributes also as deprecated. Regards Udo Volker Weber schrieb: Hi, cc'ing to users@ to inform tobago users. I'm working on TOBAGO-10 (Combine the attributes label, labelWithAccessKey and accessKey to one attribute label). On many tc:... components, those where a tx:... component exists, the label attribute is already marked as deprecated. Any objections removing label attribute on those components now ? Regards, Volker
Re: Having trouble with JSTL inside JSF
Hmmm, I worry about this will not solve my problem. I understand the t:aliasBean to use like this: page.jsp begin -- t:aliasBean alias=#{foo} value=#{foo1} / beans:foo / t:aliasBean alias=#{foo} value=#{foo2} / beans:foo / page.jsp end -- and use h:inputText value=#{foo.firstName} / in the custom tag. So far, so good. But, I want to use, of course, the tobago layout manager for layouting: t:panel f:facet name=layoutt:gridLayout ... /f:facet t:aliasBean alias=#{foo} value=#{foo1} / beans:foo / t:aliasBean alias=#{foo} value=#{foo2} / beans:foo / /t:panel The layout manager has to know all of its containers children to make an appropriate layout. So the panel has rendersChilden=true, and all the tags will be parsed before rendering. In the moment where #{foo.firstname} will be evaluated by the renderer (2 times), the value of #{foo} equals #{foo2}, because it will be done at the end tag of the panel (/t:panel). regards Udo Martin Marinschek wrote: Well, there is a way in MyFaces to do so. check out the t:aliasBean! regards, Martin On 8/26/05, Udo Schnurpfeil [EMAIL PROTECTED] wrote: * The fact that you can use a value binding expression on nearly every attribute makes using rt expressions redundant ... you can do anything you need with a value binding anyway. A very powerful feature in JSP 2.0 are Custom Tags. Having a bean Foo in your application with several instances. Now you write some code to edit this bean. If you put this code into a custom tag like WEB-INF/tags/beans/foo.tag begin -- %@ attribute name=bean % h:outputLabel value=here comes my bean: / h:inputText value=#{${bean}.firstName} / h:inputText value=#{${bean}.secondName} / foo.tag end you can use this snip many times on your jsp like page.jsp begin -- %@ taglib tagdir=/WEB-INF/tags/beans prefix=beans % beans:foo bean=foo1 / beans:foo bean=foo2 / beans:foo bean=foo3 / page.jsp end Unfortunately this does not work. Because of the rtexpression=false. In tobago we decided to enable the feature, to make such things work. Is there a way in JSF 1.2 / JSP 2.1 to make such sniplets run without dublicating code? Udo In JSF 1.2 / JSP 2.1, the concepts are getting unified ... but in the mean time (when the JSP container doesn't know what a value binding expression is) this was the decision made at the JSF spec level. Craig -- Dipl.-Math. Udo Schnurpfeil - Executive Officer - Atanion GmbH Software Development - Bismarckstraße 13 - 26122 Oldenburg - Germany phone +49 441 4082310 - mobile +49 174 9784746 - fax +49 441 4082333 mailto:[EMAIL PROTECTED] - http://www.atanion.com
Re: TR : Dynamic Locale change
If you set the locale in the UIViewRoot manually, I don't know if it will be passed on to the next UIViewRoot. One solution for you might be putting the users locale in the session (e.g. the key locale or user.locale if your have a user object) and use the locale attribute f:view locale=#{locale} or f:view locale=#{user.locale} on all of your JSF pages. regards, Udo Clément Maignien wrote: Sorry for asking so much questions but I'll have to present my webapp very soon and I need the multi-language to works fine. Has anybody any idea ? Why the locale is reset to the default one ? Could it comes from a redirect/ instruction in my faces-config.xml ? Ty for your help :D Clément -Message d'origine- *De :* Clément Maignien *Envoyé :* lundi 22 août 2005 18:18 *À :* MyFaces Discussion *Objet :* Dynamic Locale change Hi, I'm trying to allow the application user to change the language of my web app. I did it the way it is done in the myFaces 1.0.9 examples : a selectOneMenu with a choice of languages and an action button with that code : OptionBean { ... public String action { ... FacesUtil.setLocale(selectedLocale); ... } ... } FacesUtil { ... public static void setLocale(Locale l) { FacesContext.getCurrentInstance().getFacesContext().getViewRoot().setLocale(l); } ... } It works fine when the action is executed (the language change), but as soon as I navigate to another page of the App, the language is resetted to the default one. Why ? NB : I'm trying not to use the /locale/ parameter of the /f:view/ tag ... Thx, Clément.
Re: [newbie] Navigation does not work
and you reload every time the 1st page before pressing the button? Matthias Klein wrote: 1. remove from-view-id/LODetails.jsp/from-view-id (is not needed for this test) I did that 2. set action=viewuserratings directly, instead of the bean method I did that 3. check if the container really update your modified web-application (how do you deploy?) I deploy out of MyEclipse IDE 4. The console says that it does deploy the .war Unfortunately, none of the changes helped. Pressing the button does not help at all. Matt Udo Dexter Wong wrote: Hi, your sample worked for me. I am using jboss 4.0.2 java 1.5.004 windows xp I make some changes 0. changed files from *.jsf to *.jsp 1. my config files looks like navigation-rule from-view-id/LODetails.jsp/from-view-id navigation-case from-outcomeviewuserratings/from-outcome to-view-id/LORatings.jsp/to-view-id /navigation-case /navigation-rule 2. The LODetails.jsp is not using a resource file On 9/13/05, *Matthias Klein* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Actually, I did both but it did not change anything. Here the more complete excerpts from faces-config: navigation-rule from-view-id/LODetails.jsf/from-view-id navigation-case from-outcomeviewuserratings/from-outcome to-view-id/LORatings.jsf/to-view-id /navigation-case /navigation-rule managed-bean descriptionBacking-Bean for LODetails./description managed-bean-nameLODetailsBackingBean/managed-bean-name managed-bean-classca.gc.nrc.iit.toml.frontend.LODetailsBackingBean /manage d-bean-class managed-bean-scopesession/managed-bean-scope /managed-bean Something like that I did. But still - pressing the button does not do anything at all So I am wondering if I did something wrong or if that is a JSF/MyFaces-issue. Thanks Matt -Original Message- From: hicham abassi [mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED]] Sent: Dienstag, 13. September 2005 12:59 To: MyFaces Discussion Subject: Re: [newbie] Navigation does not work 1/ it seems that yo don't declared your bean LODetailsBackingBean into faces-config.xml 2/ you don't declared a string outcome viewuserratings for view-id LODetails.jsf 2005/9/13, Matthias Klein [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: I have started to create a simple MyFaces-App and encountered a problem with the navigation: Pressing a button does not do anything. Some code sniplets: - Page1: %@ page language=java % %@ taglib uri=http://java.sun.com/jsf/html; prefix=h % %@ taglib uri=http://java.sun.com/jsf/core http://java.sun.com/jsf/core prefix=f % f:loadBundle basename=ca.gc.nrc.iit.toml.frontend.bundles.LODetails var=MessageBundle/ !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html body f:view h:form id=LODetailsForm table tbody [..] td h:commandButton id=viewuserratings action=#{LODetailsBackingBean.viewUserRatings} value=#{MessageBundle.viewratingsbuttonlabel} / /td [..] /h:form /f:view /body /html --- Excerpt from faces-config: navigation-rule from-view-id/LODetails.jsf/from-view-id navigation-case to-view-id/LORatings.jsf/to-view-id /navigation-case /navigation-rule - Part of LODetailsBackingBean.java: public String viewUserRatings() { return viewuserratings; } I deployed that on Tomcat 5.5.9 with J2SDK 1.5.0_04 through MyEclipse IDE 4. I see the page1 but when I press the button, nothing happens. Why? Thanks a lot Matt -- hicham ABASSI [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] -- Dipl.-Math. Udo Schnurpfeil - Executive Officer - Atanion GmbH Software Development - Bismarckstraße 13 - 26122 Oldenburg - Germany phone +49 441 4082310 - mobile +49 174 9784746 - fax +49 441 4082333 mailto:[EMAIL PROTECTED] - http://www.atanion.com -- Dipl.-Math. Udo Schnurpfeil - Executive Officer - Atanion GmbH Software Development - Bismarckstraße 13 - 26122 Oldenburg - Germany phone +49
Re: [newbie] Navigation does not work
I assume it is one of those tiny yet stupid newbie problems but I can't wrap my brain around it... Okay, I've found it ;-) Your have used the f:view tag 2 times on one page. That is not allowed and will evidently confusing the framework.
Re: Custom Component
Which Faces implementation? Which version? What is the long version of Java? I'm wondering about the NullPointerException inside of java.lang.Throwable. What is the content of the JSP? Udo Goyo Escobar Escalero wrote: JAVA IS 1.4 I'm not using myFaces Original Message Follows From: Udo Schnurpfeil [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org To: MyFaces Discussion users@myfaces.apache.org Subject: Re: Custom Component Date: Thu, 15 Sep 2005 12:30:49 +0200 Hi! What is the Java version? What is the MyFaces version? Udo Goyo Escobar Escalero wrote: I've a problem extendign the UISelectOne component... My classes: package holderTagClasses; import javax.faces.application.Application; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.el.MethodBinding; import javax.faces.el.ValueBinding; import javax.faces.event.ValueChangeEvent; import javax.faces.webapp.UIComponentTag; public class BDE_IAS_ComboTag extends UIComponentTag{ String lista; String listaValores; String value; String valueChangeListener; public String getValueChangeListener() { return valueChangeListener; } public void setValueChangeListener(String valueChangeListener) { this.valueChangeListener = valueChangeListener; } public void setLista(String lista){ this.lista=lista; } public String getLista(){ return lista; } public void setListaValores(String lista){ this.listaValores=lista; } public String getListaValores(){ return listaValores; } public void setValue(String valor){ this.value=valor; } public String getValue(){ return value; } public void release() { // the super class method should be called super.release(); lista=null; value=null; valueChangeListener=null; listaValores=null; } protected void setProperties(UIComponent component) { super.setProperties(component); if (lista != null) { if (isValueReference(lista)) { ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding(lista); component.setValueBinding(lista, vb); } else { if(lista.length()==0){ lista=null; } else{ component.getAttributes().put(lista,lista); } } } if (listaValores != null) { if (isValueReference(listaValores)) { ValueBinding vb =FacesContext.getCurrentInstance().getApplication().createValueBinding(listaValores); component.setValueBinding(listaValores, vb); } else { if(listaValores.length()!=0){ component.getAttributes().put(listaValores,listaValores); } else{ if(lista!=null){ if(lista.length()0){ ValueBinding vb =FacesContext.getCurrentInstance().getApplication().createValueBinding(lista); component.setValueBinding(listaValores, vb); } } } } } if (value!=null) { if (isValueReference(value)) { ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding(value); component.setValueBinding(value, vb); } else { if(value.length()==0){ value=null; } else{ component.getAttributes().put(value,value); } } } if (valueChangeListener != null) { if (isValueReference(valueChangeListener)) { FacesContext context = FacesContext.getCurrentInstance(); Application app = context.getApplication(); MethodBinding mb = app.createMethodBinding(valueChangeListener, new Class[] { ValueChangeEvent.class }); component.getAttributes().put(valueChangeListener, mb); } } } public String getRendererType() { return combo; } public String getComponentType() { return combo; } } package rendererClasses; import java.io.IOException; import java.util.ArrayList; import java.util.Map; import javax.faces.component.EditableValueHolder; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.context.ResponseWriter; import javax.faces.render.Renderer; public class ComboRenderer extends Renderer{ public void encodeBegin(FacesContext context, UIComponent combo) throws IOException { ResponseWriter writer = context.getResponseWriter(); char
Re: Custom Component
hmmm, I think IBM uses an other java version... with the IBM I can't help your in the moment. I've no sources. But what I've seen is the start of the stacktrace. It seems that there is an NullPointerException, and while the construction of the NullPointerException an NullPointerException occures. Looks like a problem of IBM. Hope that helps Udo java.lang.NullPointerException at java.lang.Throwable.init(Throwable.java) at java.lang.Throwable.init(Throwable.java) at java.lang.NullPointerException.init(NullPointerException.java:61) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:675) Udo Schnurpfeil wrote: Which Faces implementation? Which version? What is the long version of Java? I'm wondering about the NullPointerException inside of java.lang.Throwable. What is the content of the JSP? Udo Goyo Escobar Escalero wrote: JAVA IS 1.4 I'm not using myFaces Original Message Follows From: Udo Schnurpfeil [EMAIL PROTECTED] Reply-To: MyFaces Discussion users@myfaces.apache.org To: MyFaces Discussion users@myfaces.apache.org Subject: Re: Custom Component Date: Thu, 15 Sep 2005 12:30:49 +0200 Hi! What is the Java version? What is the MyFaces version? Udo Goyo Escobar Escalero wrote: I've a problem extendign the UISelectOne component... My classes: package holderTagClasses; import javax.faces.application.Application; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; import javax.faces.el.MethodBinding; import javax.faces.el.ValueBinding; import javax.faces.event.ValueChangeEvent; import javax.faces.webapp.UIComponentTag; public class BDE_IAS_ComboTag extends UIComponentTag{ String lista; String listaValores; String value; String valueChangeListener; public String getValueChangeListener() { return valueChangeListener; } public void setValueChangeListener(String valueChangeListener) { this.valueChangeListener = valueChangeListener; } public void setLista(String lista){ this.lista=lista; } public String getLista(){ return lista; } public void setListaValores(String lista){ this.listaValores=lista; } public String getListaValores(){ return listaValores; } public void setValue(String valor){ this.value=valor; } public String getValue(){ return value; } public void release() { // the super class method should be called super.release(); lista=null; value=null; valueChangeListener=null; listaValores=null; } protected void setProperties(UIComponent component) { super.setProperties(component); if (lista != null) { if (isValueReference(lista)) { ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding(lista); component.setValueBinding(lista, vb); } else { if(lista.length()==0){ lista=null; } else{ component.getAttributes().put(lista,lista); } } } if (listaValores != null) { if (isValueReference(listaValores)) { ValueBinding vb =FacesContext.getCurrentInstance().getApplication().createValueBinding(listaValores); component.setValueBinding(listaValores, vb); } else { if(listaValores.length()!=0){ component.getAttributes().put(listaValores,listaValores); } else{ if(lista!=null){ if(lista.length()0){ ValueBinding vb =FacesContext.getCurrentInstance().getApplication().createValueBinding(lista); component.setValueBinding(listaValores, vb); } } } } } if (value!=null) { if (isValueReference(value)) { ValueBinding vb = FacesContext.getCurrentInstance().getApplication().createValueBinding(value); component.setValueBinding(value, vb); } else { if(value.length()==0){ value=null; } else{ component.getAttributes().put(value,value); } } } if (valueChangeListener != null) { if (isValueReference(valueChangeListener)) { FacesContext context = FacesContext.getCurrentInstance(); Application app = context.getApplication(); MethodBinding mb = app.createMethodBinding(valueChangeListener, new Class[] { ValueChangeEvent.class }); component.getAttributes().put(valueChangeListener, mb
Re: TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
Hello, this is a known problem, but we don't have a solution yet. The main idea of Tobago is that the source code (especially the JSP pages) are independent from the output format (e.g. HTML). If we allow to set onchange and onclick events, the source code will depend on the output format. One solution might be to use an abstract scripting language, which can be translated into different output formats. But there is no decision yet. Do you have a concrete problem? Maybe I can help you? Regards, Udo Dani Kenan wrote: Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani
Re: TOBAGO: howto handle client side events (e.g. onchage) in t:selectManyCheckBox
A workaround is to put something like this on the page (inside the t:page). t:script onload=initOnChange(); function initOnChange() { var x = document.getElementById(page:username); x.onchange = onChangeFunction; } function onChangeFunction() { alert('username changed'); } /t:script Udo Dani Kenan wrote: Hi, I would like to handle onchage or onclick events in the client side. It seems missing from the Tobago tld. Is there away around this limitation? Is there a chance to get a fix for that? TIA Dani
Combining components
I've found a way to combine components to new tags. There was already some discussion on a similar topic: http://www.mail-archive.com/users@myfaces.apache.org/msg06438.html http://www.mail-archive.com/users@myfaces.apache.org/msg06369.html My first approach was to write a tag file (JSP 2.0) like (this is a non-working short-sample): file: inWithLabel.tag %@ attribute name=label % %@ attribute name=value % %@ attribute name=binding % t:panel t:label value=${label} t:in value=${value} binding=${binding} /t:panel The first tests with label and value run well. But I found a big problem: If I want more advanced features like binding I have a problem: If the binding is not set the container will call setBinding() with an empty string, which is not allowed. So I write the Tag by hand: int doStartTag() { PanelTag panel = new PanelTag(); panel.setPageContext(pageContext); panel.doStartTag(); ... } You can see a real sample here: http://www.atanion.net/repos/asf/tobago/trunk/core/src/main/org/apache/myfaces/tobago/taglib/extension/InExtensionTag.java advantage of tag as java class: * Works with JSP 1.2 * not need rtexpression (JSP EL) inside of JSF tags, which is in common not allowed. * setter only will be called, if the value != null advantage of tag file: * the tag file looks much more tidy Regards, Udo
[tobago] new TagLib tobago-extension.tld
Hello, I've started to split the tobago.tld into 2 pieces: one for single components (tobago.tld may be renamed to tobago-component.tld in the future) and one for combined components (tobago-extension.tld) which will contain e.g. tx:in which is an in-tag with a label-tag. Internally the tx components are not UIComponentTags, but create a combination of tags derived from UIComponentTag. The implementation based on a technique which I've described here: http://www.mail-archive.com/users%40myfaces.apache.org/msg09930.html Migration: 1. Pages which use t:in with a label attribute: Please replace t:in by tx:in and add this declaration on the top of the page: %@ taglib uri=http://www.atanion.com/tobago/extension; prefix=tx % 2. Pages which use t:in without a label attribute: Nothing to do. Regards Udo -- Dipl.-Math. Udo Schnurpfeil - Executive Officer - Atanion GmbH Software Development - Bismarckstraße 13 - 26122 Oldenburg - Germany phone +49 441 4082310 - mobile +49 174 9784746 - fax +49 441 4082333 mailto:[EMAIL PROTECTED] - http://www.atanion.com
Re: [tobago] new TagLib tobago-extension.tld
P.S. tx:in label=foo value=bar/ is the same as t:panel f:facet name=layout t:gridLayout columns=fixed;*/ /f:facet t:label value=foo / t:in value=bar/ /t:panel but shorter, of course. Udo Udo Schnurpfeil wrote: Hello, I've started to split the tobago.tld into 2 pieces: one for single components (tobago.tld may be renamed to tobago-component.tld in the future) and one for combined components (tobago-extension.tld) which will contain e.g. tx:in which is an in-tag with a label-tag. Internally the tx components are not UIComponentTags, but create a combination of tags derived from UIComponentTag. The implementation based on a technique which I've described here: http://www.mail-archive.com/users%40myfaces.apache.org/msg09930.html Migration: 1. Pages which use t:in with a label attribute: Please replace t:in by tx:in and add this declaration on the top of the page: %@ taglib uri=http://www.atanion.com/tobago/extension; prefix=tx % 2. Pages which use t:in without a label attribute: Nothing to do. Regards Udo -- Dipl.-Math. Udo Schnurpfeil - Executive Officer - Atanion GmbH Software Development - Bismarckstraße 13 - 26122 Oldenburg - Germany phone +49 441 4082310 - mobile +49 174 9784746 - fax +49 441 4082333 mailto:[EMAIL PROTECTED] - http://www.atanion.com
Contribution of component library planned, live demo available
Dear MyFaces-Team, after the MyFaces BOF on the ApacheCON 2005 we have talked to Martin and Matthias about our extensional faces-based component library Tobago. We showed them some of our online examples visible at http://tobago.atanion.net and we all agreed, that it is important to build up an open-source- based community around this stuff. We learned how such a contribution in the ASF world works. So we are willing to add our component library into the incubator project to build such a communitiy. We are really interessted in your feedback regarding our examples. Unfortunatelly the descriptive text in the demo is not available in English yet. Hoping to hear from you Udo Schnurpfeil
Re: Contribution of component library planned, live demo availabl e
Hi! What I like less: JavaScript usage I don't like JavaScript too. But the focus of the current themes in Tobago is to write web applications with a look and feel like a desktop application. We want to provide as much confort for the user as possible. So we can't drop that stuff. (But like I said before, there are JavaScript-free themes possible.) Sheet-Component: After quite a bit of talks with endusers, I consider it important that the sheet will be set to the first page, after sorting. Thats right. We will change that. regards Udo
Re: Contribution of component library planned, live demo available
Hi, in the moment the focus is on mozilla/firefox and ie. Better Safari and Opera support is on the tasklist. Currently I've bought a Mac, so I'm interested myself ;-) regards Udo Am 22.07.2005 um 08:39 schrieb Klug, Boris: Hi! great components! What I like is the menu component with the feature to disable menu items and the abillity to select a menu item by using keyboard shortcuts. Also the table component is really impressive. The use of JavaScript for me is not a problem - as long as there are no conflicts with browsers. Beside Internet Explorer and Netscape/ Mozilla/Firefox you should also test your components with Apple Safari and Opera. -- Boris Klug
Re: Contribution of component library planned, live demo availabl e
Hi, thanks for your feedback. At the moment the themes/controls are working only with javascript, however it is possible to write a script-free theme. Of course in that case you will not have the full functionalltiy of the components (e.g. columnresizing in the sheet). The advantage is, that you can run the application in both versions (themes) without changing your application code. Even a user dependend selection of the suitable theme is possible. Regards Udo Am 21.07.2005 um 23:24 schrieb Jesse Alexander (KBSA 21): Hi Is there a Javascript free version of the components? regards Alexander -Original Message- From: Udo Schnurpfeil [mailto:[EMAIL PROTECTED] Sent: Thursday, July 21, 2005 11:13 PM To: dev@myfaces.apache.org; users@myfaces.apache.org Subject: Contribution of component library planned, live demo available Dear MyFaces-Team, after the MyFaces BOF on the ApacheCON 2005 we have talked to Martin and Matthias about our extensional faces-based component library Tobago. We showed them some of our online examples visible at http://tobago.atanion.net and we all agreed, that it is important to build up an open-source- based community around this stuff. We learned how such a contribution in the ASF world works. So we are willing to add our component library into the incubator project to build such a communitiy. We are really interessted in your feedback regarding our examples. Unfortunatelly the descriptive text in the demo is not available in English yet. Hoping to hear from you Udo Schnurpfeil
Re: [Tobago] Problem migrating to 1.0.15
Hi there, I've tested it and I didn't found any problems. Can you build a simple standalone JSP of your problem? You may also check, if you've set the columns attribute of the sheet correctly. Regards, Udo yazid schrieb: Hi All; I've migrated last week to 1.0.15; most of component are OK, except for tc:selectOneChoice inside a sheet columns, it's not rendred at all tc:column label=. tc:selectOneChoice value=#{b.name} f:selectItems value=#{b.items} / /tc:selectOneChoice Is that a bug in 1.0.15 or should I do a special use of select... Thanks
Re: [Tobago] Problem migrating to 1.0.15
I've build a simple demo page. It works in the tobago-example-demo on my box. You may try it. Regards, Udo yazid schrieb: Still not work, please Help I've tried the h:selectOneMenu.but I prefer tc:selectOneChoice ...better for facet. yazid wrote: Hi All; I've migrated last week to 1.0.15; most of component are OK, except for tc:selectOneChoice inside a sheet columns, it's not rendred at all tc:column label=. tc:selectOneChoice value=#{b.name} f:selectItems value=#{b.items} / /tc:selectOneChoice Is that a bug in 1.0.15 or should I do a special use of select... Thanks %-- * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the License); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an AS IS BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. --% %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc % %@ taglib uri=http://java.sun.com/jsf/core; prefix=f % %@ taglib tagdir=/WEB-INF/tags/layout prefix=layout % f:view tc:page width=500px height=500px f:facet name=layout tc:gridLayout/ /f:facet tc:sheet value=#{demo.solarList} columns=*;2* var=bean rows=10 showPageRange=left tc:column label=Number tc:in value=#{bean.name} required=true/ /tc:column tc:column label=Select tc:selectOneChoice value=#{bean.population} f:selectItems value=#{demo.toolbarIconItems}/ /tc:selectOneChoice /tc:column /tc:sheet /tc:page /f:view
Re: [Tobago] - How to programmatically set the label attribute of tc:box
You can set any attribute of any UIComponent in JSF like: component.getAttributes().put(key, value); where in your case key is label and value is your label. label should be used as TobagoConstants.ATTR_LABEL Hope that helps Udo P.S.: in later versions there might be a setter for the label. John schrieb: Ok, I have the box bound to a UIPanel component. But there's no setValue() method. Ok... It's in some sub-facet or attribute or something, but nothing I try works What is the trick? Help! John
Re: Internet Explorer on Windows 2003, 2000 breaks myFaces Tobago
Hi John, a) check if there occurs a JavaScript error. Is there the JavaScript Debugger installed? (I've had a problem with the aktivation of the debugger must switch it off and on before it works) b) Does e.g. the tobago-example-demo works on your system? c) jsf version? tobago version? Regards Udo John schrieb: After 3 weeks of battling this, adding no-caching headers and such, we had to release our software without support for Internet Explorer on Windows 2003, Windows 2000 and Windows 2000 PRO. With Tomcat running on any of the above including XP. Our myFaces/Tobago application only works on Internet Explorer 6 7, running on Windows XP (regardless of where Tomcat is hosted). Clicking on anything just refreshes the page. Javascript works, but the page is not rebuilt from the server. Firefox works great on all configurations. At one point, with Internet Explorer 6 running on Windows 2003 server, the app functioned correctly if I connected as http://machineName:9090 (Internet Zone), but failed if I connected as http://localhost:9090 (Intranet zone). I had custom security settings. I could repeatedly switch back and forth with the URL (works-doesn't-works-doesn't). Now during debugging I've reset the security to default. Can't rememberr exactly what I had. But if I enable all the options, it still doesn't work. But this makes me think it's the browser settings not cache headers... I'm completely lost and could really use some help with this. Customers are turning extremely ugly. Thanks for any help, John
Re: [Tobago] ValueChangeListener not called
I'm working on integration of the gendoc in the demo And we should rename gendoc to tobago-tour or something else and add more component examples. Ok? Regards, Udo
[Tobago] Important changes to tc:tree (please rename tc:tree to tc:treeOld)
Hello, today I've started the development of the long outstanding fundamental change of the tc:tree tag. (The change was announced in the tld-file long time ago.) If you are using this tag and you want to update to version 1.0.9-SNAPSHOT of tobago you should change your code by renaming tc:tree to tc:treeOld. The tc:treeOld tag will keep the old functionality for the time being. The main change is TOBAGO-18: Implement a var attribute for the tree The change will make the tree more flexible, the current version is very old, and has some disadvantages (e.g. the name of a node can't be set with an usual EL-Expression). I apologize for the trouble caused. Regards Udo
Re: [Tobago] multi row tabGroup?
Hi Helmut, there is an issue in Jira for a drop-down to show surplus tabs in a tabgroup. This will be resolved in the next time. *https://issues.apache.org/jira/browse/TOBAGO-176 Hope that helps Udo * [EMAIL PROTECTED] schrieb: Hi, is it possible to display the labels of the tabs in a tabGroup in multiple rows, if not all labels fit in one row, like Swing does it? Regards Helmut
Re: [Tobago] Important changes to tc:tree (please rename tc:tree to tc:treeOld)
Hello, it turns out, that the changes are very complex. The release of 1.0.9 is scheduled for 30/Nov/06. To have a stable version at release time I suggest to put the new tree for the time being in the sandbox and schedule the release of the fundamental change to version 1.1.0. Regards Udo Udo Schnurpfeil schrieb: Hello, today I've started the development of the long outstanding fundamental change of the tc:tree tag. (The change was announced in the tld-file long time ago.) If you are using this tag and you want to update to version 1.0.9-SNAPSHOT of tobago you should change your code by renaming tc:tree to tc:treeOld. The tc:treeOld tag will keep the old functionality for the time being. The main change is TOBAGO-18: Implement a var attribute for the tree The change will make the tree more flexible, the current version is very old, and has some disadvantages (e.g. the name of a node can't be set with an usual EL-Expression). I apologize for the trouble caused. Regards Udo
Re: [Tobago] Setter method tc:sheet
The tc:sheet can modify objects in the List, but will not set the list itself. HTH Udo PiotrekJ wrote: Hi again, Does tc:sheet support setter method? I can't do it. tc:sheet value=#{Bean.list}.. getList works, setList is not executed ;/ Th again, Peter
Re: [Tobago] tc:sheet with columns placed on different tabs
Hello Wojtek, you can put the sheet on multiple tabs and set in the columns you want to see rendered=true/false. Regards Udo Wojciech Blad schrieb: Hi All, Is possible to use one sheet control with columns placed on different tabs within single tabGroup? I have a table with large number of columns and instead of using one sheet control scrolled horizontally I want to use tabGroup control to place groups of columns on different tabs. Thanks for any suggestions. Wojtek
Re: Trinidad vs Tobago
Hi all, let me explain the actual status of the Tobago development: We have branched the development into the tobago-1.0.x branch and the trunk which is the next major release. The tobago-1.0.x branch is stable and basis of the actual releases. The next release (1.0.21) will come up in the next days. This branch contains bugfixes and some (smaller) new features. You can see the changes of the next release here: https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310273fixfor=12313470 The trunk (1.1.x) is an area of many refactorings and implementation of new features. But the status is still alpha. Here is a list of issues for the next major release: * Reimplementation of the layout management: - make renderer more independent from the layout management. - more flexible - more type of layout managers - better testability (unit tests) - better support for browser-window resizing * New tree implementation * Better support for integrating 3rd party components * Client side coordinates of action event on server side (mouse event, click event) * simplify css and javascript files * support for many tabs * improved sheet performance * more support for other renderkits and many internal refactorings (plan) * Generating tag classes and components * Enhanced tobago lifecyle with buildView layoutView (registerResource) / encodeView (renderResponse) * UIPopup should be a subform * UITab should be a naming container (which tab contains a component with a Message) * Z-Index Provider * replace prototype with dojo * replace commons-logging with slf4j * Remove deprecated methods and classes * public and internal packages(public api and internal api) * remove some static classes * improved TobagoResponseWriter for javascript (JSON) * TabGroup should be an ActionSource * TabChangeEvent should be an ActionEvent * requiredMessage validatorMessage converterMessage for all EditableValueHolder in Tobago Regards Udo kanth99 schrieb: Hi all, Thanks for your replies. Groovie wrote: On Thu, Jun 4, 2009 at 2:21 AM, Christian Groove groo...@groovesytems.de wrote: Salut Hi All, We are developing a web application with myfaces. That's fine, JSF is the cool think. I worked with Tobago, that comes with a great layout manager and some cool widgets. It is not my intention to overwhelm that nice project but it seems to be dead. The development that's totally wrong ... I hope you are right, but i looks like (for me) that the development activity slowed down. 2008 was a great year an i was lucky using this wonderful component library. Could you give us a short insight of the current development ? I switched to Richfaces and found it also useful for me. What are the advantages or drawback of one lib comparing the other? Thanks Groovy of new widgets seems not to proceed so you may better look to other Taglibs like Richfaces, Icefaces. Groovy This application needs proper navigation and UI .I have observed Trinidad has good navigation practices and other utilities.Tobago has some good layouts but not good navigation practices.both these technologies have featurs like PPR. Trinidat looks a little bit old-fashioned to me, anyway there seems to be only a little support for AJAX. could some one plaese advice us which is the better technology and the distinct features of these technologies. Thanks, Srikanth
Re: Tobago style sheet problem:
Hi, I didn't get what you want to change, sorry. Do you want to change one component on every page, or the general background, or only for a single page? Generally Firebug (for Firefox) is a great tool to find out the structure of the html and check which style effects a component. I agree, that the structure is sometimes not plain, that is an issue to to the Tobago 1.1 release. Regards, Udo kanth99 schrieb: Hi All, I have been modifying the Example demo of Tobago.I wanted to change the color of layout page ,so same will be applicable to all the pages.I modified the div tags in 'style.css' in the primary theme and the other supported themes.But the color of page has not changed. There are so many divs (for example tobago-gridLayout-default ,tobago-tab-link etc..).By changing hte color of which div element will change the color of layout,also how to quickly identify divs related to the components?I think Naming conventions are confusing. Thanks
Re: Trinidad vs Tobago
Hi Christian, I know the issue with the forEach. There are many aspects to notice with the interation stuff. I've written a sample for tobago 1.0.x which works with the c:forEach from the JSTL. But this not works with Facelets and also not with JSP-Tag-Files (because scriptlets are not allowed). I think we will find a solution for Tobago 1.1, but I can't promise it in the moment. An other aproach might be using a binding to a UIPanel, an building the components with Java-Code. That is not nice and has some pitfalls, but may a solution for you. Hope that helps Udo Christian Groove schrieb: Salut Udo, Hi all, let me explain the actual status of the Tobago development: We have branched the development into the tobago-1.0.x branch and the trunk which is the next major release. looks like, . that i was wrong. Tobago is still alive, great. The trunk (1.1.x) is an area of many refactorings and implementation of new features. But the status is still alpha. Here is a list of issues for the next major release: * Reimplementation of the layout management: (...) Another topic you may not thought before. Please reactivate the foreach! I had to code a database driven form with a couple of altering types of input-fields and selection boxes. The jsf-page was programmed as a dynamic formular engine. The taglib met almost all requirements i needed, with one exception: foreach !!! For this reason i hat to abuse the table tag, cause this was the only remaining container-element, that acts like a foreach. This solution had one drawback, the table size does not grow with its contents. So i estimated the size by couting the containing elements and patch the rows/size of the table, b. [stage direction to the audience] time to boo Groovie Voilá, that was the reason, why i needed foreach! Groovy Regards Udo Thanks for your good job. Does your company still uses Tobago ?
Re: Trinidad vs Tobago
I forgot the link: http://svn.apache.org/repos/asf/myfaces/tobago/branches/tobago-1.0.x/example/demo/src/main/webapp/best-practice/for-each.jsp Udo Schnurpfeil schrieb: Hi Christian, I know the issue with the forEach. There are many aspects to notice with the interation stuff. I've written a sample for tobago 1.0.x which works with the c:forEach from the JSTL. But this not works with Facelets and also not with JSP-Tag-Files (because scriptlets are not allowed). I think we will find a solution for Tobago 1.1, but I can't promise it in the moment. An other aproach might be using a binding to a UIPanel, an building the components with Java-Code. That is not nice and has some pitfalls, but may a solution for you. Hope that helps Udo Christian Groove schrieb: Salut Udo, Hi all, let me explain the actual status of the Tobago development: We have branched the development into the tobago-1.0.x branch and the trunk which is the next major release. looks like, . that i was wrong. Tobago is still alive, great. The trunk (1.1.x) is an area of many refactorings and implementation of new features. But the status is still alpha. Here is a list of issues for the next major release: * Reimplementation of the layout management: (...) Another topic you may not thought before. Please reactivate the foreach! I had to code a database driven form with a couple of altering types of input-fields and selection boxes. The jsf-page was programmed as a dynamic formular engine. The taglib met almost all requirements i needed, with one exception: foreach !!! For this reason i hat to abuse the table tag, cause this was the only remaining container-element, that acts like a foreach. This solution had one drawback, the table size does not grow with its contents. So i estimated the size by couting the containing elements and patch the rows/size of the table, b. [stage direction to the audience] time to boo Groovie Voilá, that was the reason, why i needed foreach! Groovy Regards Udo Thanks for your good job. Does your company still uses Tobago ?
Re: Trinidad vs Tobago
Hi Helmut, it is an important goal to make it possible to run a Tobago 1.0.21 application with Tobago 1.1 with little or without effort. In particular cases, there a some changes to do, but the main idea is, that applications will run. To be compatible, you should not use code which is marked as deprecated, of course. For your project, you may start with 1.0 and switch to 1.1 if we have a stable release. Regards, Udo Helmut Swaczinna schrieb: Hi Udo, well, this sounds good. But what about the release plan for a stable 1.1.0 version? We're thinking about lauching a new project starting with 1.1.0 to have the benefits of the new layout manager. But our project schedule is very short, so we don't have the time to deal with new bugs etc. How about the compatibility between 1.0.x and 1.1.x. Is it possible to port a 1.0.x app to 1.1.x with little effort and vice versa? Regards Helmut Udo Schnurpfeil schrieb: Hi all, let me explain the actual status of the Tobago development: We have branched the development into the tobago-1.0.x branch and the trunk which is the next major release. The tobago-1.0.x branch is stable and basis of the actual releases. The next release (1.0.21) will come up in the next days. This branch contains bugfixes and some (smaller) new features. You can see the changes of the next release here: https://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=truepid=12310273fixfor=12313470 The trunk (1.1.x) is an area of many refactorings and implementation of new features. But the status is still alpha. Here is a list of issues for the next major release: * Reimplementation of the layout management: - make renderer more independent from the layout management. - more flexible - more type of layout managers - better testability (unit tests) - better support for browser-window resizing * New tree implementation * Better support for integrating 3rd party components * Client side coordinates of action event on server side (mouse event, click event) * simplify css and javascript files * support for many tabs * improved sheet performance * more support for other renderkits and many internal refactorings (plan) * Generating tag classes and components * Enhanced tobago lifecyle with buildView layoutView (registerResource) / encodeView (renderResponse) * UIPopup should be a subform * UITab should be a naming container (which tab contains a component with a Message) * Z-Index Provider * replace prototype with dojo * replace commons-logging with slf4j * Remove deprecated methods and classes * public and internal packages(public api and internal api) * remove some static classes * improved TobagoResponseWriter for javascript (JSON) * TabGroup should be an ActionSource * TabChangeEvent should be an ActionEvent * requiredMessage validatorMessage converterMessage for all EditableValueHolder in Tobago Regards Udo kanth99 schrieb: Hi all, Thanks for your replies. Groovie wrote: On Thu, Jun 4, 2009 at 2:21 AM, Christian Groove groo...@groovesytems.de wrote: Salut Hi All, We are developing a web application with myfaces. That's fine, JSF is the cool think. I worked with Tobago, that comes with a great layout manager and some cool widgets. It is not my intention to overwhelm that nice project but it seems to be dead. The development that's totally wrong ... I hope you are right, but i looks like (for me) that the development activity slowed down. 2008 was a great year an i was lucky using this wonderful component library. Could you give us a short insight of the current development ? I switched to Richfaces and found it also useful for me. What are the advantages or drawback of one lib comparing the other? Thanks Groovy of new widgets seems not to proceed so you may better look to other Taglibs like Richfaces, Icefaces. Groovy This application needs proper navigation and UI .I have observed Trinidad has good navigation practices and other utilities.Tobago has some good layouts but not good navigation practices.both these technologies have featurs like PPR. Trinidat looks a little bit old-fashioned to me, anyway there seems to be only a little support for AJAX. could some one plaese advice us which is the better technology and the distinct features of these technologies. Thanks, Srikanth