RE: How to override ResponseWriter

2007-05-22 Thread mario.buonopane
Adam sorry for my response vague

What I need is that the method getResponseWriter of FacesContext return
a my implementation of ResponseWriter.

 

I there any way to configure my implementation of ResponseWriter?

 

Thanks in advance

Mario 

 



From: Adam Winer [mailto:[EMAIL PROTECTED] 
Sent: 22 maggio 2007 00.40
To: MyFaces Discussion
Subject: Re: How to override ResponseWriter

 

That's awfully vague... At any rate, I'd consider inserting
a custom component inside f:view but as a parent of everything
else, and making that custom component install a decorating
ResponseWriter.  If you're using a Facelets template for your 
pages, that's easy enough.

-- Adam



On 5/21/07, [EMAIL PROTECTED] 
[EMAIL PROTECTED] wrote:

I need to execute some code for all html renderers before default
startElement.

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED]
Sent: 21 maggio 2007 18.34
To: MyFaces Discussion
Subject: Re: How to override ResponseWriter

It'd help if you told us what you were trying to do,
as there's more than one possible answer.

-- Adam


On 5/21/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:




 Hi, is there a way to override the default ResponseWriter? How can I 
 configure it?



 Thanks in advance

 Mario Buonopane










 This message is for the designated recipient only and may contain 
 privileged, proprietary, or otherwise private information. If you have
 received it in error, please notify the sender immediately and delete
the
 original. Any other use of the email by you is prohibited. 


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the original.  Any other use of the email by you is prohibited. 

 



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.


[Tobago] datepicker needs specific id

2007-05-22 Thread Clemens Sietas
Hello,

I am using a tx:date in the following way.
I have given the component an id.

tx:date id=vldtyBeg
 value=#{controller.selectedVldtyBeg}
 label=#{controller.keyLblValidityBegin}
 readonly=#{controller.forEditSelected}
  f:convertDateTime pattern=dd.MM./
/tx:date

However, I am getting the following warning which tells me
that I have to use a specific id. In my opinion I am using
an id.
Is it possible to prevent the code from throwing the warning?

Thanks in advance
Clemens Sietas

WARNING: Component page:dlgAddEdit:_idJsp111:vldtyBeg_pickerpopup:_id0 just got 
an automatic id, because there was no id assigned yet. If this component was 
created dynamically (i.e. not by a JSP tag) you should assign it an explicit 
static id or assign it the id you get from the createUniqueId from the current 
UIViewRoot component right after creation!

-- 

Clemens Sietas
email: [EMAIL PROTECTED]





problem with using style sheets in faces frame work.

2007-05-22 Thread shree


hi all,
i am using jsf frame work.
i am trying to apply background-image for a page using style sheets.
my code for style class is like below.

.bg{
background-image:url(image.jpg);
}

This is not getting applied to my jsf page.
but it is working fine for an html page.

how can i solve this problem.
some body please help me.

thanks in advace,
shree.
 
-- 
View this message in context: 
http://www.nabble.com/problem-with-using-style-sheets-in-faces-frame-work.-tf3795181.html#a10734373
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: problem with using style sheets in faces frame work.

2007-05-22 Thread Angel Miralles Arevalo
The problem could be you aren't specifying the right route to image directory:

Where have you defined the  image directory in your project structure???

Moreover try: 

.bg{
background-image:url(image.jpg);
}

with doble quote.


- Mensaje original 
De: shree [EMAIL PROTECTED]
Para: users@myfaces.apache.org
Enviado: martes, 22 de mayo, 2007 11:25:18
Asunto: problem with using style sheets in faces frame work.


hi all,
i am using jsf frame work.
i am trying to apply background-image for a page using style sheets.
my code for style class is like below.

.bg{
background-image:url(image.jpg);
}

This is not getting applied to my jsf page.
but it is working fine for an html page.

how can i solve this problem.
some body please help me.

thanks in advace,
shree.

-- 
View this message in context: 
http://www.nabble.com/problem-with-using-style-sheets-in-faces-frame-work.-tf3795181.html#a10734373
Sent from the MyFaces - Users mailing list archive at Nabble.com.





__ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

Re: [Tobago] datepicker needs specific id

2007-05-22 Thread Volker Weber

Hi Clemens,

this is a bug in tobago, i just created a jira entry:
https://issues.apache.org/jira/browse/TOBAGO-406

Thanks for reporting this.

afaik it is not possible to suppress this warning, exept to configure
the logging api
to not log warnings for this category, which is probably not what you want.


Regards,
   Volker

2007/5/22, Clemens Sietas [EMAIL PROTECTED]:

Hello,

I am using a tx:date in the following way.
I have given the component an id.

tx:date id=vldtyBeg
 value=#{controller.selectedVldtyBeg}
 label=#{controller.keyLblValidityBegin}
 readonly=#{controller.forEditSelected}
  f:convertDateTime pattern=dd.MM./
/tx:date

However, I am getting the following warning which tells me
that I have to use a specific id. In my opinion I am using
an id.
Is it possible to prevent the code from throwing the warning?

Thanks in advance
Clemens Sietas

WARNING: Component page:dlgAddEdit:_idJsp111:vldtyBeg_pickerpopup:_id0 just got 
an automatic id, because there was no id assigned yet. If this component was 
created dynamically (i.e. not by a JSP tag) you should assign it an explicit 
static id or assign it the id you get from the createUniqueId from the current 
UIViewRoot component right after creation!

--

Clemens Sietas
email: [EMAIL PROTECTED]






Re: problem with using style sheets in faces frame work.

2007-05-22 Thread shree


my images r in different folder.
i hv provided the correct path only...like below

background-image:url(/resources/images/image.jpg);

with quotations also it is not getting applied.

-- 
View this message in context: 
http://www.nabble.com/problem-with-using-style-sheets-in-faces-frame-work.-tf3795181.html#a10735085
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: problem with using style sheets in faces frame work.

2007-05-22 Thread Angel Miralles Arevalo
where are the images directories from WEB-INF?


- Mensaje original 
De: shree [EMAIL PROTECTED]
Para: users@myfaces.apache.org
Enviado: martes, 22 de mayo, 2007 12:19:37
Asunto: Re: problem with using style sheets in faces frame work.


my images r in different folder.
i hv provided the correct path only...like below

background-image:url(/resources/images/image.jpg);

with quotations also it is not getting applied.

-- 
View this message in context: 
http://www.nabble.com/problem-with-using-style-sheets-in-faces-frame-work.-tf3795181.html#a10735085
Sent from the MyFaces - Users mailing list archive at Nabble.com.



__ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

Submitting parent window from child window?

