You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Adam Furmanczuk <af...@knowtrek.com> on 2011/06/20 13:18:12 UTC
tomahawk 1.1 on apache tomcat 7.0.12 with jsf 2.0
Hi
I am using Apache MyFaces for my project (jsf 2.0) and I want to use the
tomahawk framework (for uploadfile, calendar, etc)
Sadly, Tomcat cancell buidling the war.
When I comment out filter mapping for tomahawk, war gets deployed, but
sided that use:
<%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
fail with server 500 error.
when i put filter mapping as suggested
http://myfaces.apache.org/tomahawk/extensionsFilter.html
all fails with SEVERE Filter error.
Please help I need the upload methods urgently for my apache myfaces
webproject.
Best Regards,
Adam
RE: UIRepeat offset and size problem
Posted by RICARD MORE FARRES <ri...@mango.com>.
Hi Martin,
Yes, I have found that findComponent is supossed to search from the 'rootComponent' if the expression searched starts with ':' (value of NamingContainer.SEPARATOR_CHAR), but I tried with render=":text" and still don't works.
Also, you can add the context param javax.faces.SEPARATOR_CHAR="." that gives value to that separator char (replaces the default value of ":"), but anyway I get the same exception:
javax.faces.FacesException: Component with id:.text not found
Regards,
-----Mensaje original-----
De: martin.marinschek@gmail.com [mailto:martin.marinschek@gmail.com] En nombre de Martin Marinschek
Enviado el: jueves, 30 de junio de 2011 7:42
Para: MyFaces Development
Asunto: Re: UIRepeat offset and size problem
Hi Ricard,
no, this is not a bug. findComponent is supposed to work from the
enclosing naming container. If you need to search without this, you
need to traverse the hierarchy. I do think I remember we implemented
"::text" for a case like this already in the standard - in any case,
the component libraries I am using imlement this already ;)
best regards,
Martin
On Tue, Jun 21, 2011 at 3:06 PM, RICARD MORE FARRES
<ri...@mango.com> wrote:
> Thanks Leonardo,
>
> Already done, but I have another question:
>
> Which is the reason that UIComponentBase.findComponent(String expr) looks for the searched component, starting from the closest parent that implements NamingContainer?
> Look at this example:
>
> <h:outputText id="text" value="#{bean.texto}"></h:outputText>
> <ui:repeat id="repeat" value="#{bean.textos}" var="texto">
> <h:commandLink id="command" value="#{texto}">
> <f:ajax event="click" listener="#{bean.actionListener}" render="text"/>
> </h:commandLink>
> </ui:repeat>
>
> If we try to render this view, we get:
> javax.faces.FacesException: Component with id:texto not found
>
> This exception is trown by HtmlAjaxBehaviorRenderer.mapToString when he find every component identified in the render attribute. I think they converts the id's in the render attribute, to the clientId of every component referenced.
> The problem is that UIRepeat implements NamingContainer, so the commandLink inside that UIRepeat is gonna search the component identified by 'text' inside the children list of repeat tag.
> But it should works, isn't it? Nothing wrong to re render an outputtext from command link that is inside a repeat.
> I have reimplemented method findComponent in my own components, in order to find the id starting from the view root... and it works.
>
> Is this another bug?
>
> Regards,
> Ricard
>
> -----Mensaje original-----
> De: Leonardo Uribe [mailto:lu4242@gmail.com]
> Enviado el: lunes, 20 de junio de 2011 19:09
> Para: MyFaces Development
> CC: RICARD MORE FARRES
> Asunto: Re: UIRepeat offset and size problem
>
> Hi
>
> It is a bug. Please create an issue here:
>
> https://issues.apache.org/jira/browse/MYFACES
>
> I have already a patch, so as soon as you create the issue I'll commit
> it. Later, you can get a nightly build snapshot here:
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/
>
> regards,
>
> Leonardo Uribe
>
> 2011/6/20 RICARD MORE FARRES <ri...@mango.com>:
>> Hello,
>>
>>
>>
>> I am testing MyFaces 2.1.1 implemantation, in order to upgrade our
>> aplication from version 1.2.7.
>>
>>
>>
>> I have found a problem with parameters offset and size of ui:repeat tag.
>>
>> offset sets the first index of the list to iterate over.
>>
>> size is the number of element to iterate.
>>
>>
>>
>> If I have a list of Strings like this:
>>
>> private String[] textos = new String[] {"B1", "B2", "B3", "B4", "B5", "B6",
>> "B7"};
>>
>>
>>
>> public String[] getTextos() {
>>
>> return textos;
>>
>> }
>>
>>
>>
>> And I declare repeat tag:
>>
>> <ui:repeat value="#{bean.textos}" var="texto" offset="0" size="1">
>>
>> <h:outputText value="#{texto}"/><br/>
>>
>> </ui:repeat>
>>
>>
>>
>> It shows elements B1 and B2 (iterate over indexes 0 and 1). If I change
>> offset to 1, it will show elements B2 and B3.
>>
>> But if I set offset="2" in order to ietare over indexes 2 and 3 (elements B3
>> and B4), I get an exception:
>>
>>
>>
>> javax.faces.FacesException: iteration offset cannot be greater than
>> collection size
>>
>> at
>> org.apache.myfaces.view.facelets.component.UIRepeat._validateAttributes(UIRepeat.java:552)
>>
>> at
>> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:581)
>>
>> ...
>>
>>
>>
>> If I want to avoid this error, size must be allways greater tha offset, but
>> it should be possible to iterate over last two elements of a 102 elements
>> list starting from index 100, for example (offset=100,size=1).
>>
>> And should not be "1" the lower value for size? Now, if you set 0 to size,
>> ui:repeat iterates once...
>>
>>
>>
>> Thanks in advance,
>>
>> Ricard
>>
>>
>>
>>
>>
>> Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail
>> si no es realmente necesario.
>>
>> Este correo y sus archivos asociados son privados y confidenciales y va
>> dirigido exclusivamente a su destinatario. Si recibe este correo sin ser el
>> destinatario del mismo,le rogamos proceda a su eliminación y lo ponga en
>> conocimiento del emisor. La difusión por cualquier medio del contenido de
>> este correo podría ser sancionada conforme a lo previsto en las leyes
>> españolas. No se autoriza la utilización con fines comerciales o para su
>> incorporación a ficheros automatizados de las direcciones del emisor o del
>> destinatario.
>>
>> Each one of us can do our bit for the environment: please, do not print this
>> e-mail unless it is absolutely essential.
>>
>> This e-mail and its attached files are confidential and are exclusively
>> intented for their addressees. If you have received this e-mail and it is
>> not addressed to you, please notify us of the error by replying to it before
>> proceeding to delete it. The diffusion of the contents of this e-mail by
>> whatever means may be penalised in accordance with Spanish law. The
>> utilisation of the addresses of the sender and the addressee for commercial
>> purposes or for inclusion on computer files is not authorized.
>>
>
>
>
>
>
>
>
>
> Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail si no es realmente necesario
>
>
>
>
>
>
>
> Este correo y sus archivos asociados son privados y confidenciales y va dirigido exclusivamente a su destinatario. Si
>
>
>
> recibe este correo sin ser el destinatario del mismo, le rogamos proceda a su eliminacion y lo ponga en conocimiento
>
>
>
> del emisor. La difusion por cualquier medio del contenido de este correo podría ser sancionada conforme a lo previsto
>
>
>
> en las leyes espanyolas. No se autoriza la utilizacion con fines comerciales o para su incorporacion a ficheros
>
>
>
> automatizados de las direcciones del emisor o del destinatario.
>
>
>
>
>
>
>
> Each one of us can do our bit for the environment: please, do not print this e-mail unless it is absolutely essential.
>
>
>
>
>
>
>
> This mail and its attached files are confidential and are exclusively intented to their addresses. In case you may
>
>
>
> receive this mail not being its address, we beg you to let us know the error by reply and to proceed to delete it. The
>
>
>
> circulation by any mean of this mail could be penalised in accordance with the Spanish legislation. The use of both
>
>
>
> the transmitter and the addresses with a commercial aim, or in order to be incorporated to automated files,
>
>
>
> is not authorized.
>
>
>
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail si no es realmente necesario
Este correo y sus archivos asociados son privados y confidenciales y va dirigido exclusivamente a su destinatario. Si
recibe este correo sin ser el destinatario del mismo, le rogamos proceda a su eliminacion y lo ponga en conocimiento
del emisor. La difusion por cualquier medio del contenido de este correo podría ser sancionada conforme a lo previsto
en las leyes espanyolas. No se autoriza la utilizacion con fines comerciales o para su incorporacion a ficheros
automatizados de las direcciones del emisor o del destinatario.
Each one of us can do our bit for the environment: please, do not print this e-mail unless it is absolutely essential.
This mail and its attached files are confidential and are exclusively intented to their addresses. In case you may
receive this mail not being its address, we beg you to let us know the error by reply and to proceed to delete it. The
circulation by any mean of this mail could be penalised in accordance with the Spanish legislation. The use of both
the transmitter and the addresses with a commercial aim, or in order to be incorporated to automated files,
is not authorized.
Re: UIRepeat offset and size problem
Posted by Martin Marinschek <mm...@apache.org>.
Hi Ricard,
no, this is not a bug. findComponent is supposed to work from the
enclosing naming container. If you need to search without this, you
need to traverse the hierarchy. I do think I remember we implemented
"::text" for a case like this already in the standard - in any case,
the component libraries I am using imlement this already ;)
best regards,
Martin
On Tue, Jun 21, 2011 at 3:06 PM, RICARD MORE FARRES
<ri...@mango.com> wrote:
> Thanks Leonardo,
>
> Already done, but I have another question:
>
> Which is the reason that UIComponentBase.findComponent(String expr) looks for the searched component, starting from the closest parent that implements NamingContainer?
> Look at this example:
>
> <h:outputText id="text" value="#{bean.texto}"></h:outputText>
> <ui:repeat id="repeat" value="#{bean.textos}" var="texto">
> <h:commandLink id="command" value="#{texto}">
> <f:ajax event="click" listener="#{bean.actionListener}" render="text"/>
> </h:commandLink>
> </ui:repeat>
>
> If we try to render this view, we get:
> javax.faces.FacesException: Component with id:texto not found
>
> This exception is trown by HtmlAjaxBehaviorRenderer.mapToString when he find every component identified in the render attribute. I think they converts the id's in the render attribute, to the clientId of every component referenced.
> The problem is that UIRepeat implements NamingContainer, so the commandLink inside that UIRepeat is gonna search the component identified by 'text' inside the children list of repeat tag.
> But it should works, isn't it? Nothing wrong to re render an outputtext from command link that is inside a repeat.
> I have reimplemented method findComponent in my own components, in order to find the id starting from the view root... and it works.
>
> Is this another bug?
>
> Regards,
> Ricard
>
> -----Mensaje original-----
> De: Leonardo Uribe [mailto:lu4242@gmail.com]
> Enviado el: lunes, 20 de junio de 2011 19:09
> Para: MyFaces Development
> CC: RICARD MORE FARRES
> Asunto: Re: UIRepeat offset and size problem
>
> Hi
>
> It is a bug. Please create an issue here:
>
> https://issues.apache.org/jira/browse/MYFACES
>
> I have already a patch, so as soon as you create the issue I'll commit
> it. Later, you can get a nightly build snapshot here:
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/
>
> regards,
>
> Leonardo Uribe
>
> 2011/6/20 RICARD MORE FARRES <ri...@mango.com>:
>> Hello,
>>
>>
>>
>> I am testing MyFaces 2.1.1 implemantation, in order to upgrade our
>> aplication from version 1.2.7.
>>
>>
>>
>> I have found a problem with parameters offset and size of ui:repeat tag.
>>
>> offset sets the first index of the list to iterate over.
>>
>> size is the number of element to iterate.
>>
>>
>>
>> If I have a list of Strings like this:
>>
>> private String[] textos = new String[] {"B1", "B2", "B3", "B4", "B5", "B6",
>> "B7"};
>>
>>
>>
>> public String[] getTextos() {
>>
>> return textos;
>>
>> }
>>
>>
>>
>> And I declare repeat tag:
>>
>> <ui:repeat value="#{bean.textos}" var="texto" offset="0" size="1">
>>
>> <h:outputText value="#{texto}"/><br/>
>>
>> </ui:repeat>
>>
>>
>>
>> It shows elements B1 and B2 (iterate over indexes 0 and 1). If I change
>> offset to 1, it will show elements B2 and B3.
>>
>> But if I set offset="2" in order to ietare over indexes 2 and 3 (elements B3
>> and B4), I get an exception:
>>
>>
>>
>> javax.faces.FacesException: iteration offset cannot be greater than
>> collection size
>>
>> at
>> org.apache.myfaces.view.facelets.component.UIRepeat._validateAttributes(UIRepeat.java:552)
>>
>> at
>> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:581)
>>
>> ...
>>
>>
>>
>> If I want to avoid this error, size must be allways greater tha offset, but
>> it should be possible to iterate over last two elements of a 102 elements
>> list starting from index 100, for example (offset=100,size=1).
>>
>> And should not be "1" the lower value for size? Now, if you set 0 to size,
>> ui:repeat iterates once...
>>
>>
>>
>> Thanks in advance,
>>
>> Ricard
>>
>>
>>
>>
>>
>> Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail
>> si no es realmente necesario.
>>
>> Este correo y sus archivos asociados son privados y confidenciales y va
>> dirigido exclusivamente a su destinatario. Si recibe este correo sin ser el
>> destinatario del mismo,le rogamos proceda a su eliminación y lo ponga en
>> conocimiento del emisor. La difusión por cualquier medio del contenido de
>> este correo podría ser sancionada conforme a lo previsto en las leyes
>> españolas. No se autoriza la utilización con fines comerciales o para su
>> incorporación a ficheros automatizados de las direcciones del emisor o del
>> destinatario.
>>
>> Each one of us can do our bit for the environment: please, do not print this
>> e-mail unless it is absolutely essential.
>>
>> This e-mail and its attached files are confidential and are exclusively
>> intented for their addressees. If you have received this e-mail and it is
>> not addressed to you, please notify us of the error by replying to it before
>> proceeding to delete it. The diffusion of the contents of this e-mail by
>> whatever means may be penalised in accordance with Spanish law. The
>> utilisation of the addresses of the sender and the addressee for commercial
>> purposes or for inclusion on computer files is not authorized.
>>
>
>
>
>
>
>
>
>
> Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail si no es realmente necesario
>
>
>
>
>
>
>
> Este correo y sus archivos asociados son privados y confidenciales y va dirigido exclusivamente a su destinatario. Si
>
>
>
> recibe este correo sin ser el destinatario del mismo, le rogamos proceda a su eliminacion y lo ponga en conocimiento
>
>
>
> del emisor. La difusion por cualquier medio del contenido de este correo podría ser sancionada conforme a lo previsto
>
>
>
> en las leyes espanyolas. No se autoriza la utilizacion con fines comerciales o para su incorporacion a ficheros
>
>
>
> automatizados de las direcciones del emisor o del destinatario.
>
>
>
>
>
>
>
> Each one of us can do our bit for the environment: please, do not print this e-mail unless it is absolutely essential.
>
>
>
>
>
>
>
> This mail and its attached files are confidential and are exclusively intented to their addresses. In case you may
>
>
>
> receive this mail not being its address, we beg you to let us know the error by reply and to proceed to delete it. The
>
>
>
> circulation by any mean of this mail could be penalised in accordance with the Spanish legislation. The use of both
>
>
>
> the transmitter and the addresses with a commercial aim, or in order to be incorporated to automated files,
>
>
>
> is not authorized.
>
>
>
>
>
--
http://www.irian.at
Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German
Professional Support for Apache MyFaces
RE: UIRepeat offset and size problem
Posted by RICARD MORE FARRES <ri...@mango.com>.
Thanks Leonardo,
Already done, but I have another question:
Which is the reason that UIComponentBase.findComponent(String expr) looks for the searched component, starting from the closest parent that implements NamingContainer?
Look at this example:
<h:outputText id="text" value="#{bean.texto}"></h:outputText>
<ui:repeat id="repeat" value="#{bean.textos}" var="texto">
<h:commandLink id="command" value="#{texto}">
<f:ajax event="click" listener="#{bean.actionListener}" render="text"/>
</h:commandLink>
</ui:repeat>
If we try to render this view, we get:
javax.faces.FacesException: Component with id:texto not found
This exception is trown by HtmlAjaxBehaviorRenderer.mapToString when he find every component identified in the render attribute. I think they converts the id's in the render attribute, to the clientId of every component referenced.
The problem is that UIRepeat implements NamingContainer, so the commandLink inside that UIRepeat is gonna search the component identified by 'text' inside the children list of repeat tag.
But it should works, isn't it? Nothing wrong to re render an outputtext from command link that is inside a repeat.
I have reimplemented method findComponent in my own components, in order to find the id starting from the view root... and it works.
Is this another bug?
Regards,
Ricard
-----Mensaje original-----
De: Leonardo Uribe [mailto:lu4242@gmail.com]
Enviado el: lunes, 20 de junio de 2011 19:09
Para: MyFaces Development
CC: RICARD MORE FARRES
Asunto: Re: UIRepeat offset and size problem
Hi
It is a bug. Please create an issue here:
https://issues.apache.org/jira/browse/MYFACES
I have already a patch, so as soon as you create the issue I'll commit
it. Later, you can get a nightly build snapshot here:
https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/
regards,
Leonardo Uribe
2011/6/20 RICARD MORE FARRES <ri...@mango.com>:
> Hello,
>
>
>
> I am testing MyFaces 2.1.1 implemantation, in order to upgrade our
> aplication from version 1.2.7.
>
>
>
> I have found a problem with parameters offset and size of ui:repeat tag.
>
> offset sets the first index of the list to iterate over.
>
> size is the number of element to iterate.
>
>
>
> If I have a list of Strings like this:
>
> private String[] textos = new String[] {"B1", "B2", "B3", "B4", "B5", "B6",
> "B7"};
>
>
>
> public String[] getTextos() {
>
> return textos;
>
> }
>
>
>
> And I declare repeat tag:
>
> <ui:repeat value="#{bean.textos}" var="texto" offset="0" size="1">
>
> <h:outputText value="#{texto}"/><br/>
>
> </ui:repeat>
>
>
>
> It shows elements B1 and B2 (iterate over indexes 0 and 1). If I change
> offset to 1, it will show elements B2 and B3.
>
> But if I set offset="2" in order to ietare over indexes 2 and 3 (elements B3
> and B4), I get an exception:
>
>
>
> javax.faces.FacesException: iteration offset cannot be greater than
> collection size
>
> at
> org.apache.myfaces.view.facelets.component.UIRepeat._validateAttributes(UIRepeat.java:552)
>
> at
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:581)
>
> ...
>
>
>
> If I want to avoid this error, size must be allways greater tha offset, but
> it should be possible to iterate over last two elements of a 102 elements
> list starting from index 100, for example (offset=100,size=1).
>
> And should not be "1" the lower value for size? Now, if you set 0 to size,
> ui:repeat iterates once...
>
>
>
> Thanks in advance,
>
> Ricard
>
>
>
>
>
> Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail
> si no es realmente necesario.
>
> Este correo y sus archivos asociados son privados y confidenciales y va
> dirigido exclusivamente a su destinatario. Si recibe este correo sin ser el
> destinatario del mismo,le rogamos proceda a su eliminación y lo ponga en
> conocimiento del emisor. La difusión por cualquier medio del contenido de
> este correo podría ser sancionada conforme a lo previsto en las leyes
> españolas. No se autoriza la utilización con fines comerciales o para su
> incorporación a ficheros automatizados de las direcciones del emisor o del
> destinatario.
>
> Each one of us can do our bit for the environment: please, do not print this
> e-mail unless it is absolutely essential.
>
> This e-mail and its attached files are confidential and are exclusively
> intented for their addressees. If you have received this e-mail and it is
> not addressed to you, please notify us of the error by replying to it before
> proceeding to delete it. The diffusion of the contents of this e-mail by
> whatever means may be penalised in accordance with Spanish law. The
> utilisation of the addresses of the sender and the addressee for commercial
> purposes or for inclusion on computer files is not authorized.
>
Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail si no es realmente necesario
Este correo y sus archivos asociados son privados y confidenciales y va dirigido exclusivamente a su destinatario. Si
recibe este correo sin ser el destinatario del mismo, le rogamos proceda a su eliminacion y lo ponga en conocimiento
del emisor. La difusion por cualquier medio del contenido de este correo podría ser sancionada conforme a lo previsto
en las leyes espanyolas. No se autoriza la utilizacion con fines comerciales o para su incorporacion a ficheros
automatizados de las direcciones del emisor o del destinatario.
Each one of us can do our bit for the environment: please, do not print this e-mail unless it is absolutely essential.
This mail and its attached files are confidential and are exclusively intented to their addresses. In case you may
receive this mail not being its address, we beg you to let us know the error by reply and to proceed to delete it. The
circulation by any mean of this mail could be penalised in accordance with the Spanish legislation. The use of both
the transmitter and the addresses with a commercial aim, or in order to be incorporated to automated files,
is not authorized.
Re: UIRepeat offset and size problem
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
It is a bug. Please create an issue here:
https://issues.apache.org/jira/browse/MYFACES
I have already a patch, so as soon as you create the issue I'll commit
it. Later, you can get a nightly build snapshot here:
https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/
regards,
Leonardo Uribe
2011/6/20 RICARD MORE FARRES <ri...@mango.com>:
> Hello,
>
>
>
> I am testing MyFaces 2.1.1 implemantation, in order to upgrade our
> aplication from version 1.2.7.
>
>
>
> I have found a problem with parameters offset and size of ui:repeat tag.
>
> offset sets the first index of the list to iterate over.
>
> size is the number of element to iterate.
>
>
>
> If I have a list of Strings like this:
>
> private String[] textos = new String[] {"B1", "B2", "B3", "B4", "B5", "B6",
> "B7"};
>
>
>
> public String[] getTextos() {
>
> return textos;
>
> }
>
>
>
> And I declare repeat tag:
>
> <ui:repeat value="#{bean.textos}" var="texto" offset="0" size="1">
>
> <h:outputText value="#{texto}"/><br/>
>
> </ui:repeat>
>
>
>
> It shows elements B1 and B2 (iterate over indexes 0 and 1). If I change
> offset to 1, it will show elements B2 and B3.
>
> But if I set offset="2" in order to ietare over indexes 2 and 3 (elements B3
> and B4), I get an exception:
>
>
>
> javax.faces.FacesException: iteration offset cannot be greater than
> collection size
>
> at
> org.apache.myfaces.view.facelets.component.UIRepeat._validateAttributes(UIRepeat.java:552)
>
> at
> org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.java:581)
>
> …
>
>
>
> If I want to avoid this error, size must be allways greater tha offset, but
> it should be possible to iterate over last two elements of a 102 elements
> list starting from index 100, for example (offset=100,size=1).
>
> And should not be “1” the lower value for size? Now, if you set 0 to size,
> ui:repeat iterates once…
>
>
>
> Thanks in advance,
>
> Ricard
>
>
>
>
>
> Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail
> si no es realmente necesario.
>
> Este correo y sus archivos asociados son privados y confidenciales y va
> dirigido exclusivamente a su destinatario. Si recibe este correo sin ser el
> destinatario del mismo,le rogamos proceda a su eliminación y lo ponga en
> conocimiento del emisor. La difusión por cualquier medio del contenido de
> este correo podría ser sancionada conforme a lo previsto en las leyes
> españolas. No se autoriza la utilización con fines comerciales o para su
> incorporación a ficheros automatizados de las direcciones del emisor o del
> destinatario.
>
> Each one of us can do our bit for the environment: please, do not print this
> e-mail unless it is absolutely essential.
>
> This e-mail and its attached files are confidential and are exclusively
> intented for their addressees. If you have received this e-mail and it is
> not addressed to you, please notify us of the error by replying to it before
> proceeding to delete it. The diffusion of the contents of this e-mail by
> whatever means may be penalised in accordance with Spanish law. The
> utilisation of the addresses of the sender and the addressee for commercial
> purposes or for inclusion on computer files is not authorized.
>
UIRepeat offset and size problem
Posted by RICARD MORE FARRES <ri...@mango.com>.
Hello,
I am testing MyFaces 2.1.1 implemantation, in order to upgrade our
aplication from version 1.2.7.
I have found a problem with parameters offset and size of ui:repeat tag.
offset sets the first index of the list to iterate over.
size is the number of element to iterate.
If I have a list of Strings like this:
private String[] textos = new String[] {"B1", "B2", "B3", "B4", "B5",
"B6", "B7"};
public String[] getTextos() {
return textos;
}
And I declare repeat tag:
<ui:repeat value="#{bean.textos}" var="texto" offset="0" size="1">
<h:outputText value="#{texto}"/><br/>
</ui:repeat>
It shows elements B1 and B2 (iterate over indexes 0 and 1). If I change
offset to 1, it will show elements B2 and B3.
But if I set offset="2" in order to ietare over indexes 2 and 3
(elements B3 and B4), I get an exception:
javax.faces.FacesException: iteration offset cannot be greater than
collection size
at
org.apache.myfaces.view.facelets.component.UIRepeat._validateAttributes(
UIRepeat.java:552)
at
org.apache.myfaces.view.facelets.component.UIRepeat.process(UIRepeat.jav
a:581)
...
If I want to avoid this error, size must be allways greater tha offset,
but it should be possible to iterate over last two elements of a 102
elements list starting from index 100, for example (offset=100,size=1).
And should not be "1" the lower value for size? Now, if you set 0 to
size, ui:repeat iterates once...
Thanks in advance,
Ricard
Para el medioambiente cada gesto cuenta: por favor, no imprimas este e-mail si no es realmente necesario
Este correo y sus archivos asociados son privados y confidenciales y va dirigido exclusivamente a su destinatario. Si
recibe este correo sin ser el destinatario del mismo, le rogamos proceda a su eliminacion y lo ponga en conocimiento
del emisor. La difusion por cualquier medio del contenido de este correo podr�a ser sancionada conforme a lo previsto
en las leyes espanyolas. No se autoriza la utilizacion con fines comerciales o para su incorporacion a ficheros
automatizados de las direcciones del emisor o del destinatario.
Each one of us can do our bit for the environment: please, do not print this e-mail unless it is absolutely essential.
This mail and its attached files are confidential and are exclusively intented to their addresses. In case you may
receive this mail not being its address, we beg you to let us know the error by reply and to proceed to delete it. The
circulation by any mean of this mail could be penalised in accordance with the Spanish legislation. The use of both
the transmitter and the addresses with a commercial aim, or in order to be incorporated to automated files,
is not authorized.
Re: tomahawk 1.1 on apache tomcat 7.0.12 with jsf 2.0
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
It seems something wrong into your custom configuration. See this line:
java.lang.IllegalArgumentException: Class
org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl is
no javax.faces.application.NavigationHandler
It is a symptom that something is not good into your local classpath.
Check if you are using versions compatible with JSF 2.
If you use maven, try to start configure your setup from an archetype:
mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org
See available archetypes here:
http://myfaces.apache.org/build-tools/archetypes/
regards
Leonardo Uribe
2011/6/20 Adam Furmanczuk <af...@knowtrek.com>:
> THX,
>
> but:
>
> I just deployed one example:
>
> ttp://localhost:8080/myfaces-example-blank-1.1.12-20110601.230445-1/helloWorld.jsf
>
> and i get error code 500.
>
> maybe this error and my webservice error is connected?
>
> Example dies with following error on Tomcat 7.0.12.
>
>
> See code below.
>
> Best regards,
>
> Adam
>
> java.lang.IllegalArgumentException: Class
> org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl is
> no javax.faces.application.NavigationHandler
> at
> org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:831)
> at
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:753)
> at
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:296)
> at
> org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:82)
> at
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:65)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
> at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
> at
> org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
> at
> java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:679)
>
>
>> Hi
>>
>> In this address
>>
>> http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/examples/
>>
>> there are some tomahawk examples. Take a look and compare the web.xml.
>>
>> If you need a working war file, the snapshots can be downloaded from here:
>>
>> https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/tomahawk/
>>
>> regards,
>>
>> Leonardo Uribe
>>
>> 2011/6/20 Adam Furmanczuk <af...@knowtrek.com>:
>>> Hi
>>>
>>> I am using Apache MyFaces for my project (jsf 2.0) and I want to use the
>>> tomahawk framework (for uploadfile, calendar, etc)
>>>
>>> Sadly, Tomcat cancell buidling the war.
>>>
>>> When I comment out filter mapping for tomahawk, war gets deployed, but
>>> sided that use:
>>> <%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
>>> fail with server 500 error.
>>>
>>> when i put filter mapping as suggested
>>>
>>> http://myfaces.apache.org/tomahawk/extensionsFilter.html
>>>
>>> all fails with SEVERE Filter error.
>>>
>>> Please help I need the upload methods urgently for my apache myfaces
>>> webproject.
>>>
>>>
>>> Best Regards,
>>>
>>> Adam
>>>
>
>
Re: tomahawk 1.1 on apache tomcat 7.0.12 with jsf 2.0
Posted by Adam Furmanczuk <af...@knowtrek.com>.
THX,
but:
I just deployed one example:
ttp://localhost:8080/myfaces-example-blank-1.1.12-20110601.230445-1/helloWorld.jsf
and i get error code 500.
maybe this error and my webservice error is connected?
Example dies with following error on Tomcat 7.0.12.
See code below.
Best regards,
Adam
java.lang.IllegalArgumentException: Class
org.apache.myfaces.trinidadinternal.application.NavigationHandlerImpl is
no javax.faces.application.NavigationHandler
at
org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:831)
at
org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:753)
at
org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:296)
at
org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:82)
at
org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:65)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4701)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5204)
at
org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5199)
at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
> Hi
>
> In this address
>
> http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/examples/
>
> there are some tomahawk examples. Take a look and compare the web.xml.
>
> If you need a working war file, the snapshots can be downloaded from here:
>
> https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/tomahawk/
>
> regards,
>
> Leonardo Uribe
>
> 2011/6/20 Adam Furmanczuk <af...@knowtrek.com>:
>> Hi
>>
>> I am using Apache MyFaces for my project (jsf 2.0) and I want to use the
>> tomahawk framework (for uploadfile, calendar, etc)
>>
>> Sadly, Tomcat cancell buidling the war.
>>
>> When I comment out filter mapping for tomahawk, war gets deployed, but
>> sided that use:
>> <%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
>> fail with server 500 error.
>>
>> when i put filter mapping as suggested
>>
>> http://myfaces.apache.org/tomahawk/extensionsFilter.html
>>
>> all fails with SEVERE Filter error.
>>
>> Please help I need the upload methods urgently for my apache myfaces
>> webproject.
>>
>>
>> Best Regards,
>>
>> Adam
>>
Re: tomahawk 1.1 on apache tomcat 7.0.12 with jsf 2.0
Posted by Leonardo Uribe <lu...@gmail.com>.
Hi
In this address
http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/examples/
there are some tomahawk examples. Take a look and compare the web.xml.
If you need a working war file, the snapshots can be downloaded from here:
https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/tomahawk/
regards,
Leonardo Uribe
2011/6/20 Adam Furmanczuk <af...@knowtrek.com>:
> Hi
>
> I am using Apache MyFaces for my project (jsf 2.0) and I want to use the
> tomahawk framework (for uploadfile, calendar, etc)
>
> Sadly, Tomcat cancell buidling the war.
>
> When I comment out filter mapping for tomahawk, war gets deployed, but
> sided that use:
> <%@taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
> fail with server 500 error.
>
> when i put filter mapping as suggested
>
> http://myfaces.apache.org/tomahawk/extensionsFilter.html
>
> all fails with SEVERE Filter error.
>
> Please help I need the upload methods urgently for my apache myfaces
> webproject.
>
>
> Best Regards,
>
> Adam
>