RE: [Trinidad] Trinidad render kit

2007-07-12 Thread MOLINA Stéphane

In fact, the application that I am refactoring with trinidad has a lot of 
CommandLinks.
The use of trinidad makes these links quite ugly since Trinidad generate 
different HTML code and uses his proper skinning classes.

Using Trinidad will make us to refactor completely our css. That's realy a pain 
in the neck...
Why components kits like Trinidad cannot simply do what they are supposed to 
do, just providing components... ?

I was trying to add some :

render-kit
renderer

component-familyjavax.faces.Command/component-family
renderer-typejavax.faces.Link/renderer-type

renderer-classcom.sun.faces.renderkit.html_basic.CommandLinkRenderer/renderer-class
/renderer
/render-kit

in my faces-config.xml. Are you meaning that it won't work ?


-Message d'origine-
De : Adam Winer [mailto:[EMAIL PROTECTED] 
Envoyé : jeudi 12 juillet 2007 03:47
À : MyFaces Discussion
Objet : Re: [Trinidad] Trinidad render kit

No, there's no way to configure this away.  Could you explain why you need to 
disable this?

-- Adam


On 7/11/07, MOLINA Stéphane [EMAIL PROTECTED] wrote:
 Hi,

 That's true, only these three elements are rendered by trinidad.
 Is there some mean to avoid this, in particular for commandLink and 
 commandButton ?

 I looked in CoreRenderKit.java, but I don't understand how I can do ...
 Is there something to add in a .xml configuration file ?

 Thanks in advance,

 -Message d'origine-
 De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part 
 de Matthias Wessendorf Envoyé : mercredi 27 juin 2007 16:57 À : 
 MyFaces Discussion Objet : Re: [Trinidad] Trinidad render kit

 form,commandLink and commandButton are rendered by Trinidad

 see CoreRenderKit.java

 -m

 On 6/27/07, MOLINA Stéphane [EMAIL PROTECTED] wrote:
  Hi all,
 
  I have some problems when using trinidad : all my elements are rendered 
  with trinidad render kit.
  For some h:* elements I do not want trinidad to do the rendering 
  job (in fact I do not want trinidad to render anything else than trinidad 
  components).
 
  How can I do to use trinidad only for trinidad components ?
 
  Best regards,
 
 
  --
  Stéphane Molina
 


 --
 Matthias Wessendorf

 further stuff:
 blog: http://matthiaswessendorf.wordpress.com/
 mail: matzew-at-apache-dot-org



Re: Tomahawk+DataScroller+WorkingWithLargeTables

2007-07-12 Thread daniel ccss

Paul where are you? again :P

On 7/11/07, daniel ccss [EMAIL PROTECTED] wrote:


Hi Paul

1- I did the boolean _invalidate insted the properties file (excelent) :)
2- I made a change on your dropscroller method, i used component.getId() insted
of component. getClientId(), in that way the data id was found :)

3-All works now, except for one thing: when I add a row to the dataSet, I
don´t see the last row, for example:

I have the DataTable with this info:
1 Daniel
2 Paul

Then I add Vladimir with code 3 and doesn´t appear (if I press F5 I can
see it, if I press an arrow or number link I can see it) other way not. If I
add another row with code 4 (without press f5, numbers or arrows) then the
row with the code 3 appears. If I add the code 5 the row with code 4
appears, and so on.

Another fact, if I have the DataTable with this info:
1 Daniel
3 Paul

An I add the code 2, then the DataTable changes and shows the row with
code 1 and the row with the code 2, and not the row with code 3. It means
the data is update well but the last row is not shown.

Why I didn´t notice this before?, because I have to pages, and I add data
to the  DataPage 2, but it was redirect to the DataPage 1 (beacuse of the
setFirst(0) on the dropScroller) So then i Click on the page 2 link or the
arrow and the datapage 2 was updated correctly.

I put the redirect attribute in true, in the navigation rule that goes
from the add page to the page that shows the dataPage, and it doesn´t works.
Also I put the code of the add page into the page that have the datatable
(for the dropscroller find the data component) and works the same way.

This are some System outs that I made, on the DataPagedList:

When the add button is press:

07/07/11 15:32:26 ROWINDEX: 0
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ***Fetch requested: in getRowData(), reason: rowIndex ==
page.getStartRow()
07/07/11 15:32:26 **Fetch: not required (already fetched)!
07/07/11 15:32:26 ROWINDEX: 1
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ROWINDEX: 2
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ROWINDEX: 0
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ***Fetch requested: in getRowData(), reason: rowIndex ==
page.getStartRow ()
07/07/11 15:32:26 **Fetch: not required (already fetched)!
07/07/11 15:32:26 ROWINDEX: 1
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ROWINDEX: 2
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ROWINDEX: 0
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ***Fetch requested: in getRowData(), reason: rowIndex ==
page.getStartRow()
07/07/11 15:32:26 **Fetch: not required (already fetched)!
07/07/11 15:32:26 ROWINDEX: 1
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ROWINDEX: 2
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 Servidor de base de datos: jdbc/SignosPassOracleDS
07/07/11 15:32:26 EjecutaSQL: INSERT INTO IDEN_PACIENTE_2
(TIP_IDENTIFICACION, NUM_IDENTIFICACION, NOM_PACIENTE)VALUES (0, 4, 'f')
07/07/11 15:32:26 data
07/07/11 15:32:26 dropScroller called
07/07/11 15:32:26 Requested UIC data returning:data
07/07/11 15:32:26 ROWINDEX: 0
07/07/11 15:32:26 DATASETSIZE: 3
07/07/11 15:32:26 ***Fetch requested: in getRowData(), reason: rowIndex ==
page.getStartRow()
07/07/11 15:32:26 **Fetch: required - fetching...
07/07/11 15:32:26 EjecutaSQLRetornaRS: SELECT * FROM ( SELECT ROW_NUMBER()
OVER(ORDER BY NUM_IDENTIFICACION) LINENUM, NUM_IDENTIFICACION, NOM_PACIENTE
FROM IDEN_PACIENTE_2 ORDER BY NUM_IDENTIFICACION) WHERE LINENUM BETWEEN 0
AND 4
07/07/11 15:32:26 EjecutaSQLRetornaRS: SELECT COUNT(*) AS CANTIDAD FROM
IDEN_PACIENTE_2
07/07/11 15:32:26 ROWINDEX: 1
07/07/11 15:32:26 DATASETSIZE: 4
07/07/11 15:32:26 ROWINDEX: 2
07/07/11 15:32:26 DATASETSIZE: 4

And then when I press F5:

07/07/11 15:36:16 ROWINDEX: 0
07/07/11 15:36:16 DATASETSIZE: 4
07/07/11 15:36:16 ***Fetch requested: in getRowData(), reason: rowIndex ==
page.getStartRow()
07/07/11 15:36:16 **Fetch: not required (already fetched)!
07/07/11 15:36:16 ROWINDEX: 1
07/07/11 15:36:16 DATASETSIZE: 4
07/07/11 15:36:16 ROWINDEX: 2
07/07/11 15:36:16 DATASETSIZE: 4
07/07/11 15:36:16 ROWINDEX: 3
07/07/11 15:36:16 DATASETSIZE: 4

As you can see when I press f5 one more row is display (RowIndex 3). You
cn see also that the dropscroller is call and it works fine.

Can you help me with this, I have to present this demo on Friday for that
the company for which i Works accepts the use of JSF with tomahawk.

Paul thanks I hope you can help me with this, and remember I´m new,
sorry if maybe I didn´t do something you told me before that can fix this
problem. Thanks again, I will be waiting for your answer, thank you!!



Re: MyFaces 1.2??

2007-07-12 Thread Matthias Wessendorf

and... it passed the TCK

On 7/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote:

Yes,

there is an impl of 1.2 on MyFaces. No official release, but that's
not to far away.
Two days ago, we released a dependency and now we focus on the first
1.2 release.

The API JAR is here:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/core/myfaces-api/1.2.0-SNAPSHOT/

The IMPL JAR is here:
http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/core/myfaces-impl/1.2.0-SNAPSHOT/

Greetings,
Matthias

On 7/12/07, mraible [EMAIL PROTECTED] wrote:

 Any update on a 1.2 implementation of MyFaces? I might be prototyping an
 application with JSF + Facelets in the next week. I'll use MyFaces if
 there's a 1.2 implementation. Otherwise, I'm planning on using Sun's RI.

 Thanks,

 Matt


 Bruno Aranda wrote:
 
  Honestly, I have been moving so many things that I am not sure what
  might be left. Basically I did move all the stuff so shared is
  backwards compatible (tomahawk was not compiling with the snapshot of
  myfaces 1.2 which passed the TCK due to changes in shared). I would be
  great if you could check that those things that you remember
  implementing/fixing are in myfaces 1.2 too (and this is not only for
  Martin!) :-)
 
  Then, myfaces 1.2 will be ready for release. However, now there is a
  bug [1] that make some coercions to fail, but I think it is a bug in
  tomcat-el, although it appeared when I was doing the more complex part
  of the merge (mostly, javascript and form rendering) which I guess it
  has nothing to do but you never know...
 
  Cheers,
 
  Bruno
 
  [1] https://issues.apache.org/jira/browse/MYFACES-1656
 
  On 10/06/07, Martin Marinschek [EMAIL PROTECTED] wrote:
  That's very good - is there anything major you had to leave out? Just
  asking - to make sure that I can skip the check, cause I do know I
  enabled some stuff in 1.1 which wouldn't make it over in this case
  (e.g. in configuration handling).
 
  Yes, the autoformatting problem will be much better now that we'll be
  working on one codebase only ;)
 
  regards,
 
  Martin
 
  On 6/10/07, Bruno Aranda [EMAIL PROTECTED] wrote:
   Yes, I have merge a lot of the old stuff into the new code (such as
   calling a pre-defined function when clicking the onclick of buttons,
   instead of writing the call in each onclick attribute). I might have
   forgotten many things along the way, as it is difficult to merge the
   two codebases as the formatting of classes after fixing some issues
   for 1.1 have changed (remember to not use autoformatting if you don't
   have the myfaces codestyle configured!), so it has been a manual work
   checking line per line (of course, not everywhere!). The TCK passes,
   though, after all these changes :)
  
   Cheers,
  
   Bruno
  
   On 10/06/07, Martin Marinschek [EMAIL PROTECTED] wrote:
Hey Bruno,
   
cool, you are converting over the old stuff already? I didn't know -
thanks so much...
   
;)
   