2007-05-22 Thread Bjørn T Johansen
I have searched all day but I can't seem to find a solution that does work (I 
have found many solutions but
none works for me...)
I am using the myfaces wiki 
(http://wiki.apache.org/myfaces/JavascriptOpenNewWindow) to show me how to open 
and
close a popup window using actionlistener meethods and this works as it should. 
The problem is that when I close
the popup window, the popup windows has chosen some values that are displayed 
in the parent window, so I need to
refresh the parent window, so it displays the values that were chosen but I 
can't find a way to do this...

Anyone have a hint?


Regards,

BTJ

-- 
---
Bjørn T Johansen

[EMAIL PROTECTED]
---
Someone wrote:
I understand that if you play a Windows CD backwards you hear strange Satanic 
messages
To which someone replied:
It's even worse than that; play it forwards and it installs Windows
---


Needs help for creating a new JSF component

2007-05-22 Thread Stephane.CLINCKART
Hi,

I have to develop a new JSF component (component, tag and renderer).

The goal of this new component is easy... Put together severals input zone in 
one single component.

I have done somethink that works... But i'm not sure I did everything 
correctly. (in the State of Art)
-- Should be great if I can get a link to a complete tutorial or full sample.

I create some code I don't like:
-- I have to hardcoded in the backingbean the id of my component and then 
cast it to my component.
In my backingbean, the code looks like this:
UIComponent temp = 
FacesContext.getCurrentInstance().getViewRoot().findComponent(dialog:dialog-body:mltext);
UIMltext myComponent = (UIMltext) temp;

During reading documentation I have found it is possible to add component in 
the JSF tree dynamicly with code like this:
public void addControls(ActionEvent actionEvent)
{
Application application = FacesContext.getCurrentInstance().getApplication();
//Question: how to get controlPanel ???
List children = controlPanel.getChildren();
children.clear();
for (int count = 0; count  numControls; count++)
{
HtmlOutputText output = 
(HtmlOutputText)application.createComponent(HtmlOutputText.COMPONENT_TYPE);
output.setValue(  + count +  );
output.setStyle(color: blue);
children.add(output);
}
}
Is it necessary in my component. What is the goal of adding component in the 
tree?

I can now do: MyValue myValues = myComponent.getValue()

Then I have to do somethink like:

backingBean.setValue1(myValues.getValue1());
backingBean.setValue2(myValues.getValue2());
...
backingBean.setValuex(myValues.getValuex());

Is it correct? I should prefer the setter are called by JSF layer. Is it 
possible?
Thanks a lot. 
Stéphane



howto click a t:commandbutton via js

2007-05-22 Thread Benjamin Bratkus
hi folks,

actually i am fighting with my different browsers :P so for firefox 1.x and
2.x my app works fine but the same side within ie6 do not work. 

means i fill in in a h:inputText a string and press return and i got the next
view by using the button under the inpuText

ie ignores me :9

so i thought about something like :

div
label for=username#{msg['add.byusername']} /label
h:inputText id=usernamevalue=#{myBean.userName}
onkeypress=if(event.keyCode == 13)
document.getElementsByName('selectbutton').doclick();/
!-- get the select button and press it ? -
/div
div class=indent-large
ul class=buttons
li class=select
t:commandButton id=selectbutton name=selectbutton
action=#{myBean.select} value=#{msg['action.select.label']}
title=#{msg['action.select.tooltip']} /
/li
li class=cancel
t:commandButton action=#{myBean.cancel} immediate=true
value=#{msg['action.cancel.label']} title=#{msg['action.cancel.tooltip']} /
/li
/ul
/div

question : how can i press the select button via a js function ?

best regards,

ben



Re: howto click a t:commandbutton via js

2007-05-22 Thread Ayhan Güngör

try
...
document.getElementsByName('selectbutton').onclick();/
...

On 5/22/07, Benjamin Bratkus [EMAIL PROTECTED] wrote:


hi folks,

actually i am fighting with my different browsers :P so for firefox 1.xand
2.x my app works fine but the same side within ie6 do not work.

means i fill in in a h:inputText a string and press return and i got the
next
view by using the button under the inpuText

ie ignores me :9

so i thought about something like :

div
label for=username#{msg['add.byusername']} /label
h:inputText id=usernamevalue=#{myBean.userName}
onkeypress=if(event.keyCode == 13)
document.getElementsByName('selectbutton').doclick();/
!-- get the select button and press it ? -
/div
div class=indent-large
ul class=buttons
li class=select
t:commandButton id=selectbutton name=selectbutton
action=#{myBean.select} value=#{msg['action.select.label']}
title=#{msg['action.select.tooltip']} /
/li
li class=cancel
t:commandButton action=#{myBean.cancel} immediate=true
value=#{msg['action.cancel.label']} title=#{msg['action.cancel.tooltip']}
/
/li
/ul
/div

question : how can i press the select button via a js function ?

best regards,

ben




Re: howto click a t:commandbutton via js

2007-05-22 Thread David Delbecq
no, it will only call the event of onClick but not necesseraly submit form.

To act a if user clicked on button, just do

document.getElementById('formxX::selectButton').click();


En l'instant précis du 22/05/07 14:15, Benjamin Bratkus s'exprimait en
ces termes:
 *i guess you mean the onClick() for the submit button ? or do you mean
 i have to write my own method ?

 ben

 p.s. the onclick does not work...


 On Tue, 22 May 2007 14:51:30 +0300, Ayhan Güngör wrote*
  try
  ...
  document.getElementsByName('selectbutton').x_onClick();/
  ...
 
  On 5/22/07, *Benjamin Bratkus * [EMAIL PROTECTED]
 mailto:[EMAIL PROTECTED] wrote:

 hi folks,
 
  actually i am fighting with my different browsers :P so for
 firefox 1.x and
  2.x my app works fine but the same side within ie6 do not work.
 
  means i fill in in a h:inputText a string and press return and i
 got the next
  view by using the button under the inpuText
 
  ie ignores me :9
 
  so i thought about something like :
 
  div
  label for=username#{msg['add.byusername']} /label
  h:inputText id=usernamevalue=#{myBean.userName}
  x_onKeyPress=if(event.keyCode == 13)
  document.getElementsByName('selectbutton').doclick();/
  !-- get the select button and press it ? -
  /div
  div class=indent-large
  ul class=buttons
  li class=select
  t:commandButton id=selectbutton name=selectbutton
  action=#{myBean.select} value=#{msg['action.select.label']}
  title=#{msg['action.select.tooltip']} /
  /li
  li class=cancel
  t:commandButton action=#{ myBean.cancel} immediate=true
  value=#{msg['action.cancel.label']}
 title=#{msg['action.cancel.tooltip']} /
  /li
  /ul
  /div
 
  question : how can i press the select button via a js function ?
 
  best regards,
 
  ben
 
  




 Viele Grüße, best regards,

 Benjamin Bratkus
 -- 
 Orientation in Objects GmbH
 Weinheimer Str. 68
 D-68309 Mannheim
 http://www.oio.de http://www.oio.de/
 Tel. +49(0)621-71839-0
 Fax +49(0)621-71839-50

 Amtsgericht Mannheim
 HRB 38348




Re: howto click a t:commandbutton via js

2007-05-22 Thread Ayhan Güngör

document.getElementById('selectbutton').onclick();
this will work on IE, Firefox and Opera, if you have a button(id=
selectbutton)



On 5/22/07, Benjamin Bratkus [EMAIL PROTECTED] wrote:


 *i guess you mean the onClick() for the submit button ? or do you mean i
have to write my own method ?

ben

p.s. the onclick does not work...


On Tue, 22 May 2007 14:51:30 +0300, Ayhan Güngör wrote*
 try
 ...
 document.getElementsByName('selectbutton').x_onClick();/
 ...

 On 5/22/07, Benjamin Bratkus [EMAIL PROTECTED] wrote:

 hi folks,
 
  actually i am fighting with my different browsers :P so for firefox
 1.x and
  2.x my app works fine but the same side within ie6 do not work.
 
  means i fill in in a h:inputText a string and press return and i got
 the next
  view by using the button under the inpuText
 
  ie ignores me :9
 
  so i thought about something like :
 
  div
  label for=username#{msg['add.byusername']} /label
  h:inputText id=usernamevalue=#{myBean.userName}
  x_onKeyPress=if(event.keyCode == 13)
  document.getElementsByName('selectbutton').doclick();/
  !-- get the select button and press it ? -
  /div
  div class=indent-large
  ul class=buttons
  li class=select
  t:commandButton id=selectbutton name=selectbutton
  action=#{myBean.select} value=#{msg['action.select.label']}
  title=#{msg['action.select.tooltip']} /
  /li
  li class=cancel
  t:commandButton action=#{ myBean.cancel} immediate=true
  value=#{msg['action.cancel.label']} title=#{msg['
 action.cancel.tooltip']} /
  /li
  /ul
  /div
 
  question : how can i press the select button via a js function ?
 
  best regards,
 
  ben
 
 




Viele Grüße, best regards,

Benjamin Bratkus
--
Orientation in Objects GmbH
Weinheimer Str. 68
D-68309 Mannheim
http://www.oio.de
Tel. +49(0)621-71839-0
Fax +49(0)621-71839-50

Amtsgericht Mannheim
HRB 38348




RE: howto click a t:commandbutton via js

2007-05-22 Thread William Hoover
I think he ment to say: 
 
Internet Expolder:
myInputObj.click();
 
Firefox:
HTMLElement.prototype.click = function() {
var evt = this.ownerDocument.createEvent('MouseEvents');
evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 
0, 0, 0, 0, false, false, false, false, 0, null);
this.dispatchEvent(evt);
}
 
