AW: AW: How to create component without binding?
I took a component binding to a panelGrid for testing and it worked quite well but the dynamically created components appear only once in the page. If I access the page a second time or reload the they disapper. The code I used is copied from here (the last entry): http://forums.java.sun.com/thread.jspa?threadID=555626&messageID=2816029 What do I have to do that the components appear every time? I use facelets, does this have any impact? Many thanks in advance and best regards, René -Ursprüngliche Nachricht- Von: Volker Weber [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 13:38 An: MyFaces Discussion Betreff: Re: AW: How to create component without binding? Hi, the tag should render nothing but just the children if no "style" or "styleClass" attributes are present. So should do. see: http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/tlddocs/h/panelGroup.ht ml regards Volker Rene Ott wrote: > That sounds good ;) > > How can I realize this? > > > > Like this? > > Does a component exist that acts just like a container for other components > but itself doesn't get displayed? This way it would be possible to make a > binding to this component without the need to display the component. > > René > > -Ursprüngliche Nachricht- > Von: Martin Marinschek [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 4. November 2005 11:06 > An: MyFaces Discussion > Betreff: Re: How to create component without binding? > > Then you'll need to do a binding for the ViewRoot ;) > > How would JSF know where to put your components, if you don't have > them in the template? > > regards, > > Martin > > On 11/4/05, Rene Ott <[EMAIL PROTECTED]> wrote: > >>First thanks for the many answers in just one hour :-) >> >>Why do I need a binding to do this? If I need a binding to for example a >>panelgroup this means that on the page the panelgroup gets rendered > > although > >>I don't need (or want) it. >> >>Lets assume I want to create dynamically several outputlinks. With a >>panelgroup binding they are all inside a panelgroup. Why cannot I just > > hang > >>the outputlinks in UIviewroot and skip all the binding stuff? >> >>René Ott >> >>-Ursprüngliche Nachricht- >>Von: Martin Marinschek [mailto:[EMAIL PROTECTED] >>Gesendet: Freitag, 4. November 2005 09:49 >>An: MyFaces Discussion >>Betreff: Re: How to create component without binding? >> >>What you want to do is do a binding for panelGroup >> >>and then add children to this panelGroup - with this you can create >>extra components. >> >>code snippet (not compiled except in my head ;): >> >>public UIComponent getPanelGroup() >>{ >>HtmlPanelGroup panelGroup = new HtmlPanelGroup(); >>panelGroup.getChildren().add(new HtmlInputText()); >>panelGroup.getChildren().add(new HtmlOutputText()); >>... >> >>return panelGroup; >>} >> >>regards, >> >>Martin >> >>On 11/4/05, Nikita Koselev <[EMAIL PROTECTED]> wrote: >> >>>Can you explain your task better, please. >>> >>>Nikita >>> >>>On 04/11/05, Rene Ott <[EMAIL PROTECTED]> wrote: >>> >>>>Hello @all, >>>> >>>>I would like to create dynamically inside a backing bean some >> >>components. >> >>>>Looking around in the net I found only solutions that create a binding >> >>to a >> >>>>component, for example: >>>> >>>> >>>>... >>>> >>>>This means that I always need an existing component like panelGroup > > for > >>>>creating with a binding some components. >>>> >>>>How can I create dynamically components without using a binding (and > > in > >>the >> >>>>end an extra component)? >>>> >>>>Thanks and best regards, >>>>René Ott >>>> >>>> >>>> >>> >> >>-- >> >>http://www.irian.at >>Your JSF powerhouse - >>JSF Trainings in English and German >> >> >> >> > > > > -- > > http://www.irian.at > Your JSF powerhouse - > JSF Trainings in English and German > > > -- 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.
AW: How to create component without binding?
That sounds good ;) How can I realize this? Like this? Does a component exist that acts just like a container for other components but itself doesn't get displayed? This way it would be possible to make a binding to this component without the need to display the component. René -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 11:06 An: MyFaces Discussion Betreff: Re: How to create component without binding? Then you'll need to do a binding for the ViewRoot ;) How would JSF know where to put your components, if you don't have them in the template? regards, Martin On 11/4/05, Rene Ott <[EMAIL PROTECTED]> wrote: > First thanks for the many answers in just one hour :-) > > Why do I need a binding to do this? If I need a binding to for example a > panelgroup this means that on the page the panelgroup gets rendered although > I don't need (or want) it. > > Lets assume I want to create dynamically several outputlinks. With a > panelgroup binding they are all inside a panelgroup. Why cannot I just hang > the outputlinks in UIviewroot and skip all the binding stuff? > > René Ott > > -Ursprüngliche Nachricht- > Von: Martin Marinschek [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 4. November 2005 09:49 > An: MyFaces Discussion > Betreff: Re: How to create component without binding? > > What you want to do is do a binding for panelGroup > > and then add children to this panelGroup - with this you can create > extra components. > > code snippet (not compiled except in my head ;): > > public UIComponent getPanelGroup() > { > HtmlPanelGroup panelGroup = new HtmlPanelGroup(); > panelGroup.getChildren().add(new HtmlInputText()); > panelGroup.getChildren().add(new HtmlOutputText()); > ... > > return panelGroup; > } > > regards, > > Martin > > On 11/4/05, Nikita Koselev <[EMAIL PROTECTED]> wrote: > > Can you explain your task better, please. > > > > Nikita > > > > On 04/11/05, Rene Ott <[EMAIL PROTECTED]> wrote: > > > Hello @all, > > > > > > I would like to create dynamically inside a backing bean some > components. > > > Looking around in the net I found only solutions that create a binding > to a > > > component, for example: > > > > > > > > > ... > > > > > > This means that I always need an existing component like panelGroup for > > > creating with a binding some components. > > > > > > How can I create dynamically components without using a binding (and in > the > > > end an extra component)? > > > > > > Thanks and best regards, > > > René Ott > > > > > > > > > > > > > > -- > > http://www.irian.at > Your JSF powerhouse - > JSF Trainings in English and German > > > > -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
AW: How to create component without binding?
First thanks for the many answers in just one hour :-) Why do I need a binding to do this? If I need a binding to for example a panelgroup this means that on the page the panelgroup gets rendered although I don't need (or want) it. Lets assume I want to create dynamically several outputlinks. With a panelgroup binding they are all inside a panelgroup. Why cannot I just hang the outputlinks in UIviewroot and skip all the binding stuff? René Ott -Ursprüngliche Nachricht- Von: Martin Marinschek [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 4. November 2005 09:49 An: MyFaces Discussion Betreff: Re: How to create component without binding? What you want to do is do a binding for panelGroup and then add children to this panelGroup - with this you can create extra components. code snippet (not compiled except in my head ;): public UIComponent getPanelGroup() { HtmlPanelGroup panelGroup = new HtmlPanelGroup(); panelGroup.getChildren().add(new HtmlInputText()); panelGroup.getChildren().add(new HtmlOutputText()); ... return panelGroup; } regards, Martin On 11/4/05, Nikita Koselev <[EMAIL PROTECTED]> wrote: > Can you explain your task better, please. > > Nikita > > On 04/11/05, Rene Ott <[EMAIL PROTECTED]> wrote: > > Hello @all, > > > > I would like to create dynamically inside a backing bean some components. > > Looking around in the net I found only solutions that create a binding to a > > component, for example: > > > > > > ... > > > > This means that I always need an existing component like panelGroup for > > creating with a binding some components. > > > > How can I create dynamically components without using a binding (and in the > > end an extra component)? > > > > Thanks and best regards, > > René Ott > > > > > > > -- http://www.irian.at Your JSF powerhouse - JSF Trainings in English and German
How to create component without binding?
Hello @all, I would like to create dynamically inside a backing bean some components. Looking around in the net I found only solutions that create a binding to a component, for example: ... This means that I always need an existing component like panelGroup for creating with a binding some components. How can I create dynamically components without using a binding (and in the end an extra component)? Thanks and best regards, René Ott
Facelets - MyFaces sample program problems
Hello @all, I am trying to get the Facelets - MyFaces sample program (available here: http://people.apache.org/~matzew/myfacesFacelets.war) running but I get some errors concerning the DTD and the DOCTYPE of the faces-config.xml: SCHWERWIEGEND: Parse Error at line 2 column 14: Document is invalid: no grammar found. org.xml.sax.SAXParseException: Document is invalid: no grammar found. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseEx ception(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartEl ement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDi spatcher.scanRootElementHook(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragm entContentDispatcher.dispatch(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanD ocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.commons.digester.Digester.parse(Digester.java:1548) at org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl. getFacesConfig(DigesterFacesConfigUnmarshallerImpl.java:183) at org.apache.myfaces.config.FacesConfigurator.feedWebAppConfig(FacesConfigurat or.java:387) at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java :120) at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupSer vletContextListener.java:63) at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(S tartupServletContextListener.java:46) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java: 3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.start(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) 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:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) 09.10.2005 15:11:42 org.apache.commons.digester.Digester error SCHWERWIEGEND: Parse Error at line 2 column 14: Document root element "faces-config", must match DOCTYPE root "null". org.xml.sax.SAXParseException: Document root element "faces-config", must match DOCTYPE root "null". at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseEx ception(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartEl ement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDi spatcher.scanRootElementHook(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$Fragm entContentDispatcher.dispatch(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanD ocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.pa