regards,
   
Martin
   
On 6/5/07, Bruno Aranda [EMAIL PROTECTED] wrote:
 There are one or two bugs and I am adding most of the stuff added
  to
 1.1 since we created the branch for 1.2 whenever is compatible.
 So, yes, the release is going to be done pretty soon,

 Cheers,

 Bruno

 On 05/06/07, Matthias Wessendorf [EMAIL PROTECTED] wrote:
  a release will be out soon.
  the nightly builds are available and the TCK has been passed.
 
  -Matthias
 
  On 6/5/07, Julien Martin [EMAIL PROTECTED] wrote:
   Hello,
   When can we expect a 1.2 version of MyFaces??
   Thanks in advance,
   Julien.
  
 
 
  --
  Matthias Wessendorf
 
  further stuff:
  blog: http://matthiaswessendorf.wordpress.com/
  mail: matzew-at-apache-dot-org
 

   
   
--
   
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
 
 
 

 --
 View this message in context: 
http://www.nabble.com/MyFaces-1.2---tf3873172.html#a11551651
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


How to send parameters when navigating a list using t:dataScroller

2007-07-12 Thread ayan

Got a problem on sending parameter when navigating to a datatable using the
t:dataScroller component. My case was that, I have a search button that
triggers population of data to the datatable, but when I click the
navigation link of dataScroller, my search criteria was not submitted, I
notice that it only submits its own parameter,