-Original Message-
From: Benjamin Bratkus [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 22, 2007 8:15 AM
To: MyFaces Discussion
Subject: Re: howto click a t:commandbutton via js


i guess you mean the onClick() for the submit button ? or do you mean i have to 
write my own method ? 

ben 

p.s. the onclick does not work... 


On Tue, 22 May 2007 14:51:30 +0300, Ayhan Güngör wrote 
 try 
 ... 
 document.getElementsByName('selectbutton').x_onClick();/ 
 ... 
 
 On 5/22/07, Benjamin Bratkus  [EMAIL PROTECTED] wrote: 

hi folks, 
 
 actually i am fighting with my different browsers :P so for firefox 1.x and 
 2.x my app works fine but the same side within ie6 do not work. 
 
 means i fill in in a h:inputText a string and press return and i got the next 
 view by using the button under the inpuText 
 
 ie ignores me :9 
 
 so i thought about something like : 
 
 div 
 label for=username#{msg['add.byusername']} /label 
 h:inputText id=usernamevalue=#{myBean.userName} 
 x_onKeyPress=if(event.keyCode == 13) 
 document.getElementsByName('selectbutton').doclick();/ 
 !-- get the select button and press it ? - 
 /div 
 div class=indent-large 
 ul class=buttons 
 li class=select 
 t:commandButton id=selectbutton name=selectbutton 
 action=#{myBean.select} value=#{msg['action.select.label']} 
 title=#{msg['action.select.tooltip']} / 
 /li 
 li class=cancel 
 t:commandButton action=#{ myBean.cancel} immediate=true 
 value=#{msg['action.cancel.label']} title=#{msg['action.cancel.tooltip']} 
 / 
 /li 
 /ul 
 /div 
 
 question : how can i press the select button via a js function ? 
 
 best regards, 
 
 ben 
 
 




Viele Grüße, best regards, 

Benjamin Bratkus 
-- 
Orientation in Objects GmbH 
Weinheimer Str. 68 
D-68309 Mannheim 
http://www.oio.de http://www.oio.de/  
Tel. +49(0)621-71839-0 
Fax +49(0)621-71839-50 

Amtsgericht Mannheim 
HRB 38348 




[Tobago] Problem with input suggestion and change facet

2007-05-22 Thread Helmut Swaczinna

Hi,

I've a tc:in with a suggestMethod and a change facet with a command tag. But 
the command is not executed when I
choose a value from the suggestion list. It is only executed when the 
suggestion list is empty.


Example:

   tc:panel id=inputPanel
 tc:in id=value1 value=#{controller.value1}
   suggestMethod=#{controller.suggest}
   f:facet name=change
 tc:command action=#{controller.changeAction}
   tc:attribute name=renderedPartially 
value=:inputPage:inputPanel/

 /tc:command
   /f:facet
 /tc:in
 tc:in readonly=true id=value2 value=#{controller.value2}/
   /tc:panel

Regards
Helmut 





Re: [Trinidad] java.io.NotSerializableException: java.util.RandomAccessSubList

2007-05-22 Thread Henk Vanhoe

Indeed, the exception is gone now!

Thanks a lot,
Henk

Adam Winer wrote:

Fixed!

http://issues.apache.org/jira/browse/TRINIDAD-27

Thanks for tracking down that crucial bit of information.  I'd
never known that List.subList() wasn't serializable!

-- Adam



On 5/21/07, Henk Vanhoe [EMAIL PROTECTED] wrote:

Hi,

I'm using a trinidad navigation tree, but I'm having this exception
(full stacktrace at th end of this mail):

java.io.NotSerializableException: java.util.RandomAccessSubList

I suppose this is happening during serialization because I'm using the
'client' STATE_SAVING_METHOD (with the CLIENT_STATE_METHOD 'all'). As I
don't use RandomAccessSubList in my own code, it must come from trinidad
itself.

The source of the problem could be that the Collections.sublist() method
returns an instance of RandomAccessSubList, as described in this link:

http://journeymanjournal.blogspot.com/2005/07/collectionssublist-returns-non.html 



This seems to be the same problem as described in

https://issues.apache.org/jira/browse/ADFFACES-260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpane 




Full stacktrace:

java.io.NotSerializableException: java.util.RandomAccessSubList
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.HashMap.writeObject(HashMap.java:1038)
at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) 


at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375) 


at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) 


at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at
org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:248) 


at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310) 


at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288) 


at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at
org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:250) 


at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310) 


at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288) 


at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at
org.apache.myfaces.trinidad.component.TreeState.writeExternal(TreeState.java:250) 


at
java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1310) 


at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1288) 


at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.GeneratedMethodAccessor105.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 


at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290) 


 

Re: How to override ResponseWriter

2007-05-22 Thread Adam Winer

Create a component.
Place it around everything else in the tree.
In your component's encodeBegin(), write:

 ResponseWriter oldWriter = context.getResponseWriter();
 // You almost always want to at least partially delegate
 ResponseWriter myWriter = new MyWriter(oldWriter);
 context.setResponseWriter(myWriter);

and in encodeEnd():

 MyWriter writer = (MyWriter) context.getResponseWriter();
 context.setResponseWriter(writer.getOldResponseWriter());

-- Adam





On 5/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:





Adam sorry for my response vague….

What I need is that the method getResponseWriter of FacesContext return a my
implementation of ResponseWriter.



I there any way to configure my implementation of ResponseWriter?



Thanks in advance

Mario



 


From: Adam Winer [mailto:[EMAIL PROTECTED]
 Sent: 22 maggio 2007 00.40

 To: MyFaces Discussion
 Subject: Re: How to override ResponseWriter




That's awfully vague... At any rate, I'd consider inserting
 a custom component inside f:view but as a parent of everything
 else, and making that custom component install a decorating
 ResponseWriter.  If you're using a Facelets template for your
 pages, that's easy enough.

 -- Adam




On 5/21/07, [EMAIL PROTECTED]  [EMAIL PROTECTED]
wrote:

I need to execute some code for all html renderers before default
 startElement.

 -Original Message-
 From: Adam Winer [mailto:[EMAIL PROTECTED]
 Sent: 21 maggio 2007 18.34
 To: MyFaces Discussion
 Subject: Re: How to override ResponseWriter

 It'd help if you told us what you were trying to do,
 as there's more than one possible answer.

 -- Adam


 On 5/21/07, [EMAIL PROTECTED]
 [EMAIL PROTECTED] wrote:
 
 
 
 
  Hi, is there a way to override the default ResponseWriter? How can I
  configure it?
 
 
 
  Thanks in advance
 
  Mario Buonopane
 
 
 
 
 
 
 
 
 
 
  This message is for the designated recipient only and may contain
  privileged, proprietary, or otherwise private information. If you have
  received it in error, please notify the sender immediately and delete
 the
  original. Any other use of the email by you is prohibited.


 This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete the
original.  Any other use of the email by you is prohibited.







This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete the
original. Any other use of the email by you is prohibited.


RE: How to override ResponseWriter

2007-05-22 Thread mario.buonopane
Ok, I'll do it! 

Thanks
Mario 

-Original Message-
From: Adam Winer [mailto:[EMAIL PROTECTED] 
Sent: 22 maggio 2007 14.58
To: MyFaces Discussion
Subject: Re: How to override ResponseWriter

Create a component.
Place it around everything else in the tree.
In your component's encodeBegin(), write:

  ResponseWriter oldWriter = context.getResponseWriter();
  // You almost always want to at least partially delegate
  ResponseWriter myWriter = new MyWriter(oldWriter);
  context.setResponseWriter(myWriter);

and in encodeEnd():

  MyWriter writer = (MyWriter) context.getResponseWriter();
  context.setResponseWriter(writer.getOldResponseWriter());

-- Adam





On 5/22/07, [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:




 Adam sorry for my response vague

 What I need is that the method getResponseWriter of FacesContext
return a my
 implementation of ResponseWriter.



 I there any way to configure my implementation of ResponseWriter?



 Thanks in advance

 Mario



  


 From: Adam Winer [mailto:[EMAIL PROTECTED]
  Sent: 22 maggio 2007 00.40

  To: MyFaces Discussion
  Subject: Re: How to override ResponseWriter




 That's awfully vague... At any rate, I'd consider inserting
  a custom component inside f:view but as a parent of everything
  else, and making that custom component install a decorating
  ResponseWriter.  If you're using a Facelets template for your
  pages, that's easy enough.

  -- Adam




 On 5/21/07, [EMAIL PROTECTED] 
[EMAIL PROTECTED]
 wrote:

 I need to execute some code for all html renderers before default
  startElement.

  -Original Message-
  From: Adam Winer [mailto:[EMAIL PROTECTED]
  Sent: 21 maggio 2007 18.34
  To: MyFaces Discussion
  Subject: Re: How to override ResponseWriter

  It'd help if you told us what you were trying to do,
  as there's more than one possible answer.

  -- Adam


  On 5/21/07, [EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
  
  
  
  
   Hi, is there a way to override the default ResponseWriter? How can
I
   configure it?
  
  
  
   Thanks in advance
  
   Mario Buonopane
  
  
  
  
  
  
  
  
  
  
   This message is for the designated recipient only and may contain
   privileged, proprietary, or otherwise private information. If you
have
   received it in error, please notify the sender immediately and
delete
  the
   original. Any other use of the email by you is prohibited.


  This message is for the designated recipient only and may contain
 privileged, proprietary, or otherwise private information.  If you
have
 received it in error, please notify the sender immediately and delete
the
 original.  Any other use of the email by you is prohibited.







 This message is for the designated recipient only and may contain
 privileged, proprietary, or otherwise private information. If you have
 received it in error, please notify the sender immediately and delete
the
 original. Any other use of the email by you is prohibited.


This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information.  If you have received it in 
error, please notify the sender immediately and delete the original.  Any other 
use of the email by you is prohibited.


Where is ...renderkit.html.util.AddResource?

2007-05-22 Thread Cormier, Matthieu
Hello All, 

I am looking for the jar that contains import
org.apache.myfaces.renderkit.html.util.AddResource;

Does anyone know where this class is?  It is used by
HtmlPicklistRenderer package org.apache.myfaces.custom.picklist;

M@


[tomahawk sandbox] dynamic PPR content changes

2007-05-22 Thread Matthes R.

hi all,

i've got a problem with dynamically changing the content of my page with the
PPR components of the sandbox.
i'm using myfaces-core-1.1.5, tomahawk-1.1.5 and
tomahawk-sandbox-1.1.6-SNAPSHOT.

here is my code:
-
h:form id=form1

   t:commandLink id=switchToPage2 action=#{
contentIncludeBean.switchToPage2} value=switch content/
   f:verbatimbr //f:verbatim

   s:pprPanelGroup id=pageContent partialTriggers=switchToPage2
   f:subview id=page1Content rendered=#{
contentIncludeBean.includeString == 'page1'}
   f:verbatimdivpage1/div/f:verbatim
   /f:subview
   f:subview id=page2Content rendered=#{
contentIncludeBean.includeString == 'page2'}
   f:verbatimdivpage2/div/f:verbatim
   /f:subview
   h:outputText value=#{contentIncludeBean.includeString ==
'page1'}/h:outputText
   h:outputText value=#{contentIncludeBean.includeString ==
'page2'}/h:outputText
   /s:pprPanelGroup

/h:form
-

and the bean has this method:

-
   public void switchToPage2() {
   includeString = page2;
   }
-

when loading the page for the first time the subview page1Content is
rendered, so its working correct. then when i hit the commandLink both
subviews are not rendered but the boolean values calculated below are
correct: false / true.

is there a way to fix this problem? or is there another (perhaps better) way
to get this to work?

regards,
Matthes Rieke


[Tobago] tx:date EndDate not before BeginDate

2007-05-22 Thread Clemens Sietas
Hello,

I have another question regarding the datepicker.
Can I easily ensure in JSF-coding that the
selectedVldtyEnd cannot be selected with a smaller date
than the selectedVldtyBeg?
For example with f:validate...

Regards,
Clemens

tx:date id=vldtyBeg
 value=#{controller.selectedVldtyBeg}
 label=#{controller.keyLblValidityBegin}
 readonly=#{controller.forEditSelected}
  f:convertDateTime pattern=dd.MM./
/tx:date
tx:date id=vldtyEnd
 value=#{controller.selectedVldtyEnd}
 label=#{controller.keyLblValidityEnd}
  f:convertDateTime pattern=dd.MM./
/tx:date

-- 

Clemens Sietas
email: [EMAIL PROTECTED]





Re: [tomahawk sandbox] dynamic PPR content changes

2007-05-22 Thread Matthes R.

hi,

aaah ok. fixed that one. i'm kind of new to myfaces so things like this
happen to me often :-)
thanks for the help!

regards,
Matthes


2007/5/22, Volker Weber [EMAIL PROTECTED]:


Hi,

you cant use f:verbatim in ppr updates.

content of verbatim is transient and not restored at rerendering.


Regards,
Volker


2007/5/22, Matthes R. [EMAIL PROTECTED]:
 hi all,

 i've got a problem with dynamically changing the content of my page with
the
 PPR components of the sandbox.
 i'm using myfaces-core-1.1.5, tomahawk-1.1.5 and
 tomahawk-sandbox-1.1.6-SNAPSHOT.

  here is my code:
 -
 h:form id=form1

 t:commandLink id=switchToPage2
 action=#{contentIncludeBean.switchToPage2} value=switch
 content/
 f:verbatimbr //f:verbatim

 s:pprPanelGroup id=pageContent
 partialTriggers=switchToPage2
 f:subview id=page1Content rendered=#{
 contentIncludeBean.includeString == 'page1'}
 f:verbatimdivpage1/div/f:verbatim
 /f:subview
 f:subview id=page2Content rendered=#{
 contentIncludeBean.includeString == 'page2'}
 f:verbatimdivpage2/div/f:verbatim
 /f:subview
 h:outputText
 value=#{contentIncludeBean.includeString ==
 'page1'}/h:outputText
 h:outputText
 value=#{contentIncludeBean.includeString ==
 'page2'}/h:outputText
 /s:pprPanelGroup

 /h:form
 -

 and the bean has this method:

 -
 public void switchToPage2() {
 includeString = page2;
 }
 -

 when loading the page for the first time the subview page1Content is
 rendered, so its working correct. then when i hit the commandLink both
 subviews are not rendered but the boolean values calculated below are
 correct: false / true.

 is there a way to fix this problem? or is there another (perhaps better)
way
 to get this to work?

 regards,
 Matthes Rieke




Paginating a large DB table using ValueListHandler

2007-05-22 Thread Sriram Saroop

Hi,
I'm trying to integrate ValueListHandler(http://valuelist.sourceforge.net)
with the JSF dataModel using the approach suggested in :
http://wiki.apache.org/myfaces/WorkingWithLargeTables
One of the things that I need to do is to implement the following method:

public DataPageSomeRowObject fetchPage(int startRow, int pageSize)

However ValueList does not seem to have a method to return a page given the
startRow. Has anyone tried this approach before ?
If so, any clues/suggestions ?
Thanks,
Sriram


Why do managed beans must implement the Serializable interface

2007-05-22 Thread Trumml

I use MyFaces (1.1.5) with Tomahawk and Facelet support. I added the
following commmand to my xhtlm site:
h:commandButton value=doXY action=#{PatientNavigatorBean.doXY} /
When I press this button an Exception is thrown because the
PatientNavigatorBean is not serializable. My question is: which managed
beans have to be serializable, when and why?
When I add the Serializable interface to my managed bean everything works
fine but I do want to know why I have to do this and are there possibly any
fields in my bean which might be transient?

= I already found a forum post but it does not contain the correct answer
for my question i guess (
http://www.nabble.com/What-requires-implementing-the-Serializable-interface--tf991035.html#a2566919
http://www.nabble.com/What-requires-implementing-the-Serializable-interface--tf991035.html#a2566919
)

16:16:37,983 ERROR [JspStateManagerImpl] Exiting serializeView - Could not
serialize state: at.co.systema.ce.jsf.PatientNavigator
java.io.NotSerializableException: at.co.systema.ce.jsf.PatientNavigator
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.HashMap.writeObject(HashMap.java:1039)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at 

Why do managed beans must implement the Serializable interface

2007-05-22 Thread Trumml

I use MyFaces (1.1.5) with Tomahawk and Facelet support. I added the
following commmand to my xhtlm site:
h:commandButton value=doXY action=#{PatientNavigatorBean.doXY} /
When I press this button an Exception is thrown because the
PatientNavigatorBean is not serializable. My question is: which managed
beans have to be serializable, when and why?
When I add the Serializable interface to my managed bean everything works
fine but I do want to know why I have to do this and are there possibly any
fields in my bean which might be transient?

= I already found a forum post but it does not contain the correct answer
for my question i guess (
http://www.nabble.com/What-requires-implementing-the-Serializable-interface--tf991035.html#a2566919
http://www.nabble.com/What-requires-implementing-the-Serializable-interface--tf991035.html#a2566919
)

16:16:37,983 ERROR [JspStateManagerImpl] Exiting serializeView - Could not
serialize state: at.co.systema.ce.jsf.PatientNavigator
java.io.NotSerializableException: at.co.systema.ce.jsf.PatientNavigator
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.ArrayList.writeObject(ArrayList.java:569)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at java.util.HashMap.writeObject(HashMap.java:1039)
at sun.reflect.GeneratedMethodAccessor87.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at
java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1251)
at
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1075)
at
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at 

[Trinidad] Skinning tr:table

2007-05-22 Thread Francisco Passos

Hi.

I'm trying to skin tr:table so that it doesn't have any border.

I've tried border: 0px in af|table::content and in af|table, but it didn't
work

How can I do this?

Francisco Passos


RE: howto click a t:commandbutton via js

2007-05-22 Thread Benjamin Bratkus
you would not believe it . the real reason - i love it :P

through the wild structure the reason why it wouldn work is :

onkeypress=if(event.keyCode == 13) 
document.getElementById('form:form:selectbutton').onclick();return true;

the damned id was form:form:

thx for your responses

ben