(org.apache.catalina.util.ParameterMap)
{form_SUBMIT=[Ljava.lang.String;@1317bfb,
form:scroll=[Ljava.lang.String;@1c2a074,
form:_idcl=[Ljava.lang.String;@b427c1}

How would I be able to add my own request parameter when dataScroller
navigation is triggered? Tried to google it and search it in this forum but
I haven't found an answer. 

Pls. help.
-- 
View this message in context: 
http://www.nabble.com/How-to-send-parameters-when-navigating-a-list-using-t%3AdataScroller-tf4066575.html#a11555195
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: [Trinidad] Trinidad render kit

2007-07-12 Thread Renzo Tomaselli
Hi, I had a similar issue while mixing up Trinidad and RichFaces 
components. Each one provides its own skinning facility, thus one would 
expect that only owned components are affected. Not true for Trinidad.
Results are incompatible styles (or dirty tricks to work around) 
concerning commandLinks (at least).


-- Renzo

Adam Winer wrote:

No, there's no way to configure this away.  Could you
explain why you need to disable this?

-- Adam


On 7/11/07, MOLINA Stéphane [EMAIL PROTECTED] wrote:

Hi,

That's true, only these three elements are rendered by trinidad.
Is there some mean to avoid this, in particular for commandLink and 
commandButton ?


I looked in CoreRenderKit.java, but I don't understand how I can do ...
Is there something to add in a .xml configuration file ?

Thanks in advance,

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part 
de Matthias Wessendorf

Envoyé : mercredi 27 juin 2007 16:57
À : MyFaces Discussion
Objet : Re: [Trinidad] Trinidad render kit

form,commandLink and commandButton are rendered by Trinidad

see CoreRenderKit.java

-m

On 6/27/07, MOLINA Stéphane [EMAIL PROTECTED] wrote:
 Hi all,

 I have some problems when using trinidad : all my elements are 
rendered with trinidad render kit.

 For some h:* elements I do not want trinidad to do the rendering job
 (in fact I do not want trinidad to render anything else than 
trinidad components).


 How can I do to use trinidad only for trinidad components ?

 Best regards,


 --
 Stéphane Molina



--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org






how to stop Ajax poll call through java script

2007-07-12 Thread Arvind Pandey

Hi all,

On click one link I want to stop ajax poll (which polls the server
after a specified time interval).
Any idea?

thanks  regards
Arvind Pandey


-Original Message-
From: ayan [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 12, 2007 1:18 PM
To: users@myfaces.apache.org
Subject: How to send parameters when navigating a list using
t:dataScroller



Got a problem on sending parameter when navigating to a datatable using the
t:dataScroller component. My case was that, I have a search button that
triggers population of data to the datatable, but when I click the
navigation link of dataScroller, my search criteria was not submitted, I
notice that it only submits its own parameter,

(org.apache.catalina.util.ParameterMap)
{form_SUBMIT=[Ljava.lang.String;@1317bfb,
form:scroll=[Ljava.lang.String;@1c2a074,
form:_idcl=[Ljava.lang.String;@b427c1}

How would I be able to add my own request parameter when dataScroller
navigation is triggered? Tried to google it and search it in this forum but
I haven't found an answer.

Pls. help.
--
View this message in context:
http://www.nabble.com/How-to-send-parameters-when-navigating-a-list-using-t%
3AdataScroller-tf4066575.html#a11555195
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Disclaimer: The information contained in this e-mail and attachments if any are 
privileged and confidential and are intended for the individual(s) or 
entity(ies) named in this e-mail. If the reader or recipient is not the 
intended recipient, or employee or agent responsible for delivering to the 
intended recipient, you are hereby notified that dissemination, distribution or 
copying of this communication or attachments thereof is strictly prohibited. IF 
YOU RECEIVE this communication in error, please immediately notify the sender 
and return the original message.


Help required with Tomahawk Tree2 component

2007-07-12 Thread Bala Ayalur

Hi,
   We use the MyFaces Tomahawk Tree2 component to display a client side tree
for navigation. The tree is static and is built during load of the page. The
web page is divided into two frames. The tree is on the left frame and on
click of the links in the tree the corresponding screen is shown on the
right frame. The tree works well. However we are facing a interesting
problem. After some period of use and idle time, when we click on the links
on the tree, the entire tree is displayed on the right frame. The tree on
the left frame is not functional any more while the tree on the right frame
is functional. There is no fixed pattern of occurence and it occurs at
varying frequencies on different machines. Is this problem related to client
side cookies that are used by Tree2. Please help me on fixing this issue or
finding a work around. The jsf code is attached below. Any pointers will be
very helpful. We are using MyFaces 1.1.4 with tomahawk 1.1.3.

h:form
t:tree2 id=clientTree value=#{treeBacker.treeData} var=node
varNodeToggler=t showRootNode=true clientSideToggle=true 
f:facet name=main
h:panelGroup style=white-space:nowrap;  
f:facet name=expand
t:graphicImage value=../images/globus-0.gif  

rendered=true border=0 /
/f:facet
f:facet name=collapse
t:graphicImage value=../images/globus-0.gif
rendered=true border=0 /
/f:facet
 h:outputText value=#{node.description}
style=white-space:nowrap;  
  styleClass=treeClass /
/h:panelGroup
/f:facet
f:facet name=node
h:panelGroup style=white-space:nowrap; 
 f:facet name=expand
t:graphicImage value=../images/yellow-folder-open.png
rendered=#{t.nodeExpanded} border=0 /
 /f:facet
 f:facet name=collapse
t:graphicImage value=../images/yellow-folder-closed.png
rendered=#{!t.nodeExpanded} border=0 /
 /f:facet
h:outputText value=#{node.description}
style=padding:10px;white-space:nowrap; 
  styleClass=treeClass /
/h:panelGroup 
/f:facet
f:facet name=simpleScreen
h:panelGroup
h:commandLink immediate=true styleClass=# 
{t.nodeSelected ?
'documentSelected':'document'}
action=#{simpleScreenHandler.handleMenuEvent}
 target=content_frame style=white-space:nowrap;
styleClass=treeClass
 t:graphicImage value=../images/globus.gif 
border=0 /
   h:outputText value=#{node.description} 
style=padding:10px;white-
   space:nowrap;   /
   f:param name=ScreenName value=#{node.identifier} /
/h:commandLink
/h:panelGroup
/f:facet
f:facet name=crudScreen
  h:panelGroup
h:commandLink immediate=true styleClass=#
  {t.nodeSelected ?
'documentSelected':'document'} 
 action=#{ilaScreenHandler.handleMenuEvent}   
 target=content_frame style=white-space:nowrap;
styleClass=treeClass
 t:graphicImage value=../images/globus.gif border=0 /
h:outputText value=#{node.description} 
style=padding:10px;white-
space:nowrap;  /
f:param name=ScreenName value=#{node.identifier} /
/h:commandLink
/h:panelGroup
/f:facet  
/t:tree2
/h:form

   Thanks  Regards,
   Bala
-- 
View this message in context: 
http://www.nabble.com/Help-required-with-Tomahawk-Tree2-component-tf4066841.html#a11556033
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: Datascroller: Duplicate Cliente Id Exception - Portlet Environment

2007-07-12 Thread Stephan Strittmatter

Hi,

probably you can find here some help:
http://jroller.com/page/stritti?entry=myfaces_portlets_within_liferay

or at: http://wiki.apache.org/myfaces/Using_Portlets

Regards, Stephan

2007/7/11, Parag Shah [EMAIL PROTECTED]:

Hi,

I had a similar problem of duplicate client id, but in a non-portlet
environment. My Tag handler for the component, as well as the component
itself has overriden the getClientId() method, such that they were returning
different id's. This was causing the JSPViewHandler (in the RENDER_RESPONSE
phase) to think that the component did not exist in the view_root. It went
ahead and created a second component which had the same client_id's as the
first one. Both were then rendered resulting in a duplicate client id
exception.

I am not sure if this is the cause of your problem. It might help to
investigate along these lines.

--
Regards
Parag


On 7/11/07, Marcelo Ohashi [EMAIL PROTECTED] wrote:
 Hi,

 Does anyone know how to prevent this error to happen? Maybe
 somebody have a patch to apply?

 It seems it is not checking if the component is already
 registered. Is there a way to check and fix this error?

 I'm running it on a Portlet Container on Sun Java Appliction
 server 8.2.

 Thanks in advance.

 Marcelo Ohashi





t:message inside pprPanelGroup

2007-07-12 Thread Michał 'Gandalf' Stawicki

If I put a t:message inside s:pprPanelGroup and it get's displayed as
partial rendering, then messages' atttributes are all ignored, and
defaults are used. If it is displayed after full page submit
everything works fine. Is there any solution for this behaviour?

regards,

--
Michał Stawicki

[EMAIL PROTECTED]
http://stawicki.jasliska.pl


Re: t:message inside pprPanelGroup

2007-07-12 Thread Michał 'Gandalf' Stawicki

Disregard what i said. It's something strange with detailFormat. {1}
is empty, and {0} is alaways id: message

here's my code:

t:outputLabel
for=password1
value=#{m.password1} /
t:inputText
id=password1
value=#{registerUser.password1}
onkeyup=submit(this);
valueChangeListener=#{registerUser.password1Changed}
f:validateLength minimum=6 /
/t:inputText
s:pprPanelGroup
partialTriggers=mainForm:password1,mainForm:password2
id=pprPassword2
t:message
id=password2Msg
for=password1
showSummary=false
showDetail=true
forceSpan=true
replaceIdWithLabel=true/
/s:pprPanelGroup

On 12/07/07, Michał 'Gandalf' Stawicki [EMAIL PROTECTED] wrote:

If I put a t:message inside s:pprPanelGroup and it get's displayed as
partial rendering, then messages' atttributes are all ignored, and
defaults are used. If it is displayed after full page submit
everything works fine. Is there any solution for this behaviour?

regards,

--
Michał Stawicki

[EMAIL PROTECTED]
http://stawicki.jasliska.pl




--
Michał Stawicki

[EMAIL PROTECTED]
http://stawicki.jasliska.pl


Re: Datascroller: Duplicate Cliente Id Exception - Portlet Environment

2007-07-12 Thread Marcelo Ohashi

Hi,

Thank you, Guys. It has helped me a lot.

Marcelo Ohashi

On Jul 12, 2007, at 6:08 AM, Stephan Strittmatter wrote:


Hi,

probably you can find here some help:
http://jroller.com/page/stritti?entry=myfaces_portlets_within_liferay

or at: http://wiki.apache.org/myfaces/Using_Portlets

Regards, Stephan

2007/7/11, Parag Shah [EMAIL PROTECTED]:

Hi,

I had a similar problem of duplicate client id, but in a non-portlet
environment. My Tag handler for the component, as well as the  
component
itself has overriden the getClientId() method, such that they were  
returning
different id's. This was causing the JSPViewHandler (in the  
RENDER_RESPONSE
phase) to think that the component did not exist in the view_root.  
It went
ahead and created a second component which had the same  
client_id's as the
first one. Both were then rendered resulting in a duplicate  
client id

exception.

I am not sure if this is the cause of your problem. It might help to
investigate along these lines.

--
Regards
Parag


On 7/11/07, Marcelo Ohashi [EMAIL PROTECTED] wrote:
 Hi,

 Does anyone know how to prevent this error to happen? Maybe
 somebody have a patch to apply?

 It seems it is not checking if the component is already
 registered. Is there a way to check and fix this error?

 I'm running it on a Portlet Container on Sun Java Appliction
 server 8.2.

 Thanks in advance.

 Marcelo Ohashi







Re: HTML escaping

2007-07-12 Thread David Delbecq
To disable escaping:
  h:outputText   escape=false   value=/

En l'instant précis du 11/07/07 23:36, Saul Rosenburg s'exprimait en ces
termes:
 Hello All,

 Has anyone tried to turn off HTML escaping for all of the rendered
 HTML output?

 Thanks.



[Trinidad] tr:inputText / Submit PPR On Enter

2007-07-12 Thread William Hoover
Is there a way invoke a PPR call for a tr:inputText / when the enter key is 
pressed?

For Example (I know submitOnEnter is not a valid attribute- just 
illustration):

tr:inputText id=submitsOnEnter submitOnEnter=#{myBean.processOnEnterCall} 
/


Re: [Trinidad] tr:inputText / Submit PPR On Enter

2007-07-12 Thread Matthias Wessendorf

Have you tried tr:form defaultCommand=... ...

http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_form.html

Setz the button/link to be a ppr command.

On 7/12/07, William Hoover [EMAIL PROTECTED] wrote:

Is there a way invoke a PPR call for a tr:inputText / when the enter key is 
pressed?

For Example (I know submitOnEnter is not a valid attribute- just 
illustration):

tr:inputText id=submitsOnEnter submitOnEnter=#{myBean.processOnEnterCall} 
/




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: Datascroller: Duplicate Cliente Id Exception - Portlet Environment

2007-07-12 Thread Marcelo Ohashi
It seems that in 1.1.7.SNAPSHOT it was fixed. Does someone know if  
the tomahawk's development team have planned to apply this fix on the  
1.1.6 too?


Thanks,

Marcelo Ohashi

On Jul 12, 2007, at 6:08 AM, Stephan Strittmatter wrote:


Hi,

probably you can find here some help:
http://jroller.com/page/stritti?entry=myfaces_portlets_within_liferay

or at: http://wiki.apache.org/myfaces/Using_Portlets

Regards, Stephan

2007/7/11, Parag Shah [EMAIL PROTECTED]:

Hi,

I had a similar problem of duplicate client id, but in a non-portlet
environment. My Tag handler for the component, as well as the  
component
itself has overriden the getClientId() method, such that they were  
returning
different id's. This was causing the JSPViewHandler (in the  
RENDER_RESPONSE
phase) to think that the component did not exist in the view_root.  
It went
ahead and created a second component which had the same  
client_id's as the
first one. Both were then rendered resulting in a duplicate  
client id

exception.

I am not sure if this is the cause of your problem. It might help to
investigate along these lines.

--
Regards
Parag


On 7/11/07, Marcelo Ohashi [EMAIL PROTECTED] wrote:
 Hi,

 Does anyone know how to prevent this error to happen? Maybe
 somebody have a patch to apply?

 It seems it is not checking if the component is already
 registered. Is there a way to check and fix this error?

 I'm running it on a Portlet Container on Sun Java Appliction
 server 8.2.

 Thanks in advance.

 Marcelo Ohashi







RE: [Trinidad] tr:inputText / Submit PPR On Enter

2007-07-12 Thread William Hoover
Thanks for the reply!

I have considered using defaultCommand on the form, but I have a form that has 
multiple tr:inputText / each having it's own call to a backing bean method. 
They are all in the same form because they share other common fields within it.

Any other suggestions?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Matthias Wessendorf
Sent: Thursday, July 12, 2007 8:54 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] tr:inputText / Submit PPR On Enter


Have you tried tr:form defaultCommand=... ...

http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_form.html

Setz the button/link to be a ppr command.

On 7/12/07, William Hoover [EMAIL PROTECTED] wrote:
 Is there a way invoke a PPR call for a tr:inputText / when the enter key is 
 pressed?

 For Example (I know submitOnEnter is not a valid attribute- just 
 illustration):

 tr:inputText id=submitsOnEnter 
 submitOnEnter=#{myBean.processOnEnterCall} /



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org



tab index in trinidad component

2007-07-12 Thread vergil santos

how will i be able to implement tab index order in trinidad? thanks.


Re: how to stop Ajax poll call through java script

2007-07-12 Thread Gerald Müllan

Hi,

you mean the poll from sandbox` ppr? This is currently not possible,
only starting the poll after a button click. But i need exactly the
same usecase and will implement  this scenario the next week.

cheers,

Gerald

On 7/12/07, Arvind Pandey [EMAIL PROTECTED] wrote:


Hi all,

On click one link I want to stop ajax poll (which polls the server
after a specified time interval).
Any idea?

thanks  regards
Arvind Pandey


-Original Message-
From: ayan [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 12, 2007 1:18 PM
To: users@myfaces.apache.org
Subject: How to send parameters when navigating a list using
t:dataScroller



Got a problem on sending parameter when navigating to a datatable using the
t:dataScroller component. My case was that, I have a search button that
triggers population of data to the datatable, but when I click the
navigation link of dataScroller, my search criteria was not submitted, I
notice that it only submits its own parameter,

(org.apache.catalina.util.ParameterMap)
{form_SUBMIT=[Ljava.lang.String;@1317bfb,
form:scroll=[Ljava.lang.String;@1c2a074,
form:_idcl=[Ljava.lang.String;@b427c1}

How would I be able to add my own request parameter when dataScroller
navigation is triggered? Tried to google it and search it in this forum but
I haven't found an answer.

Pls. help.
--
View this message in context:
http://www.nabble.com/How-to-send-parameters-when-navigating-a-list-using-t%
3AdataScroller-tf4066575.html#a11555195
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Disclaimer: The information contained in this e-mail and attachments if any are 
privileged and confidential and are intended for the individual(s) or 
entity(ies) named in this e-mail. If the reader or recipient is not the 
intended recipient, or employee or agent responsible for delivering to the 
intended recipient, you are hereby notified that dissemination, distribution or 
copying of this communication or attachments thereof is strictly prohibited. IF 
YOU RECEIVE this communication in error, please immediately notify the sender 
and return the original message.




--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: tab index in trinidad component

2007-07-12 Thread Danny Robinson

Vergil,

Unfortunately we don't have this attribute currently, so there's no easy way
to control tab ordering.  However, this issue keeps coming back around every
few months, so I've created a new issue to add this attribute.

https://issues.apache.org/jira/browse/TRINIDAD-100

Danny

On 7/12/07, vergil santos [EMAIL PROTECTED] wrote:


how will i be able to implement tab index order in trinidad? thanks.





--
Chordiant Software Inc.
www.chordiant.com


Re: t:message inside pprPanelGroup

2007-07-12 Thread Gerald Müllan

Hi,

i think this is the case because the {0}, {1} values are in request
scope only. Try to store the values somewhere, e.g. t:saveState with
model value bindings.

cheers,

Gerald

On 7/12/07, Michał 'Gandalf' Stawicki [EMAIL PROTECTED] wrote:

Disregard what i said. It's something strange with detailFormat. {1}
is empty, and {0} is alaways id: message

here's my code:

t:outputLabel
for=password1
value=#{m.password1} /
t:inputText
id=password1
value=#{registerUser.password1}
onkeyup=submit(this);
valueChangeListener=#{registerUser.password1Changed}
f:validateLength minimum=6 /
/t:inputText
s:pprPanelGroup
partialTriggers=mainForm:password1,mainForm:password2
id=pprPassword2
t:message
id=password2Msg
for=password1
showSummary=false
showDetail=true
forceSpan=true
replaceIdWithLabel=true/
/s:pprPanelGroup

On 12/07/07, Michał 'Gandalf' Stawicki [EMAIL PROTECTED] wrote:
 If I put a t:message inside s:pprPanelGroup and it get's displayed as
 partial rendering, then messages' atttributes are all ignored, and
 defaults are used. If it is displayed after full page submit
 everything works fine. Is there any solution for this behaviour?

 regards,

 --
 Michał Stawicki

 [EMAIL PROTECTED]
 http://stawicki.jasliska.pl



--
Michał Stawicki

[EMAIL PROTECTED]
http://stawicki.jasliska.pl




--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: [Trinidad] tr:inputText / Submit PPR On Enter

2007-07-12 Thread Matthias Wessendorf

currently the PPR function is *rendered* out to onchange, to cause the
PPR, when you tab out.

We could add this for onkeyup event, when no defaultCommand is set on
form and check inside if ENTER was the pressed key. Sounds like an
enhancement request ?

-Matthuas

On 7/12/07, William Hoover [EMAIL PROTECTED] wrote:

Thanks for the reply!

I have considered using defaultCommand on the form, but I have a form that has 
multiple tr:inputText / each having it's own call to a backing bean method. 
They are all in the same form because they share other common fields within it.

Any other suggestions?

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
Matthias Wessendorf
Sent: Thursday, July 12, 2007 8:54 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] tr:inputText / Submit PPR On Enter


Have you tried tr:form defaultCommand=... ...

http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_form.html

Setz the button/link to be a ppr command.

On 7/12/07, William Hoover [EMAIL PROTECTED] wrote:
 Is there a way invoke a PPR call for a tr:inputText / when the enter key is 
pressed?

 For Example (I know submitOnEnter is not a valid attribute- just 
illustration):

 tr:inputText id=submitsOnEnter submitOnEnter=#{myBean.processOnEnterCall} 
/



--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org





--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: [Trinidad] tr:inputText / Submit PPR On Enter

2007-07-12 Thread Danny Robinson

Until then, you could call your own function in onkeyup that checked for
Enter key being hit, and caused a hidden commandButton (one per inputText
that needed this feature) to be pressed which would perform the PPR.  You'd
likely not be able to easily use defaultCommand with this solution though.

On 7/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote:


currently the PPR function is *rendered* out to onchange, to cause the
PPR, when you tab out.

We could add this for onkeyup event, when no defaultCommand is set on
form and check inside if ENTER was the pressed key. Sounds like an
enhancement request ?

-Matthuas

On 7/12/07, William Hoover [EMAIL PROTECTED] wrote:
 Thanks for the reply!

 I have considered using defaultCommand on the form, but I have a form
that has multiple tr:inputText / each having it's own call to a backing
bean method. They are all in the same form because they share other common
fields within it.

 Any other suggestions?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
 Matthias Wessendorf
 Sent: Thursday, July 12, 2007 8:54 AM
 To: MyFaces Discussion
 Subject: Re: [Trinidad] tr:inputText / Submit PPR On Enter


 Have you tried tr:form defaultCommand=... ...

 http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_form.html

 Setz the button/link to be a ppr command.

 On 7/12/07, William Hoover [EMAIL PROTECTED] wrote:
  Is there a way invoke a PPR call for a tr:inputText / when the enter
key is pressed?
 
  For Example (I know submitOnEnter is not a valid attribute- just
illustration):
 
  tr:inputText id=submitsOnEnter submitOnEnter=#{
myBean.processOnEnterCall} /
 


 --
 Matthias Wessendorf

 further stuff:
 blog: http://matthiaswessendorf.wordpress.com/
 mail: matzew-at-apache-dot-org




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org





--
Chordiant Software Inc.
www.chordiant.com


[Trinidad] State saving between applications

2007-07-12 Thread Stéphane Poirier

Hi,

I have 2 different Trinidad applications interacting. Beeing different
applications, I'm using ExternalContext.sendRedirect() to go from an
application to another. It works well (tho it's not very clean) and the
state of components is the same when the page is revisited (beans are in
session scope). My problem is when I'm using AJAX with partialTrigers. If
I'm using a redirect in an action after AJAX, the state will not be saved (I
understand that it's the normal behavior). Still, I want to solve this
problem. Any ideas?

I read that ViewHandler could possibly help... is that right? If so, an
implementation hint would be greatly appreciated! :-)

Thanks in advance!


Escape commandButton value

2007-07-12 Thread bajistaman

Is it possible to escape the value of commandButton?

h:commandButton value=#8595;...

Thanks,

Johann

-- 
View this message in context: 
http://www.nabble.com/Escape-commandButton-value-tf4068921.html#a11562727
Sent from the MyFaces - Users mailing list archive at Nabble.com.



PPR - Update an inputText dont work

2007-07-12 Thread Ariel Di Mattia
Hi all, 

I am having some problems with PPR.  When I try to update an inputText, it's 
simply do nothing (no errors or warnings).  But, if I put the same 
partialTriggers in other component (i.e. outputFormatted) with same backing 
bean, all works fine.

Here is my code:

f:view
tr:document title=#{title.applicationName}
t:div styleClass=mainPanel
tr:form id=form
tr:commandButton id=pSub_button
immediate=true
partialSubmit=true
text=Update
actionListener=#{newAgent.editContact}
/tr:commandButton
tr:panelLabelAndMessage label=OUTPUT FORMATTED: 
tr:outputFormatted id=cmdTarget1
   partialTriggers=pSub_button
   styleUsage=instruction
   value=#{newAgent.nombreContacto}
   /tr:outputFormatted
  /tr:panelLabelAndMessage
  tr:panelLabelAndMessage label=INPUT TEXT: 
  tr:inputText id=cmdTarget3
partialTriggers=pSub_button
value=#{newAgent.nombreContacto}
  /tr:inputText
  /tr:panelLabelAndMessage
/tr:form
/t:div
/tr:document
/f:view


And backing bean method for actionListener:

public void editContact(ActionEvent event) {
this.setNombreContacto(NOMBRE PPR);
}


Any ideas?. Is possible to do an inputText update via PPR?.  I think that yes, 
but...my method seems  to be incorrect :

Thanks for all!!!.

Ariel.


Re: PPR - Update an inputText dont work

2007-07-12 Thread Martin Marinschek

Hi Ariel,

you'll have to clean out the value of the input-text - the problem that you
are seeing is that JSF takes the current value in the inputText component,
and sees this as more important than the backing bean value.

so you'll have to bind your inputText to your backing bean (using
binding=#{myBean.myInputText}, and a getter/setter pair getMyInputText /
setMyInputText in your backing bean) and then call:

myInputText.setSubmittedValue(null);
myInputText.setValue(null);
myInputText.setLocalValueSet(false);

with this, your inputText will reread the value from the backing bean!

regards,

Martin

On 7/12/07, Ariel Di Mattia [EMAIL PROTECTED] wrote:


Hi all,

I am having some problems with PPR.  When I try to update an inputText,
it's
simply do nothing (no errors or warnings).  But, if I put the same
partialTriggers in other component (i.e. outputFormatted) with same
backing
bean, all works fine.

Here is my code:

f:view
tr:document title=#{title.applicationName}
t:div styleClass=mainPanel
tr:form id=form
tr:commandButton id=pSub_button
immediate=true
partialSubmit=true
text=Update
actionListener=#{newAgent.editContact}
/tr:commandButton
tr:panelLabelAndMessage label=OUTPUT FORMATTED: 
tr:outputFormatted id=cmdTarget1
   partialTriggers=pSub_button
   styleUsage=instruction
   value=#{newAgent.nombreContacto}
   /tr:outputFormatted
  /tr:panelLabelAndMessage
  tr:panelLabelAndMessage label=INPUT TEXT: 
  tr:inputText id=cmdTarget3
partialTriggers=pSub_button
value=#{newAgent.nombreContacto}
  /tr:inputText
  /tr:panelLabelAndMessage
/tr:form
/t:div
/tr:document
/f:view


And backing bean method for actionListener:

public void editContact(ActionEvent event) {
this.setNombreContacto(NOMBRE PPR);
}


Any ideas?. Is possible to do an inputText update via PPR?.  I think that
yes,
but...my method seems  to be incorrect :

Thanks for all!!!.

Ariel.





--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: [Trinidad] State saving between applications

2007-07-12 Thread Adam Winer

There shouldn't be any difference between redirecting
after AJAX or redirecting after a standard request.
The state should be the same.  I'm not sure
what you're describing.

-- Adam


On 7/12/07, Stéphane Poirier [EMAIL PROTECTED] wrote:

Hi,

I have 2 different Trinidad applications interacting. Beeing different
applications, I'm using ExternalContext.sendRedirect() to go from an
application to another. It works well (tho it's not very clean) and the
state of components is the same when the page is revisited (beans are in
session scope). My problem is when I'm using AJAX with partialTrigers. If
I'm using a redirect in an action after AJAX, the state will not be saved (I
understand that it's the normal behavior). Still, I want to solve this
problem. Any ideas?

I read that ViewHandler could possibly help... is that right? If so, an
implementation hint would be greatly appreciated! :-)

Thanks in advance!



Re: [Trinidad] FacesContext's UIViewRoot in PhaseListener

2007-07-12 Thread Adam Winer

The UIViewRoot is populated post-Restore View.  If
you want the view root to be populated, you'd better
make that request a POST with all form data available.

-- Adam



On 7/11/07, Trung Hoang [EMAIL PROTECTED] wrote:

Hi, I am creating some ajax functionality which makes a request to a phase
listener. Im actually using Oracle ADF 10.1.3 but i want to know how it
works in Trinidad so i could try to figure out how to do it in ADF 10.1.3

My query is, I need access to the UIViewRoot available via
FacesContext.getInstance().getViewRoot(). When i access this in my
PhaseListener, it's empty since JSF thinks the ajax request is a new view.

Now, i need to tell JSF that i want to access the ViewRoot of the parent
page where the ajax enable component is on, where the UIViewRoot is already
populated.

Seemingly easy stuff, as Ajax4JSF and many other component frameworks
probably already do it. I've seen a post by someone on the Oracle forums
trying to do the same thing without success
http://forums.oracle.com/forums/thread.jspa?threadID=527009
. Surely ADF can do it since it works!!! How do i get it to work for my
situation.

Do i need to supply special values in the ajax request? Do i need to extend
the ADF PhaseListener?



Re: PPR - Update an inputText dont work

2007-07-12 Thread Matthias Wessendorf

Nice,
didn't realize, that resetValue() made it into 1.2

http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/javax/faces/component/UIInput.html#resetValue()

nice

   public void resetValue()
   {
   setValue(null);
   setSubmittedValue(null);
   setLocalValueSet(false);
   setValid(true);
   }

On 7/12/07, Simon Lessard [EMAIL PROTECTED] wrote:

Hello Ariel,

Martin is right. However, Trinidad (and JSF 1.2) also offers a shortcut for
those ever repeating 3 lines of code. You can simply call
myInputText.resetValue().


Regards,

~ Simon



On 7/12/07, Martin Marinschek [EMAIL PROTECTED] wrote:
 Hi Ariel,

 you'll have to clean out the value of the input-text - the problem that
you are seeing is that JSF takes the current value in the inputText
component, and sees this as more important than the backing bean value.

 so you'll have to bind your inputText to your backing bean (using
binding=#{myBean.myInputText}, and a getter/setter pair getMyInputText /
setMyInputText in your backing bean) and then call:

 myInputText.setSubmittedValue(null);
 myInputText.setValue(null);
 myInputText.setLocalValueSet(false);

 with this, your inputText will reread the value from the backing bean!

 regards,

 Martin



 On 7/12/07, Ariel Di Mattia [EMAIL PROTECTED]  wrote:
  Hi all,
 
  I am having some problems with PPR.  When I try to update an inputText,
it's
  simply do nothing (no errors or warnings).  But, if I put the same
  partialTriggers in other component (i.e. outputFormatted) with same
backing
  bean, all works fine.
 
  Here is my code:
 
  f:view
  tr:document title=#{title.applicationName}
  t:div styleClass=mainPanel
  tr:form id=form
  tr:commandButton id=pSub_button
  immediate=true
  partialSubmit=true
  text=Update
 
actionListener=#{newAgent.editContact}
  /tr:commandButton
  tr:panelLabelAndMessage label=OUTPUT
FORMATTED: 
  tr:outputFormatted
id=cmdTarget1
 
partialTriggers=pSub_button
 
styleUsage=instruction
 
value=#{newAgent.nombreContacto }
 /tr:outputFormatted
/tr:panelLabelAndMessage
tr:panelLabelAndMessage label=INPUT TEXT:

tr:inputText id=cmdTarget3
 
partialTriggers=pSub_button
 
value=#{newAgent.nombreContacto}
/tr:inputText
/tr:panelLabelAndMessage
  /tr:form
  /t:div
  /tr:document
  /f:view
 
 
  And backing bean method for actionListener:
 
  public void editContact(ActionEvent event) {
  this.setNombreContacto(NOMBRE PPR);
  }
 
 
  Any ideas?. Is possible to do an inputText update via PPR?.  I think
that yes,
  but...my method seems  to be incorrect :
 
  Thanks for all!!!.
 
  Ariel.
 



 --

 http://www.irian.at

 Your JSF powerhouse -
 JSF Consulting, Development and
 Courses in English and German

 Professional Support for Apache MyFaces





--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org


Re: PPR - Update an inputText dont work

2007-07-12 Thread Simon Lessard

Hello Ariel,

Martin is right. However, Trinidad (and JSF 1.2) also offers a shortcut for
those ever repeating 3 lines of code. You can simply call
myInputText.resetValue().


Regards,

~ Simon

On 7/12/07, Martin Marinschek [EMAIL PROTECTED] wrote:


Hi Ariel,

you'll have to clean out the value of the input-text - the problem that
you are seeing is that JSF takes the current value in the inputText
component, and sees this as more important than the backing bean value.

so you'll have to bind your inputText to your backing bean (using
binding=#{myBean.myInputText}, and a getter/setter pair getMyInputText /
setMyInputText in your backing bean) and then call:

myInputText.setSubmittedValue(null);
myInputText.setValue(null);
myInputText.setLocalValueSet(false);

with this, your inputText will reread the value from the backing bean!

regards,

Martin

On 7/12/07, Ariel Di Mattia [EMAIL PROTECTED] wrote:

 Hi all,

 I am having some problems with PPR.  When I try to update an inputText,
 it's
 simply do nothing (no errors or warnings).  But, if I put the same
 partialTriggers in other component (i.e. outputFormatted) with same
 backing
 bean, all works fine.

 Here is my code:

 f:view
 tr:document title=#{title.applicationName}
 t:div styleClass=mainPanel
 tr:form id=form
 tr:commandButton id=pSub_button
 immediate=true
 partialSubmit=true
 text=Update
 actionListener=#{newAgent.editContact}
 /tr:commandButton
 tr:panelLabelAndMessage label=OUTPUT FORMATTED: 
 tr:outputFormatted id=cmdTarget1
partialTriggers=pSub_button
styleUsage=instruction
value=#{newAgent.nombreContacto}
/tr:outputFormatted
   /tr:panelLabelAndMessage
   tr:panelLabelAndMessage label=INPUT TEXT: 
   tr:inputText id=cmdTarget3
 partialTriggers=pSub_button
 value=#{newAgent.nombreContacto}
   /tr:inputText
   /tr:panelLabelAndMessage
 /tr:form
 /t:div
 /tr:document
 /f:view


 And backing bean method for actionListener:

 public void editContact(ActionEvent event) {
 this.setNombreContacto(NOMBRE PPR);
 }


 Any ideas?. Is possible to do an inputText update via PPR?.  I think
 that yes,
 but...my method seems  to be incorrect :

 Thanks for all!!!.

 Ariel.




--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


Re: [Trinidad] PPR duplicating transient components

2007-07-12 Thread Adam Winer

You can set:
   context-param
   param-name
   org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
   /param-name
   param-valuefalse/param-value
   /context-param

to bypass the issue.  Performance will be a little slower.

-- Adam



On 7/11/07, Graeme Steyn [EMAIL PROTECTED] wrote:

Hi,

I have recently made a correction to my Facelets pages to make sure that
the PPR works correctly.  I included the trh:body tag thanks to a
response from Matthias to someone else's posting (without the tag it
simply does a full refresh).  The impact was immediate and all of my
headers and footers started to duplicate.

The duplication of components when using Facelets is not limited to PPR.
I have attached a sample project showing the problem, with corresponding
JSP pages that do not have the problem (one of which produces a
NullPointerException)(have also uploaded the attachment to
https://issues.apache.org/jira/browse/TRINIDAD-95 as it appears closely
related).  The project uses a maven pom to build.

Basically, any template text that is not wrapped in a Trinidad component
will be duplicated if the page is render after a full request cycle (no
validation errors, etc.)  For example, in the snippet below, the h3
element will be duplicated, but not the h2 element which lies outside
of any tr: tag.

body
h:form id=form1

h2Heading in form (using lt;tr:formgt;)/h2

tr:panelGroupLayout id=layout
f:facet name=separator
tr:separator /
/f:facet

h3Heading within tr:panelGroupLayout/h3

tr:inputText
label=Test Input
required=true /

tr:panelButtonBar id=pageNav
tr:commandButton id=command
action=submit
text=Submit
shortDesc=Submit /
/tr:panelButtonBar

/tr:panelGroupLayout

/h:form
/body

Unfortunately, I have not got as far as debugging to find where the
problem is.  To correct it, the h3 element can be wrapped in a
tr:outputText or tr:outputDocument tag.  This is however not ideal as
all of the original headers and footers etc. have been done by web
developers using normal xhtml and css.  To rework this into standard
Trinidad components will take time.  It also removes some of the
flexibility of using Facelets.  It would be easier to switch back to JSP
using static and dynamic includes, tag files and simple tags.

Does anyone have an opinions if it is worth sticking with Facelets when
using Trinidad or is it just simpler to switch back to JSP 2.1?

Regards,

Graeme.



-Original Message-
From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 11 July 2007 12:18 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] PPR duplicating transient components

not you,

I only noticed the words transient and JSF12

https://issues.apache.org/jira/browse/TRINIDAD-95

:-)

On 7/10/07, noah [EMAIL PROTECTED] wrote:
 ? I didn't create one for this issue. Should I?

 On 7/10/07, Matthias Wessendorf [EMAIL PROTECTED] wrote:
  jira allows doing an upload, I noticed you created already an issue
in there.
 
  -M
 
  On 7/10/07, noah [EMAIL PROTECTED] wrote:
   OK. Mail daemon hates zip files.  Here's a tarball of a demo
project.
  
   On 7/10/07, Adam Winer [EMAIL PROTECTED] wrote:
A testcase would be great!  I suspect a Facelets bug here,
though it's kind of a corner case.
   
-- Adam
   
   
On 7/9/07, noah [EMAIL PROTECTED] wrote:
 On 7/6/07, Adam Winer [EMAIL PROTECTED] wrote:
  On 7/6/07, noah [EMAIL PROTECTED] wrote:
   On 7/6/07, Gary VanMatre [EMAIL PROTECTED] wrote:
   
   
From: noah [EMAIL PROTECTED]

 On 7/6/07, Gary VanMatre wrote:
 
  From: noah
  
   Thought I'd post this before creating a JIRA
   issue, in case I've overlooked something. I just
   now produced this with 1.2.1 but I think I've seen
it in 1.0.x before.
  
   In the following page, clicking the link correctly

   updates 'Foo=' to 'Foo=1' but it renders the
   paragraph twice. Clicking again updates
   -both- paragraphs to 'Foo=2' and adds a third.
   Click again for a 4th, and Foo=3, and so on.
  
   Using an h:outputText instead of inline EL keeps
   the text from being repeated, but additional
paragraph elements are added with each click.
  
  
 
 tr:document xmlns=http://www.w3.org/1999/xhtml;
xmlns:ui=http://java.sun.com/jsf/facelets;
xmlns:f=http://java.sun.com/jsf/core;
xmlns:h=http://java.sun.com/jsf/html;
xmlns:tr=http://myfaces.apache.org/trinidad;
   tr:form
   tr:panelHeader partialTriggers=foo
  pFoo=#{pageFlowScope.foo}/p
gt ;   /tr:panelHeader
   nbsp; nbsp;   tr:commandLink id=foo
partialSubmit=true text=Do
 it!
  

Re: Want to Stop Text Wrap Around in Table Cells

2007-07-12 Thread Caroline Jen
1. white-space: pre; works but the height of the
table inside its surrounding div becomes half of it.

2. Alternatively, text wrapping around problem is gone
if I put !-- -- on the very top of the JSP.  But,
the JavaScript in that page stops working.

I wondering if IE6 does those things to us. 
--- Andrew Robinson [EMAIL PROTECTED]
wrote:

 Do you have children elements of the DIV? (I've seen
 problems with that)
 
 Just to check, does white-space: pre; work?
 
 On 7/11/07, Caroline Jen [EMAIL PROTECTED]
 wrote:
  I followed your suggestion to put div inside the
  column.  But, the text still wraps around.  Is it
  because I use IE6?
  --- Andrew Robinson [EMAIL PROTECTED]
  wrote:
 
   I has to be inside the columns, not outside the
   table, I did that on purpose
  
   On 7/11/07, Caroline Jen [EMAIL PROTECTED]
   wrote:
My div class=nowrap is outside the
   h:dataTable
... tag.  I simply cannot stop text wrapping
   around
in table cells.
--- Andrew Robinson
 [EMAIL PROTECTED]
wrote:
   
 TD ignores the overflow style attribute in
 my
 experience. I would suggest:

 CSS:
 DIV.nowrap { white-space: nowrap; overflow:
   auto; }

 h:dataTable
   h:column
 div class=nowrap.../div
   /h:column
 /h:dataTable

 On 7/10/07, Caroline Jen
 [EMAIL PROTECTED]
 wrote:
  I display a table inside a div because I
   want to
  show scrollbars. However, I have wrapped
   around
 text
  inside table cells although I provide
 enough
   width
 to
  each column and used white-space:nowrap;
  overflow-x:scroll. How do I make all text
 in
   each
  table cell displayed in one single line?
 
  code:
 

   
  
 


 
  style
  .scrollbar
 {overflow-y:auto;
 overflow-x:scroll;
  scrollbar-face-color: #C0C0C0;
  scrollbar-arrow-color: #587090;
  scrollbar-track-color: #90A0B0;
  scrollbar-shadow-color: #7B7B7B;
  scrollbar-highlight-color: #F9F9F9;
  scrollbar-3dlight-color: #FF;
  scrollbar-darkshadow-Color: #8B8B8B;
   }
  .lovTableDefault
  {
  BORDER-TOP: #006699 1.5px
   solid;
  BORDER-LEFT:
  #006699 1.5px solid;   
 BORDER-RIGHT:
 white 1.5px
  solid;  BORDER-BOTTOM: white 1.5px
   solid;
  padding:
  3px;overflow-y:auto;
 overflow-x:scroll;
  white-space: nowrap;
  }
  .tableHeaderDefault
  {
  text-align: left;
 white-space: nowrap;FONT-SIZE:
  0.7em;  FONT-FAMILY: Arial,
 Helvetica,
 sans-serif;
  }
  .codeColumn
  {
  text-align: left;
 FONT-FAMILY: Verdana, sans-serif;
  font-size:0.7em;
 width: 7em; white-space: nowrap;
  border: 0;
  }
  .descriptionColumn
  {
  text-align: left;
 FONT-FAMILY: Verdana, sans-serif;
  font-size:0.7em;
 width: 30em;white-space: nowrap;
  border: 0;
  }
  /style
  
 div style=height:12em; width:20em;
  id=container class=scrollbar

   h:dataTable
 
   value=#{countriesManagementBean.countriesList}
  var=country
 
 id=countryTable
  styleClass=lovTableDefault

 border=0
  cellspacing=1 bgcolor=#FF
  headerClass=tableHeaderDefault
  columnClasses=codeColumn,
 descriptionColumn
  h:column
 f:facet name=header
  h:outputText style=width:7em;
 white-space:nowrap;
  value=Code/
 /f:facet
  h:outputText value=#{country.code}/
  /h:column
   h:column
f:facet
  name=header
   h:outputText
  style=width:30em; white-space:nowrap;
  value=Description/
 /f:facet
  h:outputText
 value=#{country.description}/
  /h:column
  /h:dataTable
 
 
 
 
 

   
  
 


  Get the Yahoo! toolbar and be alerted to
 new
   email
 wherever you're surfing.
 

   
  
 

http://new.toolbar.yahoo.com/toolbar/features/mail/index.php
 

   
   
   
   
  
 


Fussy? Opinionated? Impossible to please?
 Perfect.
Join Yahoo!'s user panel and lay it on us.
  
 

http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
   
   
  
 
 
 
   


 

Re: [Trinidad] State saving between applications

2007-07-12 Thread Stéphane Poirier

Sorry, my description wasn't completely right as I re-read it. I'll take it
over correctly with an example :

I'm in JSP 1 which contains a tr:table (with it's default navigation
menu) and a tr:selectOneChoise. Changing the selectOnChoise changes the
table data using partialTriggers and an action in the backing bean. At that
point, if I redirect to another application and come back, JSP 1 will
restore to the state it was.

However, if I use the table navigation to see the third page of data (for
example) then redirect to another application and come back, the JSP 1 will
show the first page of data instead of the third. That is my problem.




On 7/12/07, Adam Winer [EMAIL PROTECTED] wrote:


There shouldn't be any difference between redirecting
after AJAX or redirecting after a standard request.
The state should be the same.  I'm not sure
what you're describing.

-- Adam


On 7/12/07, Stéphane Poirier [EMAIL PROTECTED] wrote:
 Hi,

 I have 2 different Trinidad applications interacting. Beeing different
 applications, I'm using ExternalContext.sendRedirect() to go from an
 application to another. It works well (tho it's not very clean) and the
 state of components is the same when the page is revisited (beans are in
 session scope). My problem is when I'm using AJAX with partialTrigers.
If
 I'm using a redirect in an action after AJAX, the state will not be
saved (I
 understand that it's the normal behavior). Still, I want to solve this
 problem. Any ideas?

 I read that ViewHandler could possibly help... is that right? If so, an
 implementation hint would be greatly appreciated! :-)

 Thanks in advance!




Re: Converter.getAsString not called?

2007-07-12 Thread Toppac

I tried something similiar to this. I overwrote the validate method to say
that if I have a submitted value but my converted value is null, don't reset
the submitted value. This all works fine and dandy, but when I get into the
RendererUtils.getStringValue method it is showing my submitted value as
null. I traced through the code and I can not find who is resetting this
value to null. Below is my method for validate and the section of code from
RendererUtils that is failing. Any idea why submitted value would be showing
as null?

public void validate(FacesContext context) {
if (context == null) throw new NullPointerException(context);
Object submittedValue = getSubmittedValue();
if (submittedValue == null) return;

Object convertedValue = getConvertedValue(context, submittedValue);

if (!isValid()) return;

validateValue(context, convertedValue);

if (!isValid()) return;

Object previousValue = getValue();
setValue(convertedValue);
if (StringUtils.isNotEmpty((String)submittedValue)  convertedValue
!= null) {
setSubmittedValue(null);
if (compareValues(previousValue, convertedValue))
{
queueEvent(new ValueChangeEvent(this, previousValue,
convertedValue));
}
}
else {
queueEvent(new ValueChangeEvent(this, previousValue,
convertedValue));
}

}



if (component instanceof EditableValueHolder)
{
Object submittedValue =
((EditableValueHolder)component).getSubmittedValue();
if (submittedValue != null) // FAILS HERE
{
if (submittedValue instanceof String)
{
return (String)submittedValue;
}
else
{
throw new IllegalArgumentException(Expected
submitted value of type String for component : 
+getPathToComponent(component));
}
}
}



Andrew Robinson-5 wrote:
 
 Yes that is a problem. Okay, another approach.:
 
 my:keepSubmitted
   h:inputText value=#{bean.value} /
 /my:keepSubmitted
 
 public class UIKeepSubmitted extends UIComponentBase {
   public void processValidators(FacesContext context) {
 UIInput child = (UIInput)getChildren().get(0);
 Converter converter = child.getConverter();
 boolean localConverter = false;
 String submitted = child.getSubmittedValue();
 if (converter != null) {
   localConverter = child.getValueBinding(converter) == null;
   child.setConverter(new ConverterWrapper(converter));
 }
 super.processValidators(context);
 if
 (Boolean.FALSE.equals(child.getAttributes().get(ConverterWrapper.VALID_FLAG)))
 {
   child.setSubmittedValue(submitted);
   child.setLocalValue(null);
   child.setLocalValueSet(false);
 }
 child.setConverter(localConverter ? converter : null);
   }
 }
 
 public class ConverterWrapper implements Converter {
   public final static String VALID_FLAG = UIInputConversionSucceeded;
   private Converter orignal;
   public ConverterWrapper(Converter orignal) {
 this.original = original;
   }
   public Object getAsObject(FacesContext context, UIComponent component,
 String value) throws ConverterException {
 boolean valid = true;
 try {
   Object obj = original.getAsObject(context, component, value);
   if (!component.isValid()) {
 component.setValid(true);
 valid = false;
   }
   return obj;
 } catch (ConverterException ex) {
   component.setValid(true);
   valid = false;
 } finally {
   component.getAttributes().put(VALID_FLAG, Boolean.valueOf(valid));
 }
   }
 
   public String getAsString(FacesContext context, UIComponent component,
 Object value) throws ConverterException {
 return original.getAsString(context, component, value);
   }
 }
 
 If you want to use validators, you will have to wrap them too.
 
 On 7/10/07, Toppac [EMAIL PROTECTED] wrote:

 Small problem with this approach. If a component begins with value of
 Null
 and my custom converter returns a value of null for invalid values, the
 value change never fires.


 Andrew Robinson-5 wrote:
 
  Yes, it should jive, unless someone wrote a custom component extending
  UIInput that changes the behavior so that it doesn't agree with the
  specification.
 
  Process of validate:
  1) check for submitted value, if none exit
  2) get converter, and convert if found
  3) check if valid, exit if not
  4) validate the value
  5) check if valid, exit if not
  6) clear submitted value
  7) set local value
  8) check  fire value change event
 
  Process of update:
  1) check if valid, else return
  2) check if local value is set, else return
  3) set the value on the value binding
  4) clear the local 

Re: Converter.getAsString not called?

2007-07-12 Thread Toppac

I found my problem. I am using Spring Webflow with the redirects turned on.
It appears that when the redirect is issued, it is rebuilding the view and
thus rebuilding my component, so any values I had set on the component are
gone. I am not sure how to stop this. I have server state saving turned on
so I thought it would retain the view, even with the redirect. Anyone have a
suggestion? MyFaces configuration is below

!-- MyFaces Configuration --

context-param
param-namejavax.faces.STATE_SAVING_METHOD/param-name
param-valueserver/param-value
/context-param

context-param
   
param-nameorg.apache.myfaces.COMPRESS_STATE_IN_SESSION/param-name
param-valuefalse/param-value
/context-param

context-param
   
param-nameorg.apache.myfaces.SERIALIZE_STATE_IN_SESSION/param-name
param-valuefalse/param-value
/context-param


context-param
descriptionOnly applicable if state saving method is server (=
default).
Defines the amount (default = 20) of the latest views are stored
in session.
/description
   
param-nameorg.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION/param-name
param-value20/param-value
/context-param



Toppac wrote:
 
 I tried something similiar to this. I overwrote the validate method to say
 that if I have a submitted value but my converted value is null, don't
 reset the submitted value. This all works fine and dandy, but when I get
 into the RendererUtils.getStringValue method it is showing my submitted
 value as null. I traced through the code and I can not find who is
 resetting this value to null. Below is my method for validate and the
 section of code from RendererUtils that is failing. Any idea why submitted
 value would be showing as null?
 
 public void validate(FacesContext context) {
   if (context == null) throw new NullPointerException(context);
 Object submittedValue = getSubmittedValue();
 if (submittedValue == null) return;
 
 Object convertedValue = getConvertedValue(context,
 submittedValue);
 
 if (!isValid()) return;
 
 validateValue(context, convertedValue);
 
 if (!isValid()) return;
 
 Object previousValue = getValue();
 setValue(convertedValue);
 if (StringUtils.isNotEmpty((String)submittedValue) 
 convertedValue != null) {
   setSubmittedValue(null);
   if (compareValues(previousValue, convertedValue))
 {
 queueEvent(new ValueChangeEvent(this, previousValue,
 convertedValue));
 }
 }
 else {
   queueEvent(new ValueChangeEvent(this, previousValue,
 convertedValue));
 }
 
   }
 
 
 
 if (component instanceof EditableValueHolder)
 {
 Object submittedValue =
 ((EditableValueHolder)component).getSubmittedValue();
 if (submittedValue != null) // FAILS HERE
 {
 if (submittedValue instanceof String)
 {
 return (String)submittedValue;
 }
 else
 {
 throw new IllegalArgumentException(Expected
 submitted value of type String for component : 
 +getPathToComponent(component));
 }
 }
 }
 
 
 
 Andrew Robinson-5 wrote:
 
 Yes that is a problem. Okay, another approach.:
 
 my:keepSubmitted
   h:inputText value=#{bean.value} /
 /my:keepSubmitted
 
 public class UIKeepSubmitted extends UIComponentBase {
   public void processValidators(FacesContext context) {
 UIInput child = (UIInput)getChildren().get(0);
 Converter converter = child.getConverter();
 boolean localConverter = false;
 String submitted = child.getSubmittedValue();
 if (converter != null) {
   localConverter = child.getValueBinding(converter) == null;
   child.setConverter(new ConverterWrapper(converter));
 }
 super.processValidators(context);
 if
 (Boolean.FALSE.equals(child.getAttributes().get(ConverterWrapper.VALID_FLAG)))
 {
   child.setSubmittedValue(submitted);
   child.setLocalValue(null);
   child.setLocalValueSet(false);
 }
 child.setConverter(localConverter ? converter : null);
   }
 }
 
 public class ConverterWrapper implements Converter {
   public final static String VALID_FLAG = UIInputConversionSucceeded;
   private Converter orignal;
   public ConverterWrapper(Converter orignal) {
 this.original = original;
   }
   public Object getAsObject(FacesContext context, UIComponent component,
 String value) throws ConverterException {
 boolean valid = true;
 try {
   Object obj = original.getAsObject(context, component, value);
   if (!component.isValid()) {
 component.setValid(true);
 valid = false;
   }
   return obj;
 } catch 

converter-for-class not set during RendererUtils

2007-07-12 Thread Toppac

I've overwritten the default Integer converter with my own converter. I
defined the converter in my faces-config using the converter-for-class. When
I debug through the code I can see that during RendererUtils.getStringValue
the converter is coming back as null, so the getAsObject method is not
called. This is with MyFaces 1.1.4 using a Post-Redirect-Get model, in case
that has a bearing.
-- 
View this message in context: 
http://www.nabble.com/converter-for-class-not-set-during-RendererUtils-tf4070703.html#a11568404
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: t:message inside pprPanelGroup

2007-07-12 Thread Michał 'Gandalf' Stawicki

Tanks, it helped

On 12/07/07, Gerald Müllan [EMAIL PROTECTED] wrote:

Hi,

i think this is the case because the {0}, {1} values are in request
scope only. Try to store the values somewhere, e.g. t:saveState with
model value bindings.

cheers,

Gerald

On 7/12/07, Michał 'Gandalf' Stawicki [EMAIL PROTECTED] wrote:
 Disregard what i said. It's something strange with detailFormat. {1}
 is empty, and {0} is alaways id: message

 here's my code:

 t:outputLabel
 for=password1
 value=#{m.password1} /
 t:inputText
 id=password1
 value=#{registerUser.password1}
 onkeyup=submit(this);
 
valueChangeListener=#{registerUser.password1Changed}
 f:validateLength minimum=6 /
 /t:inputText
 s:pprPanelGroup
 
partialTriggers=mainForm:password1,mainForm:password2
 id=pprPassword2
 t:message
 id=password2Msg
 for=password1
 showSummary=false
 showDetail=true
 forceSpan=true
 replaceIdWithLabel=true/
 /s:pprPanelGroup

 On 12/07/07, Michał 'Gandalf' Stawicki [EMAIL PROTECTED] wrote:
  If I put a t:message inside s:pprPanelGroup and it get's displayed as
  partial rendering, then messages' atttributes are all ignored, and
  defaults are used. If it is displayed after full page submit
  everything works fine. Is there any solution for this behaviour?
 
  regards,
 
  --
  Michał Stawicki
 
  [EMAIL PROTECTED]
  http://stawicki.jasliska.pl
 


 --
 Michał Stawicki

 [EMAIL PROTECTED]
 http://stawicki.jasliska.pl



--
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces




--
Michał Stawicki

[EMAIL PROTECTED]
http://stawicki.jasliska.pl


RE: [Swiss JSF Users] JSF Special-Interest-Group Switzerland

2007-07-12 Thread Jesse Alexander \(KSFD 121\)
For all interested people here are the infos of the first meeting:
http://ajesse.wordpress.com/2007/07/12/jsf-usergroup-ch-meeting-1/.
Including links to photos of the happy crowd ;)

see you next time
Alexander



disable/enable h:inputText dynamically

2007-07-12 Thread ...Gargi

I have an inputText component whose disable attribute is bound to a booelan
in the backing bean in request scope.

while the page is loading flag = true. Later when i change the flag to false
(on button click), the inputText component does become enabled, but its
value does not get set in the backing bean.  

JSP code :
h:inputText id = input value = #{loginBean.text}  disabled =
#{loginBean.flag}/
h:commandButton  id = disable value = DISABLE action =
#{loginBean.disable}  /
h:commandButton  id = enable value = ENABLE action =
#{loginBean.enable}  /

Backing Bean code : 
public String text;
public boolean flag = true;  
public void disable() { this.setFlag(true);}
public void enable() { this.setFlag(false);}
(+ getter-setter methods..)

This is strange because the situation is nto the same when inputText
component is enabled to begin with. In that case it functions as expected.

Solutions/discussions will be appreciatedthanks 

-- 
View this message in context: 
http://www.nabble.com/disable-enable-%3Ch%3AinputText%3E-dynamically-tf4070769.html#a11568580
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: disable/enable h:inputText dynamically

2007-07-12 Thread Grant Smith

Is the bean request scoped ? If so, use saveState on #{loginBean.flag}.

On 7/12/07, ...Gargi [EMAIL PROTECTED] wrote:



I have an inputText component whose disable attribute is bound to a
booelan
in the backing bean in request scope.

while the page is loading flag = true. Later when i change the flag to
false
(on button click), the inputText component does become enabled, but its
value does not get set in the backing bean.

JSP code :
h:inputText id = input value = #{loginBean.text}  disabled =
#{loginBean.flag}/
h:commandButton  id = disable value = DISABLE action =
#{loginBean.disable}  /
h:commandButton  id = enable value = ENABLE action =
#{loginBean.enable}  /

Backing Bean code :
public String text;
public boolean flag = true;
public void disable() { this.setFlag(true);}
public void enable() { this.setFlag(false);}
(+ getter-setter methods..)

This is strange because the situation is nto the same when inputText
component is enabled to begin with. In that case it functions as expected.

Solutions/discussions will be appreciatedthanks

--
View this message in context:
http://www.nabble.com/disable-enable-%3Ch%3AinputText%3E-dynamically-tf4070769.html#a11568580
Sent from the MyFaces - Users mailing list archive at Nabble.com.





--
Grant Smith


Re: PPR - Update an inputText dont work

2007-07-12 Thread Martin Marinschek

Ah, I didn't know that either - thanks for the heads-up, I need to get this
into my course material. Kewl!

regards,

Martin

On 7/12/07, Matthias Wessendorf [EMAIL PROTECTED] wrote:


Nice,
didn't realize, that resetValue() made it into 1.2


http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/javax/faces/component/UIInput.html#resetValue()

nice

public void resetValue()
{
setValue(null);
setSubmittedValue(null);
setLocalValueSet(false);
setValid(true);
}

On 7/12/07, Simon Lessard [EMAIL PROTECTED] wrote:
 Hello Ariel,

 Martin is right. However, Trinidad (and JSF 1.2) also offers a shortcut
for
 those ever repeating 3 lines of code. You can simply call
 myInputText.resetValue().


 Regards,

 ~ Simon



 On 7/12/07, Martin Marinschek [EMAIL PROTECTED] wrote:
  Hi Ariel,
 
  you'll have to clean out the value of the input-text - the problem
that
 you are seeing is that JSF takes the current value in the inputText
 component, and sees this as more important than the backing bean value.
 
  so you'll have to bind your inputText to your backing bean (using
 binding=#{myBean.myInputText}, and a getter/setter pair getMyInputText
/
 setMyInputText in your backing bean) and then call:
 
  myInputText.setSubmittedValue(null);
  myInputText.setValue(null);
  myInputText.setLocalValueSet(false);
 
  with this, your inputText will reread the value from the backing bean!
 
  regards,
 
  Martin
 
 
 
  On 7/12/07, Ariel Di Mattia [EMAIL PROTECTED]  wrote:
   Hi all,
  
   I am having some problems with PPR.  When I try to update an
inputText,
 it's
   simply do nothing (no errors or warnings).  But, if I put the same
   partialTriggers in other component (i.e. outputFormatted) with same
 backing
   bean, all works fine.
  
   Here is my code:
  
   f:view
   tr:document title=#{title.applicationName}
   t:div styleClass=mainPanel
   tr:form id=form
   tr:commandButton id=pSub_button
   immediate=true
   partialSubmit=true
   text=Update
  
 actionListener=#{newAgent.editContact}
   /tr:commandButton
   tr:panelLabelAndMessage label=OUTPUT
 FORMATTED: 
   tr:outputFormatted
 id=cmdTarget1
  
 partialTriggers=pSub_button
  
 styleUsage=instruction
  
 value=#{newAgent.nombreContacto }
  /tr:outputFormatted
 /tr:panelLabelAndMessage
 tr:panelLabelAndMessage label=INPUT TEXT:
 
 tr:inputText id=cmdTarget3
  
 partialTriggers=pSub_button
  
 value=#{newAgent.nombreContacto}
 /tr:inputText
 /tr:panelLabelAndMessage
   /tr:form
   /t:div
   /tr:document
   /f:view
  
  
   And backing bean method for actionListener:
  
   public void editContact(ActionEvent event) {
   this.setNombreContacto(NOMBRE PPR);
   }
  
  
   Any ideas?. Is possible to do an inputText update via PPR?.  I think
 that yes,
   but...my method seems  to be incorrect :
  
   Thanks for all!!!.
  
   Ariel.
  
 
 
 
  --
 
  http://www.irian.at
 
  Your JSF powerhouse -
  JSF Consulting, Development and
  Courses in English and German
 
  Professional Support for Apache MyFaces




--
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
mail: matzew-at-apache-dot-org





--

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces


my faces and scheduler component

2007-07-12 Thread [EMAIL PROTECTED]
Hi everybody,

I have a project with a standard MyFaces implementation. I
added a scheduler component that I found here:

http://www.irian.at/myfaces/schedule5.jsf

Everything works fine except of the click event on the items
in the scheduler.
In the jsp I put the element and added a mouseListener and
an action property:

t:schedule binding=#{Page1.schedule} id=schedule1
mouseListener=#{Page1.scheduleClicked}
action=#{Page1.scheduleAction} [...] /

and in the java code I placed the functions this way:

 public String scheduleAction()
{
System.out.println(selected entry:  +
schedule.getModel().getSelectedEntry());
return success;
}

public void scheduleClicked(ScheduleMouseEvent event)
{
StringBuffer buffer = new StringBuffer();
switch (event.getEventType())
{
case ScheduleMouseEvent.SCHEDULE_BODY_CLICKED:
buffer.append(schedule body was clicked: );
buffer.append(event.getClickedTime());
break;
case ScheduleMouseEvent.SCHEDULE_HEADER_CLICKED:
buffer.append(schedule header was clicked: );
buffer.append(event.getClickedDate());
break;
case ScheduleMouseEvent.SCHEDULE_ENTRY_CLICKED:
buffer.append(schedule entry was clicked.);

break;
default:
buffer.append(no schedule mouse events
registered);
}

   System.out.println(buffer);
}


At runtime, Tomcat simply says The server encountered an
internal error () that prevented it from fulfilling this
request., in debug mode I see that the java methods are not
actually invoked - the error seems to happen before - and I
get logged the following:


GRAVE: Servlet.service() for servlet Faces Servlet threw
exception
java.lang.IllegalStateException:
org.apache.myfaces.custom.schedule.UISchedule$ScheduleActionListener
at
javax.faces.component.StateHolderSaver.restore(StateHolderSaver.java:100)
at
javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1299)
at
javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1151)
at
org.apache.myfaces.custom.schedule.UISchedule.restoreState(UISchedule.java:378)
at
org.apache.myfaces.custom.schedule.HtmlSchedule.restoreState(HtmlSchedule.java:189)
at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1032)
at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
at
javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1044)
at
com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:336)
at
com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:250)
at
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:310)
at
com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:177)
at
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at
com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
com.sun.rave.web.ui.util.UploadFilter.doFilter(UploadFilter.java:198)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at

ServerSideTabSwitch in panelTabbedPane

2007-07-12 Thread opick

Hi,

we are facing a (we assume) limitation in the panelTabbedPane of myFaces. If
we use serverSideTabeSwitch=true, to keep page sizes small, we have a
problem with the seam-lifecycle.

During a tab-switch obviously only few phases are called and for us
important phases like update-model-values are skipped.

We want to display some information (product-details) onto a few tabs. If we
switch to a new product, only the tab which was active in that moment will
display correct values. If we switch a tab after selecting a new product in
the next tab will still be the old values (we assume) because not all phases
are executed (validation, model-update, invoke application).

Is this a bug or known limitation of the panelTabbedPane or is there a
chance to go through all phases, when switching tabs?

Thanks for help,
Oliver
-- 
View this message in context: 
http://www.nabble.com/ServerSideTabSwitch-in-panelTabbedPane-tf4071046.html#a11569455
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Trinidad table paging

2007-07-12 Thread Laperle, Denis
Hello

 

I'm trying to code a single page JSF application to get familiar with
Trinidad components (1.0.1) and the JSF framework.

 

I simply click on a command button to execute a method initialising a
List property of a managed bean (scope=request) and use a tr:table
component to display the 25 first element of the list.

 

If I use the built-in paging support of the tr:table component to see
the 25 next elements, the list elements disappears and a new managed
bean gets instantiated.

 

I just want to be sure that it's a normal behaviour and not something
I'm doing wrong.

 

If I set the managed bean with the session scope attribute it works fine
but I thought it wouldn't be necessary to deal with session beans till I
add some complexities like selecting an element in the list to display
its detailed information on a second page.

 

Please help clarifying this.

 



RE: [Trinidad] PPR duplicating transient components

2007-07-12 Thread Graeme Steyn
Thanks Adam.  I did miss the previous reference to CACHE_VIEW_ROOT lower
down in the email.

Regards,

Graeme. 

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED] 
Sent: Friday, 13 July 2007 2:30 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] PPR duplicating transient components

You can set:
context-param
param-name
org.apache.myfaces.trinidad.CACHE_VIEW_ROOT
/param-name
param-valuefalse/param-value
/context-param

to bypass the issue.  Performance will be a little slower.

-- Adam



On 7/11/07, Graeme Steyn [EMAIL PROTECTED] wrote:
 Hi,

 I have recently made a correction to my Facelets pages to make sure 
 that the PPR works correctly.  I included the trh:body tag thanks to

 a response from Matthias to someone else's posting (without the tag it

 simply does a full refresh).  The impact was immediate and all of my 
 headers and footers started to duplicate.

 The duplication of components when using Facelets is not limited to
PPR.
 I have attached a sample project showing the problem, with 
 corresponding JSP pages that do not have the problem (one of which 
 produces a NullPointerException)(have also uploaded the attachment to
 https://issues.apache.org/jira/browse/TRINIDAD-95 as it appears 
 closely related).  The project uses a maven pom to build.

 Basically, any template text that is not wrapped in a Trinidad 
 component will be duplicated if the page is render after a full 
 request cycle (no validation errors, etc.)  For example, in the 
 snippet below, the h3 element will be duplicated, but not the h2 
 element which lies outside of any tr: tag.

 body
 h:form id=form1

 h2Heading in form (using lt;tr:formgt;)/h2

 tr:panelGroupLayout id=layout
 f:facet name=separator
 tr:separator /
 /f:facet

 h3Heading within tr:panelGroupLayout/h3

 tr:inputText
 label=Test Input
 required=true /

 tr:panelButtonBar id=pageNav
 tr:commandButton id=command
 action=submit
 text=Submit
 shortDesc=Submit /
 /tr:panelButtonBar

 /tr:panelGroupLayout

 /h:form
 /body

 Unfortunately, I have not got as far as debugging to find where the 
 problem is.  To correct it, the h3 element can be wrapped in a 
 tr:outputText or tr:outputDocument tag.  This is however not ideal as 
 all of the original headers and footers etc. have been done by web 
 developers using normal xhtml and css.  To rework this into standard 
 Trinidad components will take time.  It also removes some of the 
 flexibility of using Facelets.  It would be easier to switch back to 
 JSP using static and dynamic includes, tag files and simple tags.

 Does anyone have an opinions if it is worth sticking with Facelets 
 when using Trinidad or is it just simpler to switch back to JSP 2.1?

 Regards,

 Graeme.



 -Original Message-
 From: Matthias Wessendorf [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, 11 July 2007 12:18 AM
 To: MyFaces Discussion
 Subject: Re: [Trinidad] PPR duplicating transient components

 not you,

 I only noticed the words transient and JSF12

 https://issues.apache.org/jira/browse/TRINIDAD-95

 :-)

 On 7/10/07, noah [EMAIL PROTECTED] wrote:
  ? I didn't create one for this issue. Should I?
 
  On 7/10/07, Matthias Wessendorf [EMAIL PROTECTED] wrote:
   jira allows doing an upload, I noticed you created already an 
   issue
 in there.
  
   -M
  
   On 7/10/07, noah [EMAIL PROTECTED] wrote:
OK. Mail daemon hates zip files.  Here's a tarball of a demo
 project.
   
On 7/10/07, Adam Winer [EMAIL PROTECTED] wrote:
 A testcase would be great!  I suspect a Facelets bug here, 
 though it's kind of a corner case.

 -- Adam


 On 7/9/07, noah [EMAIL PROTECTED] wrote:
  On 7/6/07, Adam Winer [EMAIL PROTECTED] wrote:
   On 7/6/07, noah [EMAIL PROTECTED] wrote:
On 7/6/07, Gary VanMatre [EMAIL PROTECTED] wrote:


 From: noah [EMAIL PROTECTED]
 
  On 7/6/07, Gary VanMatre wrote:
  
   From: noah
   
Thought I'd post this before creating a JIRA 
issue, in case I've overlooked something. I just

now produced this with 1.2.1 but I think I've 
seen
 it in 1.0.x before.
   
In the following page, clicking the link 
correctly

updates 'Foo=' to 'Foo=1' but it renders the 
paragraph twice. Clicking again updates
-both- paragraphs to 'Foo=2' and adds a third.
Click again for a 4th, and Foo=3, and so on.
   
Using an h:outputText instead of inline EL keeps

the text from being repeated, but additional
 paragraph elements are added with each click.
   
   
  
  tr:document xmlns=http://www.w3.org/1999/xhtml;
 

Re: how to stop Ajax poll call through java script

2007-07-12 Thread ayan

What about my dataScroller problem??? anybody who knows how to get around
with it? Is there any other way to solve it other than extending from the
dataScroller renderer?
-- 
View this message in context: 
http://www.nabble.com/How-to-send-parameters-when-navigating-a-list-using-t%3AdataScroller-tf4066575.html#a11571964
Sent from the MyFaces - Users mailing list archive at Nabble.com.