On Tue, 22 May 2007 15:24:47 +0200, Benjamin Bratkus wrote
 he all,
 
 thanks for your fast replies. but i think this is going in the wrong 
 direction. i just want to realize that if someone fills in a string into this 
 input text and presses return
 
 h:inputText id=usernamevalue=#{myBean.userName} 
 x_onKeyPress=if(event.keyCode == 13) 
 document.getElementsByName('selectbutton').doclick();/
 
 the t:commandbutton
 
 t:commandButton id=selectbutton name=selectbutton 
 action=#{myBean.select} value=#{msg['action.select.label']} 
 title=#{msg['action.select.tooltip']} /
 
 is pressed as the user would do.
 
 sorry but cant do anything you proposed.
 
 ben 
 
 On Tue, 22 May 2007 08:23:28 -0400, William Hoover wrote
  I think he ment to say: 
   
  Internet Expolder:
  myInputObj.click();
   
  Firefox:
  HTMLElement.prototype.click = function() {
  var evt = this.ownerDocument.createEvent('MouseEvents');
  evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 
  0, 0, 0, 0, false, false, false, false, 0, null);
  this.dispatchEvent(evt);
  }
   
  -Original Message-
  From: Benjamin Bratkus [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, May 22, 2007 8:15 AM
  To: MyFaces Discussion
  Subject: Re: howto click a t:commandbutton via js
  
  i guess you mean the x_x_onClick() for the submit button ? or do you mean i 
  have to write my own method ? 
  
  ben 
  
  p.s. the x_x_onClick does not work... 
  
  On Tue, 22 May 2007 14:51:30 +0300, Ayhan Güngör wrote 
   try 
   ... 
   document.getElementsByName('selectbutton').x_x_x_onClick();/ 
   ... 
   
   On 5/22/07, Benjamin Bratkus [EMAIL PROTECTED] wrote:hi folks, 
   
   actually i am fighting with my different browsers :P so for firefox 1.x 
   and 
   2.x my app works fine but the same side within ie6 do not work. 
   
   means i fill in in a h:inputText a string and press return and i got the 
   next 
   view by using the button under the inpuText 
   
   ie ignores me :9 
   
   so i thought about something like : 
   
   div 
   label for=username#{msg['add.byusername']} /label 
   h:inputText id=usernamevalue=#{myBean.userName} 
   x_x_x_onKeyPress=if(event.keyCode == 13) 
   document.getElementsByName('selectbutton').doclick();/ 
   !-- get the select button and press it ? - 
   /div 
   div class=indent-large 
   ul class=buttons 
   li class=select 
   t:commandButton id=selectbutton name=selectbutton 
   action=#{myBean.select} value=#{msg['action.select.label']} 
   title=#{msg['action.select.tooltip']} / 
   /li 
   li class=cancel 
   t:commandButton action=#{ myBean.cancel} immediate=true 
   value=#{msg['action.cancel.label']} 
   title=#{msg['action.cancel.tooltip']} / 
   /li 
   /ul 
   /div 
   
   question : how can i press the select button via a js function ? 
   
   best regards, 
   
   ben 
   
   
  
  Viele Grüße, best regards, 
  
  Benjamin Bratkus 
  -- 
  Orientation in Objects GmbH 
  Weinheimer Str. 68 
  D-68309 Mannheim 
  http://www.oio.de 
  Tel. +49(0)621-71839-0 
  Fax +49(0)621-71839-50 
  
  Amtsgericht Mannheim 
  HRB 38348 
  
  
 
 Viele Grüße, best regards, 
 
 Benjamin Bratkus 
 -- 
 Orientation in Objects GmbH 
 Weinheimer Str. 68 
 D-68309 Mannheim 
 http://www.oio.de 
 Tel. +49(0)621-71839-0 
 Fax +49(0)621-71839-50 
 
 Amtsgericht Mannheim 
 HRB 38348 
 


Viele Grüße, best regards,

Benjamin Bratkus 
-- 
Orientation in Objects GmbH 
Weinheimer Str. 68 
D-68309 Mannheim 
http://www.oio.de 
Tel. +49(0)621-71839-0 
Fax +49(0)621-71839-50

Amtsgericht Mannheim 
HRB 38348

 


Re: JSF PhaseListener VS Servlet Filter

2007-05-22 Thread Andrew Robinson

When I wrote our custom security layer, I used a ServletFilter and not
a PhaseListener. The reason I did this is to be able to secure
non-Faces URLs (css, js, downloadable resources). If I only wanted to
secure Faces resources, a PhaseListener would have been adequate.

So I would recommend that if you only want to secure Faces
requests/views, use a PhaseListener or, better in my opinion, a custom
view handler (and secure createView/restoreView). If you want to
secure things outside of Faces, use a servlet filter.

As for retrieving HTTP header variables, that is part of the servlet
specification, not the JSF speicification, so it is just as easy, or
slightly easier, to get it in a servlet filter versus a phase
listener.

On 5/21/07, bansi [EMAIL PROTECTED] wrote:


We use a Homegrown security application
which on successful authentication returns the RequestHeader Variables i.e.
employee Id etc.
We use JSF Spring Hibernate
Wondering whether i should JSF PhaseListener OR Servlet Filter to retrieve
RequestHeader Variables. This is what i am doing currently not sure its best
practice though. Any suggestions/pointers highly appreciated

public class LoginPhaseListener implements PhaseListener
{

public void afterPhase(PhaseEvent pe)
{
FacesContext facesContext = pe.getFacesContext();
String viewId = pe.getFacesContext().getViewRoot().getViewId();
if (viewId.endsWith(.xhtml)) {
String managedBeanName = getManagedBeanNameFromView(viewId);
Object object = facesContext.getApplication().createValueBinding(#{ +
managedBeanName + }).getValue(facesContext);
if (object == null)
logger.error(OnPageLoad cannot be executed, no such managed bean:+
managedBeanName);
else {
Login loginBean = (Login) object;
loginBean.onPageLoad();
}
}
}
public String getManagedBeanNameFromView(String viewId) {
String pageName = viewId.substring(1, viewId.length() - 6);
System.out.println(Name=+StringUtils.capitalize(pageName)+Bean);
return pageName+Bean;
}

JSF Backing Bean:

public class LoginBean implements Login {

public void onPageLoad() {
//System.out.println(***Inside onPageLoad**);
Map requestHeaderMap =
FacesContext.getCurrentInstance().getExternalContext().getRequestHeaderMap();
String empID = (String) requestHeaderMap.get(EmployeeID);
//Retrieve UserId and User roles from database  and populate it with POJO
UserInfo userInfo //pojo
userInfo.setUserId(userId);
userInfo.setUserRoles(userRoles);
/* Store in Session so as to make it available to Spring Layer */
HttpSession userSession =
(HttpSession) FacesContext.getCurrentInstance().getExternalContext()
.getSession(true);
userSession.setAttribute(userInfo, userInfo);

}
}

I am also using Servlet Filter to retrieve Session object
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain
chain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;
// grab the current value from the session
UserInfo userInfo = (UserInfo)
request.getSession().getAttribute(userInfo);
// Update the user info bean holder for the current thread.
UserInfoHolder.setUserInfo(userInfo);  // ThreadLocal object
// call the chain
//System.out.println(In Security Filter);
chain.doFilter(req,resp);
// threadLocal no longer needed (will be recreated next time through the
filter)
//UserInfoHolder.setUserInfo(null);
}

Now i am thinking instead of using PhaseListener cant i just use the Servelt
Filter to retrieve the RequestHeader variables, make connection to database
instead of using HttpSession

Not sure if its best practice though  also how to retrieve RequestHeader
variables in Servlet Filter

Regards
Bansi

--
View this message in context: 
http://www.nabble.com/JSF-PhaseListener-VS-Servlet-Filter-tf3793704.html#a10729899
Sent from the MyFaces - Users mailing list archive at Nabble.com.




RE: Needs help for creating a new JSF component

2007-05-22 Thread Bryan Basham
Hello Stephane,

Yes, I have dealt with the findComponent method and JSF's
name chaining scheme.  I agree with you that these should
not be hardcoded, which makes it hard to use the naming
convention unless you store some essential information in
the tag/component that helps find the other component.
Even then, you often have to hardcode the *structure* of
the path to the specific component.

I will share my experience and give an alternative to the
findComponent(String nameChain) method.

For accessibility purposes, our UI screens include an access
navigation menu that links to anchors within the same page.
Such as a href='#content'Skip to Content Section/a.  The
whole menu is kept in a ullia .../li.../ul structure.
Also within the screen are the HTML anchor tags, such as
a name='content'/a.

When converting to JSF components I decided to use two components:
UIScreenNavigation component (tag: x:screenNav id='accessNav' /)
generates the link menu, but the component does not explicitly
know about the anchors (unlike with raw HTML coding).  The UIScreen-
Anchor component (tag: x:screenAnchor name='content' for='accessNav'/)
is responsible for telling the associated UIScreenNav component.
The 'for' attribute provides the ID of that component.

The x:screenNav/ tag appears early in the screen, but x:screenAnchor/
tags can appear in any place and at any hierarchical level of the screen
design.  Therefore, in order to find the UIScreenNav component I could have
hardcoded that name chain into my code for the UIScreenAnchor component.

What I *really* wanted to do is find a component somewhere (anywhere) in
the component tree that was of a very specific type; in my case the UIScreen-
Navigation class.  So, using a trick from the JSP (not JSF) APIs and created
a method in a utility class that finds a component based on the component's
class.  I also wanted this pair of components to be generic such that two or
more anchor-based navigation menus could co-exist on the same screen.  I did
this (as you saw above) by using an 'id' attribute on the x:screenNav/ tag
and a cooresponding 'for' attribute in the x:screenAnchor/ tag.

Here is the code for these utility methods:


/**
 * This method finds a component within the root tree
 * that matches the ID and class of component.
 */
public static UIComponent findComponentByClass(String id, Class compClass)
{
if ( id == null ) return null;
if ( compClass == null ) return null;

return findComponentByClass(getViewRoot(), id, compClass);
}

/**
 * This method finds a component within the root tree
 * that matches the ID and class of component.
 */
public static UIComponent findComponentByClass(UIComponent withMe, String 
id, Class? compClass)
{
UIComponent result = null;

if ( withMe == null ) return null;
if ( id == null ) return null;
if ( compClass == null ) return null;

// Check if withMe *is* the component we are looking for
if ( id.equals(withMe.getId()) )
{
if ( compClass.isAssignableFrom(withMe.getClass()) )
{
return withMe;
}
}

// Otherwise, check their childern or facets
for ( Iterator it = withMe.getFacetsAndChildren(); it.hasNext(); )
{
UIComponent c = (UIComponent) it.next();
result = findComponentByClass(c, id, compClass);
if ( result != null ) break;
}

return result;
}


Once I had these methods, my coding task for UIScreenAnchor was
easy.  Here is the relevant part of this class:


public class UIScreenAnchor extends UIComponentBase
{
public static final String NAME_ATTR = name;
public static final String FOR_ATTR = for;

private String displayName = null;

@Override
public void setParent(UIComponent parent)
{
// Do the regular stuff
super.setParent(parent);

// Register this anchor with the screen navigation component
String screenNavID = (String) getAttributes().get(FOR_ATTR);
UIComponent c = 
ComponentUtils.findComponentByClass(screenNavID, UIScreenNavigation.class);
if ( c != null )
{
UIScreenNavigation screenNav = (UIScreenNavigation) c;
screenNav.addAnchor(this);
}
}


I hope that I have given you some ideas to solve your
problem.

Regards,
Bryan




-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tue 5/22/2007 5:34 AM
To: users@myfaces.apache.org
Subject: Needs help for creating a new JSF component
 
Hi,


enumerated type and f:selectItems

2007-05-22 Thread eric . jung
Hi,

What's the best way generate UISelectItems from an enumerated type? I'd 
like to populate a UISelectOne-based component with enumerated type values 
and back the component with an enumerated type variable instance. This 
seems like it should be a common pattern in JSF with JDK 1.5+. In fact, 
I'm a little surprised we can't specify an enumerated type (or variable of 
an enumerated type) for f:selectItems.

Thanks for any replies,
Eric

_

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the 
exclusive use of the individual or entity named above and may contain 
information that is privileged, confidential or exempt from disclosure 
under applicable law. If the reader of this message is not the intended 
recipient, or the employee or agent responsible for delivery of the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify the sender immediately by e-mail and delete the material from any 
computer.  Thank you.


Re: enumerated type and f:selectItems

2007-05-22 Thread Andrew Robinson

If you use jboss seam there is support for an enum converter and
enum-select item components that do just what you are looking for.

On 5/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


Hi,

What's the best way generate UISelectItems from an enumerated type? I'd like
to populate a UISelectOne-based component with enumerated type values and
back the component with an enumerated type variable instance. This seems
like it should be a common pattern in JSF with JDK 1.5+. In fact, I'm a
little surprised we can't specify an enumerated type (or variable of an
enumerated type) for f:selectItems.

Thanks for any replies,
Eric

 _

 CONFIDENTIALITY NOTICE

 The information contained in this e-mail message is intended only for the
exclusive use of the individual or entity named above and may contain
information that is privileged, confidential or exempt from disclosure under
applicable law. If the reader of this message is not the intended recipient,
or the employee or agent responsible for delivery of the message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by e-mail and delete the material from any computer.  Thank you.



Re: enumerated type and f:selectItems

2007-05-22 Thread Cagatay Civici

Hi,

Sandbox15 has an enumconverter too.

http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox15/core/src/main/java/org/apache/myfaces/custom/converter/enumeration/EnumConverter.java?view=markup

Cagatay

On 5/22/07, Andrew Robinson [EMAIL PROTECTED] wrote:


If you use jboss seam there is support for an enum converter and
enum-select item components that do just what you are looking for.

On 5/22/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Hi,

 What's the best way generate UISelectItems from an enumerated type? I'd
like
 to populate a UISelectOne-based component with enumerated type values
and
 back the component with an enumerated type variable instance. This seems
 like it should be a common pattern in JSF with JDK 1.5+. In fact, I'm a
 little surprised we can't specify an enumerated type (or variable of an
 enumerated type) for f:selectItems.

 Thanks for any replies,
 Eric

  _

  CONFIDENTIALITY NOTICE

  The information contained in this e-mail message is intended only for
the
 exclusive use of the individual or entity named above and may contain
 information that is privileged, confidential or exempt from disclosure
under
 applicable law. If the reader of this message is not the intended
recipient,
 or the employee or agent responsible for delivery of the message to the
 intended recipient, you are hereby notified that any dissemination,
 distribution or copying of this communication is strictly prohibited. If
you
 have received this communication in error, please notify the sender
 immediately by e-mail and delete the material from any computer.  Thank
you.




Re: [Trinidad] Skinning tr:table

2007-05-22 Thread Petr Kotek

Hi,

I think, that this is not so easy. You must use tr:column and tr:table 
selectors for various parts of table.

For example, for double pixel border under header row, I set styles:

af|column::header-text, af|column::header-number, 
af|column::header-icon-format {

   border-bottom-width: 2px !important;
   border-bottom-style: solid;
 }

I must use !important, because borders are defined in styles 
.OraTableBorder (where  is binary combination of 0 and 1 - for 
all 4 sides) and I don't know side effect, if .OraTableBorder are 
redefined, but may be this is another way...


I am using Firefox with Web Developer Toolbar AddIn to explore used styles.
Also next context param into web.xml is usefull

 context-param
   
param-nameorg.apache.myfaces.trinidadinternal.DISABLE_CONTENT_COMPRESSION/param-name

   param-valuetrue/param-value
 /context-param



Peter



Francisco Passos wrote:

Hi.

I'm trying to skin tr:table so that it doesn't have any border.

I've tried border: 0px in af|table::content and in af|table, but it 
didn't work


How can I do this?

Francisco Passos




Re: [Trinidad] nextAction/previousAction on singleStepButtonBar aren't supported

2007-05-22 Thread Adam Winer

No, that won't help.  We need a custom Facelets MetaRule
(or some new code in the existing TrinidadListenersTagRule).

-- Adam


On 5/22/07, Renzo Tomaselli [EMAIL PROTECTED] wrote:

Hi, I just hit this issue and then found that there is a recent jira
open for it.
Since this component is totally unusable without action/event bindings -
I just need to know whether this issue can be fixed just by removing
PropertyKey.CAP_NOT_BOUND from props listed in UIXSingleStep.java or
there is something deeper to solve.
Just to be sure before turning on something else.

Thanks -- Renzo




Re: [Tobago] tx:date EndDate not before BeginDate

2007-05-22 Thread Udo Schnurpfeil

I only see 2 options, both standard JSF:

  1. check manually in the action method, use facesContext.addMessage()
  2. write your own validator

I don't know a more declarative way in the moment.

Regards,

Udo

Clemens Sietas schrieb:

Hello,

I have another question regarding the datepicker.
Can I easily ensure in JSF-coding that the
selectedVldtyEnd cannot be selected with a smaller date
than the selectedVldtyBeg?
For example with f:validate...

Regards,
Clemens

tx:date id=vldtyBeg
 value=#{controller.selectedVldtyBeg}
 label=#{controller.keyLblValidityBegin}
 readonly=#{controller.forEditSelected}
  f:convertDateTime pattern=dd.MM./
/tx:date
tx:date id=vldtyEnd
 value=#{controller.selectedVldtyEnd}
 label=#{controller.keyLblValidityEnd}
  f:convertDateTime pattern=dd.MM./
/tx:date

  




Re: enumerated type and f:selectItems

2007-05-22 Thread eric . jung
Thanks! If I understand correctly, this converter is for the variable 
which is value-bound to a UIOutput/UIInput-derived classes (e.g. 
UISelectOne), but not for UISelectItems. In other words, is there a way to 
get f:selectItems/ to output options for all values of the enumerated 
type? I tried:

f:selectItems value={#MyClass.selectItems/

public MapMyEnum, String getSelectItems() {
  MapMyEnum, String selectItems = new EnumMapMyEnum, 
String(MyEnum.class);
  for (MyEnum o : EnumSet.allOf(MyEnum.class))
selectItems.put(new Integer(o.ordinal()), o.getName());
  return selectItems;
}

and a few variations on that, without any success.




Cagatay Civici [EMAIL PROTECTED] 
05/22/2007 01:01 PM
Please respond to
MyFaces Discussion users@myfaces.apache.org


To
MyFaces Discussion users@myfaces.apache.org
cc

Subject
Re: enumerated type and f:selectItems






Hi,

Sandbox15 has an enumconverter too.

http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox15/core/src/main/java/org/apache/myfaces/custom/converter/enumeration/EnumConverter.java?view=markup


Cagatay

On 5/22/07, Andrew Robinson [EMAIL PROTECTED] wrote:
If you use jboss seam there is support for an enum converter and
enum-select item components that do just what you are looking for.

On 5/22/07, [EMAIL PROTECTED]  [EMAIL PROTECTED] wrote:

 Hi,

 What's the best way generate UISelectItems from an enumerated type? I'd 
like
 to populate a UISelectOne-based component with enumerated type values 
and 
 back the component with an enumerated type variable instance. This seems
 like it should be a common pattern in JSF with JDK 1.5+. In fact, I'm a
 little surprised we can't specify an enumerated type (or variable of an 
 enumerated type) for f:selectItems.

 Thanks for any replies,
 Eric

  _

  CONFIDENTIALITY NOTICE

  The information contained in this e-mail message is intended only for 
the 
 exclusive use of the individual or entity named above and may contain
 information that is privileged, confidential or exempt from disclosure 
under
 applicable law. If the reader of this message is not the intended 
recipient, 
 or the employee or agent responsible for delivery of the message to the
 intended recipient, you are hereby notified that any dissemination,
 distribution or copying of this communication is strictly prohibited. If 
you 
 have received this communication in error, please notify the sender
 immediately by e-mail and delete the material from any computer.  Thank 
you.



_

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the 
exclusive use of the individual or entity named above and may contain 
information that is privileged, confidential or exempt from disclosure 
under applicable law. If the reader of this message is not the intended 
recipient, or the employee or agent responsible for delivery of the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify the sender immediately by e-mail and delete the material from any 
computer.  Thank you.


Re: enumerated type and f:selectItems

2007-05-22 Thread eric . jung
Typo below:

  selectItems.put(new Integer(o.ordinal()), o.getName())
should be:
  selectItems.put(o, o.getName()); 
In any case, I'm still trying to figure out how to use the EnumConverter 
with h:selectOneRadio/ and friends.







[EMAIL PROTECTED] 
05/22/2007 02:49 PM
Please respond to
MyFaces Discussion users@myfaces.apache.org


To
MyFaces Discussion users@myfaces.apache.org
cc

Subject
Re: enumerated type and f:selectItems







Thanks! If I understand correctly, this converter is for the variable 
which is value-bound to a UIOutput/UIInput-derived classes (e.g. 
UISelectOne), but not for UISelectItems. In other words, is there a way to 
get f:selectItems/ to output options for all values of the enumerated 
type? I tried: 

f:selectItems value={#MyClass.selectItems/ 

public MapMyEnum, String getSelectItems() { 
  MapMyEnum, String selectItems = new EnumMapMyEnum, 
String(MyEnum.class); 
  for (MyEnum o : EnumSet.allOf(MyEnum.class)) 
selectItems.put(new Integer(o.ordinal()), o.getName()); 
  return selectItems; 
} 

and a few variations on that, without any success. 



Cagatay Civici [EMAIL PROTECTED] 
05/22/2007 01:01 PM 

Please respond to
MyFaces Discussion users@myfaces.apache.org


To
MyFaces Discussion users@myfaces.apache.org 
cc

Subject
Re: enumerated type and f:selectItems








Hi,

Sandbox15 has an enumconverter too.

http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox15/core/src/main/java/org/apache/myfaces/custom/converter/enumeration/EnumConverter.java?view=markup


Cagatay

On 5/22/07, Andrew Robinson [EMAIL PROTECTED] wrote: 
If you use jboss seam there is support for an enum converter and
enum-select item components that do just what you are looking for.

On 5/22/07, [EMAIL PROTECTED]  [EMAIL PROTECTED] wrote:

 Hi,

 What's the best way generate UISelectItems from an enumerated type? I'd 
like
 to populate a UISelectOne-based component with enumerated type values 
and 
 back the component with an enumerated type variable instance. This seems
 like it should be a common pattern in JSF with JDK 1.5+. In fact, I'm a
 little surprised we can't specify an enumerated type (or variable of an 
 enumerated type) for f:selectItems.

 Thanks for any replies,
 Eric

  _

  CONFIDENTIALITY NOTICE

  The information contained in this e-mail message is intended only for 
the 
 exclusive use of the individual or entity named above and may contain
 information that is privileged, confidential or exempt from disclosure 
under
 applicable law. If the reader of this message is not the intended 
recipient, 
 or the employee or agent responsible for delivery of the message to the
 intended recipient, you are hereby notified that any dissemination,
 distribution or copying of this communication is strictly prohibited. If 
you 
 have received this communication in error, please notify the sender
 immediately by e-mail and delete the material from any computer.  Thank 
you.
 


_

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the 
exclusive use of the individual or entity named above and may contain 
information that is privileged, confidential or exempt from disclosure 
under applicable law. If the reader of this message is not the intended 
recipient, or the employee or agent responsible for delivery of the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify the sender immediately by e-mail and delete the material from any 
computer.  Thank you.

_

CONFIDENTIALITY NOTICE

The information contained in this e-mail message is intended only for the 
exclusive use of the individual or entity named above and may contain 
information that is privileged, confidential or exempt from disclosure 
under applicable law. If the reader of this message is not the intended 
recipient, or the employee or agent responsible for delivery of the 
message to the intended recipient, you are hereby notified that any 
dissemination, distribution or copying of this communication is strictly 
prohibited. If you have received this communication in error, please 
notify the sender immediately by e-mail and delete the material from any 
computer.  Thank you.


itemDisabled doesnt works in f:selectItem of h:selectOneMenu

2007-05-22 Thread bansi

Here is the dropdown in which itemDisabled=true doesnt works for
f:selectItem 

h:selectOneMenu id=manufList
value=#{manufacturerBean.selectedManufacturer}   
  f:selectItem itemLabel=New itemValue=New itemDisabled=true /
   
  f:selectItems value=#{manufacturerBean.manufacturerList} /   
  a4j:support
action=#{manufacturerBean.loadManufacturerDetails} event=onchange
reRender=manufName,manufDescription,manufSource,btnSave,btnDelete /  
 
   /h:selectOneMenu 

Any pointers/suggestions will be appreciated

Regards
Bansi
-- 
View this message in context: 
http://www.nabble.com/itemDisabled-doesnt-works-in-f%3AselectItem--of-h%3AselectOneMenu-tf3800807.html#a10753832
Sent from the MyFaces - Users mailing list archive at Nabble.com.



retrieve text value from textarea oh HtmlEditor

2007-05-22 Thread BAUDOUIN Thierry


BAUDOUIN Thierry [EMAIL PROTECTED] a écrit : Hello,

i use  t:inputHtml  like this:

f:view


div class=sample-container 

h:form
h:outputText value=Titre:/ 
  h:inputText value=#{ForumBean.titre}  required=true/
  
t:inputHtml value=#{ForumBean.text} 
style=height: 60ex;/

   
h:commandButton  action=#{forumBean.saveMessage} value=Submit/

/h:form

/div

   
 /f:view

After edit text and submit, i can't retireve text written in my method bean 
saveMessage.

why ?

 

  

-
  Découvrez le blog Yahoo! Mail : dernières nouveautés, astuces, conseils.. et 
vos réactions !

 
-
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Re: retrieve text value from textarea oh HtmlEditor

2007-05-22 Thread Matthias Wessendorf

I am not sure,

I'd suggest, go with the dojo-based editor

f:view
 s:dojoInitializer require=dojo.widget.Editor/
 h:form
   h:inputTextarea id=editarea2 styleClass=dojo-Editor
value=#{bean.input}/
   h:commandButton action=#{bean.publish} id=submitted value=Save/
 /h:form
...
/f:view


see [1]

[1] http://www.jroller.com/page/mwessendorf?entry=myfaces_meets_dojo_toolkit

On 5/22/07, BAUDOUIN Thierry [EMAIL PROTECTED] wrote:



BAUDOUIN Thierry [EMAIL PROTECTED] a écrit :
 Hello,

i use t:inputHtml  like this:

f:view


div class=sample-container 

h:form
h:outputText value=Titre:/
  h:inputText value=#{ForumBean.titre} required=true/

t:inputHtml value=#{ForumBean.text}
style=height: 60ex;/


h:commandButton  action=#{forumBean.saveMessage}
value=Submit/

/h:form

/div


 /f:view

After edit text and submit, i can't retireve text written in my method bean
saveMessage.

why ?



 
 Découvrez le blog Yahoo! Mail : dernières nouveautés, astuces, conseils..
et vos réactions !


 
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo!
Mail





--
Matthias Wessendorf

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


Re: itemDisabled doesnt works in f:selectItem of h:selectOneMenu

2007-05-22 Thread bansi

Forgot to mention in my earlier posting 
I have observed itemDisabled=true works in Firefox browser but not in IE.
Even in Firefox browser the item is disable only onChange i.e. pick
different value form the list.  I want the item to be disable as soon as the
page loads

The dropdown is the first component in my JSF page  and it does CRUD
operation. The first value in the dropdown is New.
When users pick New value from the dropdown it facilitates Create
operation 
If users pick a value othet than New  from the dropdown then all other 
fields are dynamically populated facilitating Update operation

As picking New value from dropdown results in Create operation so its
role based and needs to be disabled as follows
f:selectItem itemLabel=New itemValue=New
itemDisabled=#{manufacturerBean.hasRole} /

which unfortunately doesnt work as soon as the page loads

I am setting the value for property hasRole in the Constructor of backing
bean as shown below
public ManufacturerBean() {
  System.out.println(Inside Manuf Constructor);
 UserInfo userInfo = UserInfoHolder.getUserInfo();
userRoles = userInfo.getUserRoles();
Iterator it = userRoles .iterator();
while (it.hasNext()) {
// Get element
userRole = (UserRole) it.next();
roleName = (String) userRole.getNamsRole().getName();
}
if (roleName.equals(NAMS Admin))
hasRole=true;
else
hasRole=false;

  }


Any pointers/suggestions will be highly appreciated

Regards
Bansi

bansi wrote:
 
 Here is the dropdown in which itemDisabled=true doesnt works for
 f:selectItem 
 
 h:selectOneMenu id=manufList
 value=#{manufacturerBean.selectedManufacturer}   
   f:selectItem itemLabel=New itemValue=New itemDisabled=true /
  
   f:selectItems value=#{manufacturerBean.manufacturerList}
 /   
   a4j:support
 action=#{manufacturerBean.loadManufacturerDetails} event=onchange
 reRender=manufName,manufDescription,manufSource,btnSave,btnDelete /

/h:selectOneMenu 
 
 Any pointers/suggestions will be appreciated
 
 Regards
 Bansi
 

-- 
View this message in context: 
http://www.nabble.com/itemDisabled-doesnt-works-in-f%3AselectItem--of-h%3AselectOneMenu-tf3800807.html#a10755372
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: How to integrate myfaces in RSA 7 for portlet?

2007-05-22 Thread loseyourself

Hi Hazem,

I do appreciate your help. After I removed the myfaces-api.jar and
myfaces-iml.jar from the portlet,  then I try to deploy the portlet on the
portal server, I get the following error:
[23/05/07 12:24:21:583 EST] 0085 EngineE
com.ibm.wps.command.xml.Engine XMLEngine EJPFB0002E: ?

com.ibm.wps.command.xml.XmlCommandException: EJPXA0043E: ?
[web-app 1_CGC68OB20O6B60299HF3F33000
uid=com.ibm.faces.portlet.FacesPortlet.80cd274921.webmod]
at com.ibm.wps.command.xml.UpdateEngine.execItem(UpdateEngine.java:260)
... more in the attachment.

Then I create the shared library called in
${WPS_HOME}/shared/app/myfaceslib, put the two jar files there, reference
the application to the created shared library, restart the portal server. If
I run the portlet, get following error:
[23/05/07 12:56:23:928 EST] 0096 PortletRender E
com.ibm.wps.engine.tags.PortletRenderTag doStartTag EJPEJ0066E: 
portlet?
 javax.portlet.UnavailableException:
Exception during portlet initialization
at
com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:229)
... more in the attachment

Then I try to redeploy the portlet to the portal, I still get the same
exception:
com.ibm.wps.command.xml.Engine XMLEngine EJPFB0002E: ?

com.ibm.wps.command.xml.XmlCommandException: EJPXA0043E: ?
[web-app 1_CGC68OB20O6B60299HF3F33000
uid=com.ibm.faces.portlet.FacesPortlet.80cd274921.webmod]
at com.ibm.wps.command.xml.UpdateEngine.execItem(UpdateEngine.java:260)
...

Any ideas? Is there a difference between WAS and WPS?

Thanks,
hj http://www.nabble.com/file/p10757454/wpsoutput.log wpsoutput.log 
-- 
View this message in context: 
http://www.nabble.com/How-to-integrate-myfaces-in-RSA-7-for-portlet--tf3776168.html#a10757454
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Re: How to integrate myfaces in RSA 7 for portlet?

2007-05-22 Thread loseyourself

And an interesting thing is, if I deploy the portlet twice, there won't be
any error message during the publishment, then I re-reference the
application with the shared library, once try to run the portlet, get the
following error:
[23/05/07 15:11:49:982 EST] 0097 ActionManager W
com.ibm.wps.state.accessors.action.manager.ActionManagerImpl executeActions
id = bMX9f1 is invalid.
[23/05/07 15:11:51:719 EST] 0097 ServletWrappe A   SRVE0242I:
[WorkplaceTreeEAR] [/.WorkplaceTree] [com_ibm_wps_AdminServlet]: ??
[23/05/07 15:11:51:953 EST] 0097 ServletWrappe A   SRVE0242I:
[WorkplaceTreeEAR] [/.WorkplaceTree] [WorkplaceTree]: ??
[23/05/07 15:11:52:063 EST] 0097 ServletWrappe A   SRVE0253I:
[WorkplaceTreeEAR] [/.WorkplaceTree] [WorkplaceTree]??
[23/05/07 15:11:52:094 EST] 0097 PortletRender E
com.ibm.wps.engine.tags.PortletRenderTag doStartTag EJPEJ0066E: 
portlet?
 javax.portlet.UnavailableException:
Exception during portlet initialization
at
com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:229)
at
com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)
at
com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:97)
at
com.ibm.wps.pe.pc.std.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:110)
at
com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:587)
at
com.ibm.wps.pe.ext.render.AbstractRenderManager.performService(AbstractRenderManager.java:247)
at
com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:115)
at
com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:161)
at
com.ibm._jsp._Control._jspx_meth_portal$1skin_portletRender_0(_Control.java:852)
at 
com.ibm._jsp._Control._jspx_meth_portal$1logic_if_3(_Control.java:884)
at com.ibm._jsp._Control._jspService(_Control.java:498)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670)
at
com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at
com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:178)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:613)
at
com.ibm.wps.services.dispatcher.DispatcherServiceImpl.handleRequest(DispatcherServiceImpl.java:87)
at
com.ibm.wps.services.dispatcher.DispatcherServiceImpl.include(DispatcherServiceImpl.java:52)
at 
com.ibm.wps.services.dispatcher.Dispatcher.include(Dispatcher.java:45)
at com.ibm.wps.engine.templates.skins.Default.render(Default.java:115)
at 
com.ibm.wps.engine.templates.SkinTemplate.render(SkinTemplate.java:71)
at com.ibm.wps.composition.elements.Component.render(Component.java:845)
at com.ibm.wps.composition.elements.Control.render(Control.java:124)
at com.ibm.wps.composition.Composition.render(Composition.java:2568)
at
com.ibm.websphere.personalization.transformation.PznTransformationLayoutModel.render(PznTransformationLayoutModel.java:70)
at
com.ibm.wps.model.wrappers.LayoutModelWrapperFactoryImpl$LayoutModelWrapperImpl.render(LayoutModelWrapperFactoryImpl.java:218)
at
com.ibm.wps.engine.tags.ComponentRenderTag.doStartTag(ComponentRenderTag.java:89)
at
com.ibm._jsp._UnlayeredContainer_2D_V._jspx_meth_portal$1skin_layoutNodeRender_0(_UnlayeredContainer_2D_V.java:246)
at
com.ibm._jsp._UnlayeredContainer_2D_V._jspService(_UnlayeredContainer_2D_V.java:150)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1282)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1239)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:113)
at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:82)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:670)
at

Re: [Tobago] tx:date EndDate not before BeginDate

2007-05-22 Thread Clemens Sietas
Hello Udo,

thank you for the reply.
I will try both options.

Regards,
Clemens


 I only see 2 options, both standard JSF:
 
1. check manually in the action method, use facesContext.addMessage()
2. write your own validator
 
 I don't know a more declarative way in the moment.
 
 Regards,
 
 Udo
 
 Clemens Sietas schrieb:
  Hello,
 
  I have another question regarding the datepicker.
  Can I easily ensure in JSF-coding that the
  selectedVldtyEnd cannot be selected with a smaller date
  than the selectedVldtyBeg?
  For example with f:validate...
 
  Regards,
  Clemens
 
  tx:date id=vldtyBeg
   value=#{controller.selectedVldtyBeg}
   label=#{controller.keyLblValidityBegin}
   readonly=#{controller.forEditSelected}
f:convertDateTime pattern=dd.MM./
  /tx:date
  tx:date id=vldtyEnd
   value=#{controller.selectedVldtyEnd}
   label=#{controller.keyLblValidityEnd}
f:convertDateTime pattern=dd.MM./
  /tx:date
 


-- 

Clemens Sietas
email: [EMAIL PROTECTED]