Session tracking without Cookies

2007-11-23 Thread H. Swaczinna
Hi everybody,

I'm a little bit confused about session tracking without using
cookies. When cookies are turned of, either in browser or in container,
the sessionId must be encoded in the URL. I know Tomcat does this
for me automaticly. But what to do if the container does not do this
for me, like OC4J? Do I have to do the URL rewriting (encodeURL())
myself in a servlet filter or something? Or can JSF (myFaces) do this
for me?

Thanks for any help.
Regards
Helmut


Re: [Tobago] Layout problems with tc:sheet in a tc:tab with IE

2007-06-04 Thread H. Swaczinna
Hi,

with the moons sheet in demo there seems to be no specific IE layout problem 
(but a general layout problem with the
period column header). The layout problems with the IE depend on the whole 
page layout. Please try the code
I posted.

Regards
Helmut

BTW: Who does the IE testing?

- Original Message - 
From: Volker Weber [EMAIL PROTECTED]
To: MyFaces Discussion users@myfaces.apache.org
Sent: Friday, June 01, 2007 7:42 PM
Subject: Re: [Tobago] Layout problems with tc:sheet in a tc:tab with IE


 Hi,

 the tobago-demo
 http://tobago.atanion.net/tobago-example-demo/faces/overview/tab.jsp
 already contains a sheet inside a tab.

 switch to Server side tabbing, Moons.

 this sheet is loaded by switchtype=reloadTab.

 BTW: i also have no IE available.


 Regards,
Volker


 2007/6/1, Bernd Bohmann [EMAIL PROTECTED]:
 Hello,

 just added your test to

 http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/webapp/tabSheet.jsp

 but I don't have a Windows with IE available.

 Can someone with a Windows test this page, please.


 Regards

 Bernd

 H. Swaczinna wrote:
  Hi,
 
  I have three sheets on a tab of a tab group with 
  switchType=reloadTab.
  With Firefox everything is fine
  but with IE (6 and 7) there layout problems. In my app all three sheets
  disappear when I switch to this tab
  the first time. The sheets are shown for a short time (ca. 0,1 s) and 
  than
  disappear. I think they're first shown
  with a wrong layout and than relayouted and removed. When I switch to
  another tab and back the sheets are
  shown correctly. With switchType=reloadPage there's no problem.
 
  Because my page layout is very compley I can't send you the source 
  code. But
  I built a very small example
  with a tab and a sheet which shoes some layout problems with IE also:
 
  f:view
tc:page id=resetPage width=400px height=200px
  tc:tabGroup switchType=reloadTab
tc:tab id=tab1 label=Tab1
  tc:out value=Tab1/
/tc:tab
tc:tab id=tab2 label=Tab2
  tc:sheet id=testTable
columns=1*;1*
showHeader=true
showRowRange=none
showPageRange=none
showDirectLinks=none
first=0
selectable=none
var=row
value=#{controller.list}
tc:column label=Column 1
  tc:out id=column1
value=#{row.column1}/
/tc:column
tc:column label=Column 2
  tc:out id=column2
value=#{row.column2}/
/tc:column
  /tc:sheet
/tc:tab
  /tc:tabGroup
/tc:page
  /f:view
 
  When you load the page and switch to Tab 2 the first time then the 
  header of
  the second column is missing and
  there's a horizontal scrollbar (but there's no need for a scrollbar). 
  When
  you switch to Tab 1 and back to Tab 2
  everything is ok.
 
  I'm using Tobago snapshot from the 23th of April.
 
  Regards
  Helmut
 




[Tobago] Layout problems with tc:sheet in a tc:tab with IE

2007-06-01 Thread H. Swaczinna
Hi,

I have three sheets on a tab of a tab group with switchType=reloadTab. 
With Firefox everything is fine
but with IE (6 and 7) there layout problems. In my app all three sheets 
disappear when I switch to this tab
the first time. The sheets are shown for a short time (ca. 0,1 s) and than 
disappear. I think they're first shown
with a wrong layout and than relayouted and removed. When I switch to 
another tab and back the sheets are
shown correctly. With switchType=reloadPage there's no problem.

Because my page layout is very compley I can't send you the source code. But 
I built a very small example
with a tab and a sheet which shoes some layout problems with IE also:

f:view
  tc:page id=resetPage width=400px height=200px
tc:tabGroup switchType=reloadTab
  tc:tab id=tab1 label=Tab1
tc:out value=Tab1/
  /tc:tab
  tc:tab id=tab2 label=Tab2
tc:sheet id=testTable
  columns=1*;1*
  showHeader=true
  showRowRange=none
  showPageRange=none
  showDirectLinks=none
  first=0
  selectable=none
  var=row
  value=#{controller.list}
  tc:column label=Column 1
tc:out id=column1
  value=#{row.column1}/
  /tc:column
  tc:column label=Column 2
tc:out id=column2
  value=#{row.column2}/
  /tc:column
/tc:sheet
  /tc:tab
/tc:tabGroup
  /tc:page
/f:view

When you load the page and switch to Tab 2 the first time then the header of 
the second column is missing and
there's a horizontal scrollbar (but there's no need for a scrollbar). When 
you switch to Tab 1 and back to Tab 2
everything is ok.

I'm using Tobago snapshot from the 23th of April.

Regards
Helmut


Re: [Tobago] How to make tobago pages printable

2007-05-31 Thread H. Swaczinna
Hi,

nobody had the need to print a Tobago page from the browser?

I tried to add my own css style files for printing but I found no way. The 
tc:style tag generates only style file
references for media=screen. If the tc:style tag has a media attribute the 
problem can be solved.

Regards
Helmut


- Original Message - 
From: H. Swaczinna [EMAIL PROTECTED]
To: users@myfaces.apache.org
Sent: Wednesday, May 23, 2007 3:26 PM
Subject: [Tobago] How to make tobago pages printable


 Hi,

 when I print a tobago page every style information is lost. This is 
 because
 in the stylesheet references the
 media attribute is set to screen. Is there somewhere a switch to set 
 this
 to print?

 Regards
 Helmut



[Tobago] How to make tobago pages printable

2007-05-23 Thread H. Swaczinna
Hi,

when I print a tobago page every style information is lost. This is because
in the stylesheet references the
media attribute is set to screen. Is there somewhere a switch to set this
to print?

Regards
Helmut


Re: [ Tobago ] Help Regarding custom message for Conversion Errors

2007-05-23 Thread H. Swaczinna






Hi Madan,

I put these messages in 
resource-dir/html/theme/standard/property/togabo.properties.xml. 

This works but I don't know if it's the right way 
to do this.

Regards
Helmut


  - Original Message - 
  From: 
  Madan 
  Narra 
  To: MyFaces Discussion 
  Sent: Wednesday, May 23, 2007 5:17 
  PM
  Subject: [ Tobago ] Help Regarding custom 
  message for Conversion Errors
  
  Hi All,
  
  I have a Sheet which has a column with tc:in/.
  
  It should accept only numerics and nothing other then that. I placed 
  tc:messages on top of the sheet to see if there are any errors.
  
  If at all i submit my page with alphabets entered in tc:in/ 
  , i get "Conversion Error" .
  
  But i need to display a custom message like "Only Numerics 
  Allowed".
  
  Tried to place
  
  javax.faces.component.UIInput.CONVERSION = 
  *javax.faces.component.UIInput.CONVERSION_detail = Only Numerics allowed 
  in Qty Field 
  in a resource bundle and specified as such in faces-config.xml
  
  "message-bundleCustomJSFErrorMessages/message-bundle"
  
  
  But this message is not being reflected when submitted with non numerics 
  characters...
  Is this the way to do or missed anything...
  Thnx in advance 
  -- Regards,Madan N 



Re: [Tobago] File-upload doesn't work anymore with myFaces 1.1.5

2007-05-10 Thread H. Swaczinna
Hi Arvid,

I'm using TobagoMultipartFormdataFilter but I tried the other way also with 
no success.
Hm, then I have to have a look at the address demo. But do you aggree with 
me that code
that worked with 1.1.4 should work with 1.1.5 also?

Regards
Helmut


- Original Message - 
From: Arvid Hülsebus [EMAIL PROTECTED]
To: MyFaces Discussion users@myfaces.apache.org
Sent: Thursday, May 10, 2007 12:21 PM
Subject: Re: [Tobago] File-upload doesn't work anymore with myFaces 1.1.5


 In the address demo the file upload works with MyFaces 1.1.5 and a popup. 
 Are you using the TobagoMultipartFormdataFilter servlet filter or the 
 tobago-fileupload.jar? The preferred way is adding tobago-fileupload.jar 
 to the classpath.

 Regards,
 Arvid

 Helmut Swaczinna wrote:
 Please help, this is a really serious problem. We must use 1.1.5 because 
 of the problem with the target attribute.
 One more info: the tc:file is on a popup.

 Regards
 Helmut

 - Original Message - From: H. Swaczinna 
 [EMAIL PROTECTED]
 To: users@myfaces.apache.org
 Sent: Tuesday, May 08, 2007 2:02 PM
 Subject: [Tobago] File-upload doesn't work anymore with myFaces 1.1.5


 Hi,

 with myFaces 1.1.4 my file-uplaod worked fine but with 1.1.5 I get the
 error message

 FileRenderer Can't process multipart/form-data without TobagoRequest.
 Please check the web.xml and define a TobagoMultipartFormdataFilter.
 See documentation for tc:file

 I use Tobago 1.0.11.

 Regards
 Helmut







[Tobago] Another problem with myFaces 1.1.5

2007-05-10 Thread H. Swaczinna
Hi,

I've discovered another problem after switching to myFaces 1.1.5. The value 
of an input field is not restored
when a button with immediate=true is clicked. The action method of the 
bean resets the value of the property
to a standard value and returns an outcome != null so the component tree 
should be rebuild. But the input field
still shows the entered value. Even when I switch to another page and back. 
This input field resides on tab of tabgroup.
With an input field which is not on a tab it works.

It works with myFaces 1.1.4 and it works in a simple example but not if 
things get a little more comlex. So I can't give you example code to 
reproduce this. Because it works with 1.1.4 my code can't be wrong.

I'm using Tobago 1.0.11 from 23.4.

Regards
Helmut


[Tobago] File-upload doesn't work anymore with myFaces 1.1.5

2007-05-08 Thread H. Swaczinna
Hi,

with myFaces 1.1.4 my file-uplaod worked fine but with 1.1.5 I get the 
error message

FileRenderer Can't process multipart/form-data without TobagoRequest. 
Please check the web.xml and define a TobagoMultipartFormdataFilter. 
See documentation for tc:file

I use Tobago 1.0.11.

Regards
Helmut


Re: Antwort: Re: Antwort: Re: file-upload

2007-05-08 Thread H. Swaczinna
Hi Martin,

did you solve this problem? I have the same problem you had also now. I
switched from myFaces 1.1.4 to1.1.5.
With 1.1.4 it works fine but with 1.1.5 I get the error message

FileRenderer Can't process multipart/form-data without TobagoRequest. Please
check the web.xml and define a TobagoMultipartFormdataFilter. See
documentation for tc:file

Regards
Helmut

- Original Message - 
From: [EMAIL PROTECTED]
To: MyFaces Discussion users@myfaces.apache.org
Sent: Friday, April 27, 2007 5:15 PM
Subject: Antwort: Re: Antwort: Re: file-upload


Hi Helmut and all others,

sorry for calling you Bernd,
I have now completely written  my simple example for file upload with
tc:file.
This one works.

Still, file upload does not work flawless in my large application.
Firstly, I get an ERROR message. Trying the upload for the second time, it
works!
Maybe it is nesting problem. I use tc:file inside some tc:panels etc.
I think I have googled this kind of problem before with tc:popup.


Gr. Martin

___
Ed. Züblin AG
Direktion Zentrale Technik ·  Technical Head Office
Tunnelbau (TUB) ·  Dept. of Tunnel Design
Dr.-Ing. Martin Kelm
Projektingenieur ·  Project Engineer
Albstadtweg 3 · 70567 Stuttgart · Germany
Fon +49 711 7883-9710 ·  Fax +49 711 7883-207
www.zueblin.de  ·  [EMAIL PROTECTED]
Aufsichtsratvorsitzender: Dr. Hans Peter Haselsteiner
Vorstand:
Dipl.-Ing. Eberhard Gläser, Dipl.-Ing. Klaus Pöllath, Dipl.-Kfm.
Hans-Joachim Rühlig
Dipl.-Ing. Burkhard Schmidt, Dipl.-Ing. Edgar Schömig, Dr. rer.pol.
Alexander Tesche
Sitz der Gesellschaft: Stuttgart, HRB 110, Ust-IdNr.: DE 147 843 723


Re: [Tobago] Problem with target attribue (Reminder)

2007-04-23 Thread H. Swaczinna
Hi Volker,

I tried to build a minimal application to reproduce this problem for 
you but the problem does not appear with it. So I have to find out 
what's wrong with my real life (complex) application.

Regards
Helmut


Hi Helmut,

i can't reproduce your problem.

anotherAction is invoked even on first click after clicking the newWindow 
link.

Can you create a war showing the problem and send it to me?

Regards,
Volker

2007/4/19, H. Swaczinna [EMAIL PROTECTED]:
 Hi Volker!

 i will try to test this this afternoon. (hope i found the time)

 Thanks!

 are you sure this work?
   public void anotherAction() {...}
 should be
   public String anotherAction() {...; return null;}

 Yes, that makes no difference. I always use void, when there's no
 navigation.

 Regards
 Helmut


 
 Regards,
 Volker
 
 2007/4/19, H. Swaczinna [EMAIL PROTECTED]:
  Hi,
 
  I want to display the result of an action (a new page) in a new
  browser window. So I set the target attribute of tc:link or
  tc:button to the window name. This works fine. But when I click another
  button or link in the page the action is not executed (the page is
  rendered again). I always have to click the button twice.
 
  I think this is a known problem with a known solution. In my code for
  the PDF download I included this two lines to avoid this problem:
 
  // Save serialized view or else after clicking on the export button,
  // user will have to click TWICE to invoke another action
  StateManager stateManager =
 (StateManager)facesContext.getApplication().getStateManager();
  stateManager.saveSerializedView(facesContext);
 
  (Taken from http://swforum.sun.com/jive/thread.jspa?threadID=63566)
 
  Maybe this code should be included in Tobago (or myFaces?) when the
  target attribute is set.
 
  Here's a simple test case for you:
 
  test1.jsp
 
  f:view
  tc:page id=testPage1 width=300px height=200px
  tc:out value=Page 1/
  tc:link label=new window
  target=newWindow
  action=#{controller.newWindowAction} /
  tc:button label=another action
  action=#{controller.anotherAction} /
  /tc:page
  /f:view
 
  test2.jsp
 
  f:view
  tc:page id=testPage2 width=300px height=200px
  tc:out value=Page 2/
  /tc:page
  /f:view
 
  faces-config.xml
 
  navigation-rule
  from-view-id/test1.jsp/from-view-id
  navigation-case
  from-outcomenewWindow/from-outcome
  to-view-id/test2.jsp/to-view-id
  /navigation-case
  /navigation-rule
 
  Controller.java
 
  public String newWindowAction() {
  LOG.debug(newWindowAction);
  return newWindow;
  }
 
  public void anotherAction() {
  LOG.debug(anotherAction);
  }
 
  When you click the new window link in test1.jsp a new window is
  opened with test2.jsp. But when you click the link again test1.jsp
  is displayed in the new window. When you click the another action
  button after clicking the new window link the anotherAction()
  is not called. You have to click the button once again.
 
  I'm using myFaces 1.1.5 and Tobago 1.0.11 from yesterday.
  I think you should be able to reproduce this behavior.
 
  Regards
  Helmut
 



[Tobago] Problem with target attribue (Reminder)

2007-04-19 Thread H. Swaczinna
Hi,

I want to display the result of an action (a new page) in a new
browser window. So I set the target attribute of tc:link or
tc:button to the window name. This works fine. But when I click another
button or link in the page the action is not executed (the page is
rendered again). I always have to click the button twice.

I think this is a known problem with a known solution. In my code for
the PDF download I included this two lines to avoid this problem:

// Save serialized view or else after clicking on the export button,
// user will have to click TWICE to invoke another action
StateManager stateManager = 
(StateManager)facesContext.getApplication().getStateManager();
stateManager.saveSerializedView(facesContext);

(Taken from http://swforum.sun.com/jive/thread.jspa?threadID=63566)

Maybe this code should be included in Tobago (or myFaces?) when the
target attribute is set. 

Here's a simple test case for you:

test1.jsp

f:view
tc:page id=testPage1 width=300px height=200px
tc:out value=Page 1/
tc:link label=new window
target=newWindow
action=#{controller.newWindowAction} /
tc:button label=another action
action=#{controller.anotherAction} /
/tc:page
/f:view

test2.jsp

f:view
tc:page id=testPage2 width=300px height=200px
tc:out value=Page 2/
/tc:page
/f:view

faces-config.xml

navigation-rule
from-view-id/test1.jsp/from-view-id
navigation-case
from-outcomenewWindow/from-outcome
to-view-id/test2.jsp/to-view-id
/navigation-case
/navigation-rule

Controller.java

public String newWindowAction() {
LOG.debug(newWindowAction);
return newWindow;
}

public void anotherAction() {
LOG.debug(anotherAction);
}

When you click the new window link in test1.jsp a new window is
opened with test2.jsp. But when you click the link again test1.jsp
is displayed in the new window. When you click the another action
button after clicking the new window link the anotherAction()
is not called. You have to click the button once again.

I'm using myFaces 1.1.5 and Tobago 1.0.11 from yesterday.
I think you should be able to reproduce this behavior.

Regards
Helmut


Re: [Tobago] Problem with target attribue (Reminder)

2007-04-19 Thread H. Swaczinna
Hi Volker!

i will try to test this this afternoon. (hope i found the time)

Thanks!

are you sure this work?
  public void anotherAction() {...}
should be
  public String anotherAction() {...; return null;}

Yes, that makes no difference. I always use void, when there's no
navigation.

Regards
Helmut



Regards,
Volker

2007/4/19, H. Swaczinna [EMAIL PROTECTED]:
 Hi,

 I want to display the result of an action (a new page) in a new
 browser window. So I set the target attribute of tc:link or
 tc:button to the window name. This works fine. But when I click another
 button or link in the page the action is not executed (the page is
 rendered again). I always have to click the button twice.

 I think this is a known problem with a known solution. In my code for
 the PDF download I included this two lines to avoid this problem:

 // Save serialized view or else after clicking on the export button,
 // user will have to click TWICE to invoke another action
 StateManager stateManager = 
(StateManager)facesContext.getApplication().getStateManager();
 stateManager.saveSerializedView(facesContext);

 (Taken from http://swforum.sun.com/jive/thread.jspa?threadID=63566)

 Maybe this code should be included in Tobago (or myFaces?) when the
 target attribute is set.

 Here's a simple test case for you:

 test1.jsp

 f:view
 tc:page id=testPage1 width=300px height=200px
 tc:out value=Page 1/
 tc:link label=new window
 target=newWindow
 action=#{controller.newWindowAction} /
 tc:button label=another action
 action=#{controller.anotherAction} /
 /tc:page
 /f:view

 test2.jsp

 f:view
 tc:page id=testPage2 width=300px height=200px
 tc:out value=Page 2/
 /tc:page
 /f:view

 faces-config.xml

 navigation-rule
 from-view-id/test1.jsp/from-view-id
 navigation-case
 from-outcomenewWindow/from-outcome
 to-view-id/test2.jsp/to-view-id
 /navigation-case
 /navigation-rule

 Controller.java

 public String newWindowAction() {
 LOG.debug(newWindowAction);
 return newWindow;
 }

 public void anotherAction() {
 LOG.debug(anotherAction);
 }

 When you click the new window link in test1.jsp a new window is
 opened with test2.jsp. But when you click the link again test1.jsp
 is displayed in the new window. When you click the another action
 button after clicking the new window link the anotherAction()
 is not called. You have to click the button once again.

 I'm using myFaces 1.1.5 and Tobago 1.0.11 from yesterday.
 I think you should be able to reproduce this behavior.

 Regards
 Helmut



Re: [Tobago] Problem with target attribue

2007-04-13 Thread H. Swaczinna
Hello Bernd,

how about this problem? This a really serious problem. We can't live
with this behaviour. Please have a look at it.

Regards
Helmut


Hello Bernd,

I'm using myFaces 1.1.5 and Tobago 1.0.11 from yesterday.

I build a simple test case for you. The problem is only with tc:link
I found out. tc:button seems to be ok.

test1.jsp

f:view
  tc:page id=testPage1 width=300px height=200px
tc:out value=Page 1/
tc:link label=new window 
  target=newWindow
  action=#{controller.newWindowAction} /  
tc:button label=another action 
  action=#{controller.anotherAction} /  
  /tc:page
/f:view

test2.jsp

f:view
  tc:page id=testPage2 width=300px height=200px
tc:out value=Page 2/
  /tc:page
/f:view

faces-config.xml

   navigation-rule
from-view-id/test1.jsp/from-view-id
navigation-case
  from-outcomenewWindow/from-outcome
  to-view-id/test2.jsp/to-view-id
/navigation-case
  /navigation-rule

Controller.java

  public String newWindowAction() {
LOG.debug(newWindowAction);
return newWindow;
  }

  public void anotherAction() {
LOG.debug(anotherAction);
  }

When you click the new window link in test1.jsp a new window is 
opened with test2.jsp. But when you click the link again test1.jsp 
is displayed in the new window. When you click the another action
button after clicking the new window link the anotherAction()
is not called. You have to click the button once again.

I think you should be able to reproduce this behavior.

Regards
Helmut


Hello Helmut,

I don't get this behavior in the tobago-example-demo.

Which version of the jsf impl are you using?

Regards

Bernd



H. Swaczinna wrote:
 Hi,
 
 I want to display the result of an action (a new page) in a new 
 browser window. So I set the target attribute of tc:link or
 tc:button to the window name. This works fine. But when I click another 
 button or link in the page the action is not executed (the page is 
 rendered again). I always have to click the button twice.
 
 I think this is a known problem with a known solution. In my code for 
 the PDF download I included this two lines to avoid this problem:
 
 // Save serialized view or else after clicking on the export button,
 // user will have to click TWICE to invoke another action
 StateManager stateManager = 
(StateManager)facesContext.getApplication().getStateManager();
 stateManager.saveSerializedView(facesContext); 
 
 (Taken from http://swforum.sun.com/jive/thread.jspa?threadID=63566)
 
 Maybe this code should be included in Tobago (or myFaces?) when the
 target attribute is set.
 
 Regards
 Helmut



Re: [Tobago] Problem with target attribue

2007-04-11 Thread H. Swaczinna
Hello Bernd,

I'm using myFaces 1.1.5 and Tobago 1.0.11 from yesterday.

I build a simple test case for you. The problem is only with tc:link
I found out. tc:button seems to be ok.

test1.jsp

f:view
  tc:page id=testPage1 width=300px height=200px
tc:out value=Page 1/
tc:link label=new window 
  target=newWindow
  action=#{controller.newWindowAction} /  
tc:button label=another action 
  action=#{controller.anotherAction} /  
  /tc:page
/f:view

test2.jsp

f:view
  tc:page id=testPage2 width=300px height=200px
tc:out value=Page 2/
  /tc:page
/f:view

faces-config.xml

   navigation-rule
from-view-id/test1.jsp/from-view-id
navigation-case
  from-outcomenewWindow/from-outcome
  to-view-id/test2.jsp/to-view-id
/navigation-case
  /navigation-rule

Controller.java

  public String newWindowAction() {
LOG.debug(newWindowAction);
return newWindow;
  }

  public void anotherAction() {
LOG.debug(anotherAction);
  }

When you click the new window link in test1.jsp a new window is 
opened with test2.jsp. But when you click the link again test1.jsp 
is displayed in the new window. When you click the another action
button after clicking the new window link the anotherAction()
is not called. You have to click the button once again.

I think you should be able to reproduce this behavior.

Regards
Helmut


Hello Helmut,

I don't get this behavior in the tobago-example-demo.

Which version of the jsf impl are you using?

Regards

Bernd



H. Swaczinna wrote:
 Hi,
 
 I want to display the result of an action (a new page) in a new 
 browser window. So I set the target attribute of tc:link or
 tc:button to the window name. This works fine. But when I click another 
 button or link in the page the action is not executed (the page is 
 rendered again). I always have to click the button twice.
 
 I think this is a known problem with a known solution. In my code for 
 the PDF download I included this two lines to avoid this problem:
 
 // Save serialized view or else after clicking on the export button,
 // user will have to click TWICE to invoke another action
 StateManager stateManager = 
(StateManager)facesContext.getApplication().getStateManager();
 stateManager.saveSerializedView(facesContext); 
 
 (Taken from http://swforum.sun.com/jive/thread.jspa?threadID=63566)
 
 Maybe this code should be included in Tobago (or myFaces?) when the
 target attribute is set.
 
 Regards
 Helmut



Re: [Tobago] Why is tc:tree marked as deprecated?

2007-04-11 Thread H. Swaczinna
Hello Bernd,

is the new tree interface in the sandbox completely different from
the current interface? Or would it be easy to convert the app to the
new tree? When will the 1.1.0 version be released?

Regards
Helmut


Hello Helmut,

we are not happy with the current interface of the tc:tree. The tree 
would be replaced with the tree from the sandbox in the 1.1.0 version.

Regards

Bernd

H. Swaczinna wrote:
 Hi,
 
 in the 1.0.11 taglib doc the tc:tree component is marked as deprecated.
 Which tree component should I use instead?
 
 Regards
 Helmut



Re: [Tobago] Problem with target attribue

2007-04-11 Thread H. Swaczinna
The problem exists also with tc:button. Don't know what I saw...

Helmut


Hello Bernd,

I'm using myFaces 1.1.5 and Tobago 1.0.11 from yesterday.

I build a simple test case for you. The problem is only with tc:link
I found out. tc:button seems to be ok.

test1.jsp

f:view
  tc:page id=testPage1 width=300px height=200px
tc:out value=Page 1/
tc:link label=new window 
  target=newWindow
  action=#{controller.newWindowAction} /  
tc:button label=another action 
  action=#{controller.anotherAction} /  
  /tc:page
/f:view

test2.jsp

f:view
  tc:page id=testPage2 width=300px height=200px
tc:out value=Page 2/
  /tc:page
/f:view

faces-config.xml

   navigation-rule
from-view-id/test1.jsp/from-view-id
navigation-case
  from-outcomenewWindow/from-outcome
  to-view-id/test2.jsp/to-view-id
/navigation-case
  /navigation-rule

Controller.java

  public String newWindowAction() {
LOG.debug(newWindowAction);
return newWindow;
  }

  public void anotherAction() {
LOG.debug(anotherAction);
  }

When you click the new window link in test1.jsp a new window is 
opened with test2.jsp. But when you click the link again test1.jsp 
is displayed in the new window. When you click the another action
button after clicking the new window link the anotherAction()
is not called. You have to click the button once again.

I think you should be able to reproduce this behavior.

Regards
Helmut


Hello Helmut,

I don't get this behavior in the tobago-example-demo.

Which version of the jsf impl are you using?

Regards

Bernd



H. Swaczinna wrote:
 Hi,
 
 I want to display the result of an action (a new page) in a new 
 browser window. So I set the target attribute of tc:link or
 tc:button to the window name. This works fine. But when I click another 
 button or link in the page the action is not executed (the page is 
 rendered again). I always have to click the button twice.
 
 I think this is a known problem with a known solution. In my code for 
 the PDF download I included this two lines to avoid this problem:
 
 // Save serialized view or else after clicking on the export button,
 // user will have to click TWICE to invoke another action
 StateManager stateManager = 
(StateManager)facesContext.getApplication().getStateManager();
 stateManager.saveSerializedView(facesContext); 
 
 (Taken from http://swforum.sun.com/jive/thread.jspa?threadID=63566)
 
 Maybe this code should be included in Tobago (or myFaces?) when the
 target attribute is set.
 
 Regards
 Helmut



[Tobago] Why is tc:tree marked as deprecated?

2007-04-10 Thread H. Swaczinna
Hi,

in the 1.0.11 taglib doc the tc:tree component is marked as deprecated.
Which tree component should I use instead?

Regards
Helmut


[Tobago] ClassCastException with tree in a popup

2007-04-10 Thread H. Swaczinna
Hi,

I want to display a tc:tree in a tc:popup. The tree is displayed,
but when I click on the text of a node I get a ClassCastException.
There's no problem, when the tree is on a normal page.

The stacktrace:

java.lang.ClassCastException: org.apache.myfaces.tobago.component.UITreeOldNode
at 
org.apache.myfaces.tobago.component.UIPopup.isRedisplay(UIPopup.java:89)
at 
org.apache.myfaces.tobago.component.UIPopup.isRendered(UIPopup.java:75)
at 
org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:66)
at 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEnd(PageRenderer.java:13
8)
at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
at 
org.apache.myfaces.tobago.taglib.component.TobagoTag.doEndTag(TobagoTag.java:181)
at 
org.apache.myfaces.tobago.taglib.component.TobagoBodyTag.doEndTag(TobagoBodyTag.java:56)
at 
org.apache.myfaces.tobago.taglib.component.PageTag.doEndTag(PageTag.java:57)
...

The JSP code:

tc:link id=historieLink 
  disabled=false
  label=#{workflowBundle.link_label_historie}
  tip=#{workflowBundle.link_tip_historie}
  f:facet name=popup
tc:popup id=historiePopup width=900 height=500
  tc:box id=historieBox 
label=#{workflowBundle.link_label_historie}
f:facet name=layout
  tc:gridLayout rows=*;fixed columns=*;*;*/
/f:facet
tc:cell spanX=3
  tc:tree id=historieTree
value=#{workflowController.tree} 
state=#{workflowController.treeState}   
idReference=userObject.id
nameReference=userObject.name
showIcons=true
showJunctions=true
showRootJunction=true
showRoot=true
selectable=none
mutable=false
tipReference=userObject.name
  /tc:tree
/tc:cell
tc:cell/
tc:button id=closeButton 
  label=#{mainBundle.button_label_close}
  tc:attribute name=popupClose value=immediate/
/tc:button
tc:cell/
  /tc:box
/tc:popup
  /f:facet
/tc:link


Regards
Helmut


Re: [Tobago] Problem with ActionListener for tc:tree/

2007-04-10 Thread H. Swaczinna
Hi,can you tell me how do you find out which node was clicked in the action or actionListener?ThanksHelmutHi Madan,Thanks for your repsonse.It's working now :-).regardsCyrillOn 3/30/07, madan chowdary 
[EMAIL PROTECTED] wrote:
Hi Cyrill,place the following code(with respect to urs) in between tc:tree and /tc:treef:facet name="treeNodeCommand"
 tc:command actionListener="#{inventorySearch.browseCategories}"  action="" //f:facetRegards,
Madan- Original Message From: Cyrill Zadra 
[EMAIL PROTECTED]To: MyFaces Discussion users@myfaces.apache.orgSent: Friday, 30 March, 2007 5:30:08 PM
Subject: Re: [Tobago] Problem with ActionListener for
 tc:tree/Hi all,I'm just confronted with the same problem at the moment. Has anybody a solution?my jsf tobago code:  tc:tree value="#{demo.tree}" id="tree" idReference="
userObject.id"   nameReference="userObject.name" showIcons="true" showJunctions="true"   showRootJunction="true" showRoot="true" selectable="none"
   mutable="false" tipReference="userObject.name"   f:actionListener type="ch.filebrowser.actionlistener.TreeEditor" /  /tc:tree

thx  reagrdsCyrillOn 2/2/07, madan chowdary 
[EMAIL PROTECTED] wrote:
Hi all,I have a issue regarding the Tree's 
ActionListener.When i click on one of my nodes in the tree, i need to fire an event.I used the following code as below to display my 
tree.Was able to get the tree and see the underlying nodes in that.But when i click on the nodes, the ActionListener
 is not invoked.tc:box label="#{bundle.categoriesBoxTitle}" f:facet name="layout"tc:gridLayout/  
  /f:facettc:tree value="#{category.categoryTree}"   state="#{category.categoryTreeState
}"   id="categoryTree" idReference="userObject.id"   
  nameReference="userObject.name" showIcons="#{category.showIcons}" showJunctions="#{category.showJunctions

}" showRootJunction="#{category.showRootJunction}"
 showRoot="#{category.showRoot}" selectable="#{category.treeSelectMode}" mutable="#{category.mutable}" 
actionListener="#{inventorySearch.browseCategories}"f:actionListener

 type="com.resmed.store.frontend.controller.CategoryListener"//tc:tree/tc:boxRegards,
Madan
	

	
		 
Here's a new way to find what you're looking for - 
Yahoo! Answers
 

	

	
		 
Here's a new way to find what you're looking for - Yahoo! Answers
 



[Tobago] How to display a popup in tree?

2007-04-10 Thread H. Swaczinna
Hi,

I want to display some detail data when the user clicks on a tree node.
I added a tc:command tag with a popup but it does not work.

tc:tree id=historieTree
  value=#{workflowController.tree} 
  state=#{workflowController.treeState}   
  idReference=userObject.id
  nameReference=userObject.name
  showIcons=true
  showJunctions=true
  showRootJunction=true
  showRoot=true
  selectable=none
  mutable=false
  tipReference=userObject.name
  f:facet name=treeNodeCommand
tc:command action=#{workflowController.treeAction}
  tc:attribute name=renderedPartially value=detailPopup/
  f:facet name=popup
tc:popup id=detailPopup width=200 height=100
...
/tc:popup
  /f:facet
/tc:command
  /f:facet
/tc:tree

I also tried to display a javascript alert box with the onclick
attribute of tc:command. But the onclick attribute of tc:command
does not work.

Regards
Helmut


[Tobago] renderedPartially doesn't work in treeNodeCommand

2007-04-10 Thread H. Swaczinna
Hi,

I tried another approach to display detail data for a tree node.
The detail data is displayed in a panel on the page and when the
user clicks a node the panel should be reloaded via ajax. But the
whole page is reloaded always when the user clicks a node.

  tc:tree id=historieTree
value=#{workflowController.tree} 
state=#{workflowController.treeState}   
idReference=userObject.id
nameReference=userObject.name
showIcons=true
showJunctions=true
showRootJunction=true
showRoot=true
selectable=none
mutable=false
tipReference=userObject.name
f:facet name=treeNodeCommand
  tc:command action=#{workflowController.treeAction}
tc:attribute name=renderedPartially 
value=:testPage:detailPanel/
  /tc:command
/f:facet
  /tc:tree

Regards
Helmut


[Tobago] Problem with target attribue

2007-04-10 Thread H. Swaczinna
Hi,

I want to display the result of an action (a new page) in a new 
browser window. So I set the target attribute of tc:link or
tc:button to the window name. This works fine. But when I click another 
button or link in the page the action is not executed (the page is 
rendered again). I always have to click the button twice.

I think this is a known problem with a known solution. In my code for 
the PDF download I included this two lines to avoid this problem:

// Save serialized view or else after clicking on the export button,
// user will have to click TWICE to invoke another action
StateManager stateManager = 
(StateManager)facesContext.getApplication().getStateManager();
stateManager.saveSerializedView(facesContext); 

(Taken from http://swforum.sun.com/jive/thread.jspa?threadID=63566)

Maybe this code should be included in Tobago (or myFaces?) when the
target attribute is set.

Regards
Helmut


[Tobago] transition=false don't work anymore in 1.0.11

2007-04-04 Thread H. Swaczinna
Hi,

stetting transition=false has no effect in snapshot 1.0.11 (02.04.07).
You can see this in the demo.

Regards
Helmut


Re: [Tobago] jsp:forward in Tobago pages

2007-04-03 Thread H. Swaczinna
Hi Madan,I had the same error after upgrading. Make sure there're no Tobago 1.0.10 jar in yourclasspath and war file and try a cleanbuild."outcome != null" simply means return a not null string value from your action method.public String action() { return "foo";}RegardsHelmutHi Volker,Was getting this error when replaced Tobago 1.0.10 with Tobago 1.0.11 Snapshotjava.lang.NoSuchMethodError: org.apache.myfaces.tobago.ajax.api.AjaxUtils.getAjaxComponents(Ljavax/faces/context/FacesContext;)Ljava/util/List; at org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:45)MyFaces api and impl are 1.1.5 v.And can u plz tell how can i use " outcome != null in the action to invoke standard jsf navigation, also on ajax requests" .Thnx Regards,Madan- Original Message From: madan chowdary
 [EMAIL PROTECTED]To: MyFaces Discussion users@myfaces.apache.orgSent: Tuesday, 3 April, 2007 1:07:00 PMSubject: Re: [Tobago] jsp:forward in Tobago pagesHi Volker,Can u send me the code syntax where to place this ' outcome != null 'Madan- Original Message From: Volker Weber [EMAIL PROTECTED]To: MyFaces Discussion users@myfaces.apache.orgSent: Tuesday, 3 April, 2007 12:47:57 PMSubject: Re: [Tobago] jsp:forward in Tobago pagesHi,in 1.0.11-snapshot you can just do a outcome != null in the action toinvoke standardjsf navigation, also on ajax requests.Regards,Volker2007/4/3,
 madan chowdary [EMAIL PROTECTED]: Hi Volker, I am doing this request via
 Ajax. I tried to forward to the particular page based on the condition from the controller, but that doesn't work as this is via Ajax. I am refreshing a sheet which has some products in it and a checkbox to delete. I select the checkbox and submit a button which does a refresh on the panel. If i have only one product and checks for that to delete and submit the button, then it deletes it and then displays an empty sheet. This sheet is placed in a jsp which includes many other fields in that. So i cant show a message that u don't have any items at the bottom of the page making all the fields in active state. so i need to forward to another page for displaying this message. Thats the reason i am in need of a forward. Cant this be done or have any other means to do this..
 Regards, Madan - Original Message  From: Volker Weber [EMAIL PROTECTED] To: MyFaces Discussion users@myfaces.apache.org Sent: Monday, 2 April, 2007 12:46:52 PM Subject: Re: [Tobago] jsp:forward in Tobago pages Hi Madan, you can't, but you can switch the output in your action method based on the condition. Regards, Volker 2007/4/2, madan chowdary [EMAIL PROTECTED]:   Hi David,   thnx for the hint, but will this satisfy my question..   this is my navigation case in faces-config.xml   navigation-case  from-outcomegoto_checkout/from-outcome 
 to-view-id/jsp/checkout.jsp/to-view-id  /navigation-case   so how could i use this to forward to "goto_checkout"based upon a  condition as such.  tc:panel rendered="#{!shoppingCart.cartContainsItems}"  f:verbatim  jsp:forward  page="%=request.getContextPath()%/jsp/checkout.faces"/  /f:verbatim  /tc:panel   Madan   - Original Message   From: David Steinkopff [EMAIL PROTECTED]  To: MyFaces Discussion users@myfaces.apache.org  Sent: Monday, 2 April, 2007 12:11:55 PM  Subject: Re: [Tobago] jsp:forward in Tobago
 pages   Hi Madan,  my hint for you  faces-config.xml - navigation rules  Regards  David   2007/3/31, madan chowdary [EMAIL PROTECTED] : Hi All, Is there any way to do such kind of thing...? Madan - Original Message    From: madan chowdary [EMAIL PROTECTED]   To: MyFaces Discussion  users@myfaces.apache.org   Sent: Friday, 30 March, 2007 2:57:27 PM   Subject: [Tobago] jsp:forward in Tobago pages Hi All, I need to forward to a page based upon a
 condition that i need to check. I was doing some thing like this, tc:panel rendered="#{!shoppingCart.cartContainsItems}"   f:verbatim   jsp:forward  page="%=request.getContextPath()%/jsp/checkout.faces"/   /f:verbatim   /tc:panel But this doesn't work as am using scriplets. But i need to a forward to the URL as specified above. How can i achieve this ? Regards,   Madan  Here's a new way to find what you're looking for - Yahoo!
 Answers    Here's a new way to find what you're looking for - Yahoo! Answers Here's a new way to find what you're looking for - Yahoo! AnswersHere's a new way to find what you're looking for - Yahoo! Answers
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


RE: [ Tobago ] maxLength in tc:in/ and tx:in/

2007-03-22 Thread H. Swaczinna
Hi Madan,f:validateLength maximum="4"/ generates a HTML maxlength="4", so the inputlength is restricted to 4 chars.RegardsHelmutHi All,I have a constraint for inputfield to take only 4 numerics thai is to be entered by the user.To do this i need the maxLength attribute thats present in Html tags but not in the Tobago tc:in/ or tx:in/ tags.I dont want to use f:validateLength/ tag , as if at all this validation fails there would be a a page refresh and have to show an error message.So instead of that i can block the user to enter only 4 numerics.As per the docs this Attribute "maxLength" cannot be included in tc:in/ and tx:in/ .How can i achieve this task ?Madan
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


[Tobago] No progress bar in login page

2007-03-22 Thread H. Swaczinna
Hi,

normally I see a progress bar and the page grayed out when I switch
between pages or execute long running actions. But not in my login page
when the user logs in. Maybe the page transition mechanism doesn't
work, when the page is called from outside JSF, like the login page?
Here's my code:

tc:loadBundle basename=login var=bundle/
f:view
  tc:page id=loginPage 
width=1020px height=600px 
label=#{bundle.page_label}
f:facet name=layout
  tc:gridLayout border=0 cellspacing=0 
marginTop=100px marginLeft=375px 
rows=fixed columns=260px/
/f:facet
tc:box label=#{bundle.box_label}
  f:facet name=layout
tc:gridLayout 
  rows=fixed;fixed;fixed;fixed;*
  columns=1*;1*/
  /f:facet
  tc:cell spanX=2
tc:messages/
  /tc:cell
  tc:out value=#{bundle.out_value_username}/
  tc:in id=username 
required=true 
value=#{loginController.userData.username}/
  tc:out value=#{bundle.out_value_password}/
  tc:in id=password 
required=true 
password= true 
value=#{loginController.userData.password}/
  tc:cell/
  tc:button id=loginButton 
defaultCommand=true 
transition=true
label=#{bundle.button_label} 
action=#{loginController.login}/
  tc:cell spanX=2/
/tc:box
  /tc:page
/f:view

Regards
Helmut


Re: NullPointerException in org.apache.myfaces.lifecycle.PhaseListenerManager during RESTORE_STATE

2007-03-22 Thread H. Swaczinna
Hi,

have you seen the OutOfMemoryError at the end of the stacktrace?

Regards
Helmut



Hi.,

  I have the same problem. 

Did you find any solution for this?

Envirnoment:  Seam 1.1.6, ajax4jsf1.1.0rc1, MyFaces 1.1.4, Tomahawk 1.1.3 


Thanks.


Madhav Bhargava-2 wrote:
 
 
 Hi All,
 
 
 
 
 Till now the application was working fine. Since 3 hrs I have been
 getting the following exception when navigating to different pages. The
 exception is thrown at any arbitrary JSF page so I am unable to trace
 anything.
 
 I googled this exception and found that there was a patch released in
 the nightly build sometime back.  I took the latest nightly build out
 but I am still getting the same exception.
 
 
 
 
 Stack Trace:
 
 
 
 
 929975 ERROR [http-0.0.0.0-8080-2]
 org.apache.myfaces.lifecycle.PhaseListenerManager   - Exception in
 PhaseListener RESTORE_VIEW(1) afterPhase
 
  java.lang.NullPointerException
 
 at
 org.apache.shale.remoting.faces.RemotingPhaseListener.afterPhase(Remotin
 gPhaseListener.java:87)
 
 at
 org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAf
 ter(PhaseListenerManager.java:92)
 
 at
 org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.ja
 va:99)
 
 at
 org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70
 )
 
 at
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:252)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:173)
 
 at
 org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
 ter.java:100)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:202)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:173)
 
 at
 org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
 ter.java:190)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:202)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:173)
 
 at
 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
 r.java:81)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:202)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
 erChain.java:173)
 
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
 e.java:213)
 
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
 e.java:178)
 
 at
 org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipa
 lValve.java:39)
 
 at
 org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
 sociationValve.java:159)
 
 at
 org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
 ava:59)
 
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
 :126)
 
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
 :105)
 
 at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
 java:107)
 
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:1
 48)
 
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:85
 6)
 
 at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
 onnection(Http11Protocol.java:744)
 
 at
 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint
 .java:527)
 
 at
 org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorker
 Thread.java:112)
 
 at java.lang.Thread.run(Thread.java:595)
 
 929975 ERROR [http-0.0.0.0-8080-2]
 org.apache.myfaces.lifecycle.PhaseListenerManager   - Exception in
 PhaseListener RESTORE_VIEW(1) afterPhase
 
  java.lang.NullPointerException
 
 at
 com.sun.j2ee.blueprints.ui.util.ResourcePhaseListener.afterPhase(Resourc
 ePhaseListener.java:127)
 
 at
 org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAf
 ter(PhaseListenerManager.java:92)
 
 at
 org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.ja
 va:99)
 
 at
 org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70
 )
 
 at
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
 
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
 tionFilterChain.java:252)
 
 at
 

Re: [TObago] need for attribute matrix

2007-03-16 Thread H. Swaczinna
Hello,

yes, I agree with Yazid, a list of all facets and attributes with
the tags they belong to would be very helpful. I found some useful 
facets only by chance in the mailing list because they're nowhere documented.

Regards
Helmut



Thanks Volker,
But what I need is the list of attribute name rendredPartially,.. and
associated value in tobago.


Bernd Bohmann wrote:
 
 Hello,
 
 you can find the tlddoc here:
 
 http://myfaces.apache.org/tobago/tobago-core/tlddoc-1.0.10/index.html
 
 Regards
 
 Bernd
 
 yazid wrote:
 Hi all;
 Can anyone tell how to find the  Tobago 1.0.10 attribute matrix
 Thanks
 
 

-- 
View this message in context: 
http://www.nabble.com/-TObago--need-for-attribute-matrix-tf3410879.html#a951332
4
Sent from the MyFaces - Users mailing list archive at Nabble.com.



[Tobago] Doubleclick and rightclick?

2007-03-16 Thread H. Swaczinna
Hello,

that's only a question. Is there any chance to react on mouse
doubleclicks or rightclicks with Tobago, for example to popup a
popup or a menu? My boss asked me...

Regards
Helmut


How to load an application scoped bean on application startup

2007-03-16 Thread H. Swaczinna
Hello,

I want to load an application scoped bean immidiately when the
applcation is loaded (deployed), not when it is first accessed.
In general, I can create the bean in a ServletContextListener:

  public void contextInitialized(ServletContextEvent event) {
LOG.debug(*** contextInitialized ***);
ServletContext servletContext = event.getServletContext();
MasterDataSupplier masterDataSupplier = new MasterDataSupplier();
servletContext.setAttribute(masterDataSupplier, masterDataSupplier);
  }

But my question is, how do I resolve the managed properties of the
bean? I can use a context-param for a simple string property but
there're complex properties to handle (DAOs managed by Spring).
I think, I have to get the (Sring)VariableResolver somehow and do
the resolving myself. Has anybody done this before?

Regards
Helmut


RE: [Tobago] Ajax request timeout

2007-03-15 Thread H. Swaczinna
Hello,

I have to ask again, is there a way to set the timeout for ajax
requests? There're several problems when an ajax request timesout,
for example a popup doesn't popup.

Regards
Helmut



Hello,

the timeout for ajax request seems to be very small. If an ajax requests 
blocks for some seconds I get the error message 

2007-03-12 15:16:56 ERROR - 
org.apache.myfaces.tobago.ajax.api.AjaxPhaseListener - Ignoring AjaxRequest 
without valid component tree!

and ajax doesn't work anymore.

How can I increase the ajax timeout?

Regards
Helmut


Re: [Tobago] Ajax request timeout

2007-03-15 Thread H. Swaczinna
Hi Volker,

thank you for the info, I'll try this. 

Maybe the problem in my first mail was a followup problem of
an ajax timeout.

Regards
Helmut

Hi Helmut,

i think the problem in your first mail is not the ajax timeout.

but to set this timout you can redefine the value of
Tobago.Updater.UPDATE_TIMEOUT.

e.g.

tc:script
  Tobago.Updater.UPDATE_TIMEOUT = 5000;
/tc:script

5000 = 5 sec, is the default.

Regards,
  Volker

2007/3/15, H. Swaczinna [EMAIL PROTECTED]:
 Hello,

 I have to ask again, is there a way to set the timeout for ajax
 requests? There're several problems when an ajax request timesout,
 for example a popup doesn't popup.

 Regards
 Helmut



 Hello,
 
 the timeout for ajax request seems to be very small. If an ajax requests
 blocks for some seconds I get the error message
 
 2007-03-12 15:16:56 ERROR -
 org.apache.myfaces.tobago.ajax.api.AjaxPhaseListener - Ignoring 
AjaxRequest
 without valid component tree!
 
 and ajax doesn't work anymore.
 
 How can I increase the ajax timeout?
 
 Regards
 Helmut



Re: [Tobago] Popups background not disabled

2007-03-15 Thread H. Swaczinna
Hello Volker, hello Arvid, hello Bernd,

this seems to be a very difficult problem for you to solve.
I discussed this with my project manager. If there's no
simple solution you can leave it as it is. Our customer will
switch to IE 7 before the end of the year. We (he) can live with
this until then.

But the problem with the not disabled keyboard keys should be 
fixed please. Should I add a jira issue for this?

Regards
Helmut


An iframe with transparent background?
I thought this is impossible. I had needed this on other places an
tryed without success.
I thought i had asked you before, obviously not.

btw: can you take a look at TOBAGO-213? I tryed without succes to hide
the selects with an iframe underlying the header.


Regards,
  Volker

2007/3/15, Arvid Hülsebus [EMAIL PROTECTED]:
 I have built a solution with IFRAMEs which works in IE6 a long time ago.
 I will try to make a minimal example.

 Regards,
 Arvid

 Volker Weber wrote:
  Hi,
 
  The second problem (listboxes are not diabled in IE  7) could afaik
  only solved by the iframe trick. An this is imho not an option,
  because this did not grey out the background but hide it completly.
 
  Regards,
   Volker
 
  2007/3/15, Bernd Bohmann [EMAIL PROTECTED]:
  Hello Helmut,
 
  can you add an jira issue for this, please.
 
  Regards
 
  Bernd
 
  H. Swaczinna wrote:
   No, sorry, we can't switch to IE 7. I would be happier if we could...
  
   Regards
   Helmut
  
  
   BTW, the same is true for the progress effect used for page
  transitioning.
  
   Is switching to IE 7 an option?
  
   Regards,
   Arvid
  
   Arvid Hülsebus wrote:
   In a different project I installed something like a keyboard event
   sink to avoid this. I will try to work this out together with Udo.
  
   The select control problem doesn't exist in IE 7. For IE 6 we didn't
   include an IFRAME hack up to now to hide the select controls.
  This was
   a known issue, which we somehow forgot to fix.
  
   Best regards,
   Arvid
  
   H. Swaczinna wrote:
   Hi,
  
   when the page shows a popup the background page is grayed and
   you can't activate any component by mouse. But you can activate
   any component by keyboard when you use the tab key. You can execute
   actions and modifiy fields. This is the serious problem because our
   customers users used to work more by keyboard than by mouse.
   With the IE there's another problem. Listboxes aren't disabled
  at all.
   You can pick entries by mouse.
  
   Regards
   Helmut
  
  
  
 



RE: [Tobago] Sheet gets Refreshed

2007-03-14 Thread H. Swaczinna
Hello Madan,not the values have changed but the order of the rows. Maybe your databasedoes random sorting. Do you have a sort criteria for your database query?Are the columns of the sheet sortable? If you have sorted the rows by clicking theheaders and then refresh the data from your database the original sorting is restored.RegardsHelmutHi All,I have a sheet which contain details of an order placed by the user.The order Qty entered by the user is available in the textfield in the sheet.But if at all the user refreshes the page , the sheet gets refreshed and
 the values in the Qty are being altered.This would be a blocker in my app if found by the testers.Please find the difference in the images i attached with this mail, u can see that the Qty is varied for the products.This values are changed when i refresh the page as in the images before.gif and after.gif.Regards,Madan
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


RE: [Tobago] opening a new broswer and the original IE broswer lost session

2007-03-13 Thread H. Swaczinna
Hi Sam,seems to me you've taken the code from a posting I've done some time ago ;-)I'm still using the same code and it works with the IE. The problem with the session timeoutmust have an other cause.There exists an alternative approach for PDF download in the Tobago demo. Maybe youcan try this.RegardsHelmut









Hi:

 I am using the IE browser. I create a print button to open a new browser to print, then I tried to submit a record form the original browser, but nothing got submitted. When I click on other tab, I got session timeout. It seems the FaceContext was lost. I would need to refresh the browser in order to get back the FaceContext object back. Could anyone tell me how to open a new browser and the FaceContext will not lost from the original browser? Or is this a bug for Tobago? Thanks.

I am using this suggestion below:

JSP

 ...

 tc:script 

 // Everytime the page is loaded, check for an existing PDF file to display

 function showPrintResult(url) {

 if (url != null  url != "") {

 window.open(url, "Print");

 }

 }

 /tc:script

 ...

 tc:button label="Print" id="printButton"

 action=""/

 ...

PrintController

 

 public void printAction() {

 // Generate PDF file

 ...

 // Set PDF file

 printFile = "http://localhost:8080/gena/print/test.pdf";;

 }

 public String getPrintFile() {

 // Return and reset PDF file 

 String tmp = printFile;

 printFile = null;

 return tmp;

 }





-- Sam Wong







RE: [ Tobago ] defaultCommand in tc:link

2007-03-13 Thread H. Swaczinna
Hi Madan,you can try to define a custom markup for the button which hides the border.RegardsHelmutHi All,I have a link which is shown with an image.If at all i use a button for the action, i used ' defaultCommand ' attribute to achieve my task if i press enter.But now as i am using link, i was not able to complete the action when i press enter.I need to show an image in the form, but when used image in tc:button was getting a border which looks bad. Is there any means to achieve the defaultCommand action to a link ?Regards,Madan
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


Re: File upload?

2007-03-13 Thread H. Swaczinna
You can set the path for the files in web.xml:

  filter
filter-namemultipartFormdataFilter/filter-name

filter-classorg.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter/filter-class
init-param
  descriptionSet the size limit for uploaded files. Default value is 1 MB.
Format: 10 = 10 bytes
10k = 10 KB
10m = 10 MB
1g = 1 GB
  /description
  param-nameuploadMaxFileSize/param-name
  param-value20m/param-value
/init-param
init-param
  descriptionSet the upload repository path for uploaded files. Default 
value is java.io.tmpdir./description
  param-nameuploadRepositoryPath/param-name
  param-value/tmp/param-value
/init-param
  /filter

Regards
Helmut


On 12/03/07, Bjørn T Johansen [EMAIL PROTECTED] wrote:
 Where can I configure where the files are saved?
 And can I have two file upload on the same page?

Take a look at:

http://www.mail-archive.com/users@myfaces.apache.org/msg32055.html

regards
michael


-- 
[EMAIL PROTECTED]
http://stawicki.jasliska.pl
GG: 369
JID: [EMAIL PROTECTED]


RE: [Tobago] opening a new broswer and the original IE broswer lost session

2007-03-13 Thread H. Swaczinna
I'm just remembering one thing. Do you get a message like"Server error. Probably a session timeout." in your browser window?If so, this isn't really a session timeout, but an exception while executing an ajaxrequest. When you have set switchType="reloadTab" in your tabGroup tab switchingis done by ajax. Have a look in your server log for any exceptions.RegardsHelmut









Hi:

 I am using the IE browser. I create a print button to open a new browser to print, then I tried to submit a record form the original browser, but nothing got submitted. When I click on other tab, I got session timeout. It seems the FaceContext was lost. I would need to refresh the browser in order to get back the FaceContext object back. Could anyone tell me how to open a new browser and the FaceContext will not lost from the original browser? Or is this a bug for Tobago? Thanks.

I am using this suggestion below:

JSP

 ...

 tc:script 

 // Everytime the page is loaded, check for an existing PDF file to display

 function showPrintResult(url) {

 if (url != null  url != "") {

 window.open(url, "Print");

 }

 }

 /tc:script

 ...

 tc:button label="Print" id="printButton"

 action=""/

 ...

PrintController

 

 public void printAction() {

 // Generate PDF file

 ...

 // Set PDF file

 printFile = "http://localhost:8080/gena/print/test.pdf";;

 }

 public String getPrintFile() {

 // Return and reset PDF file 

 String tmp = printFile;

 printFile = null;

 return tmp;

 }





-- Sam Wong







[Tobago] Popups background not disabled

2007-03-13 Thread H. Swaczinna
Hi,

when the page shows a popup the background page is grayed and
you can't activate any component by mouse. But you can activate
any component by keyboard when you use the tab key. You can execute
actions and modifiy fields. This is the serious problem because our
customers users used to work more by keyboard than by mouse.
With the IE there's another problem. Listboxes aren't disabled at all.
You can pick entries by mouse.

Regards
Helmut


Re: [Tobago] Popups background not disabled

2007-03-13 Thread H. Swaczinna
No, sorry, we can't switch to IE 7. I would be happier if we could...

Regards
Helmut


BTW, the same is true for the progress effect used for page transitioning.

Is switching to IE 7 an option?

Regards,
Arvid

Arvid Hülsebus wrote:
 In a different project I installed something like a keyboard event 
 sink to avoid this. I will try to work this out together with Udo.

 The select control problem doesn't exist in IE 7. For IE 6 we didn't 
 include an IFRAME hack up to now to hide the select controls. This was 
 a known issue, which we somehow forgot to fix.

 Best regards,
 Arvid

 H. Swaczinna wrote:
 Hi,

 when the page shows a popup the background page is grayed and
 you can't activate any component by mouse. But you can activate
 any component by keyboard when you use the tab key. You can execute
 actions and modifiy fields. This is the serious problem because our
 customers users used to work more by keyboard than by mouse.
 With the IE there's another problem. Listboxes aren't disabled at all.
 You can pick entries by mouse.

 Regards
 Helmut

   



[Tobago] Ajax request timeout

2007-03-12 Thread H. Swaczinna
Hello,

the timeout for ajax request seems to be very small. If an ajax requests 
blocks for some seconds I get the error message 

2007-03-12 15:16:56 ERROR - 
org.apache.myfaces.tobago.ajax.api.AjaxPhaseListener - Ignoring AjaxRequest 
without valid component tree!

and ajax doesn't work anymore.

How can I increase the ajax timeout?

Regards
Helmut


Re: [Tobago] Problem with tabGroup and redered attribute

2007-03-12 Thread H. Swaczinna
Hello Bernd,

here's a (very simple) example:

f:view 
  tc:page id=testPage width=300px height=200px
tc:tabGroup switchType=reloadTab  
  tc:tab id=tab1 label=Tab1 
tc:out value=Tab1/
  /tc:tab 
  tc:tab id=tab2 label=Tab2
rendered=false 
tc:out value=Tab2/
  /tc:tab 
  tc:tab id=tab3 label=Tab3 
tc:out value=Tab3/
  /tc:tab 
/tc:tabGroup
  /tc:page
/f:view

Tab 2 is not rendered and you can't activate Tab3.

Regards
Helmut


Hello Helmut,

can you send an example page, please.

Regards

Bernd

H. Swaczinna wrote:
 Hi,
 
 I've a tabGroup with some tabs and one the tabs has rendered=false
 (for example a user has no right to see this tab). Then you can't 
 activate a tab which is right of the the tab not rendered.
 Clicking on the tab has no effect. Seems to be a bug in Tobago.
 
 Regards
 Helmut



[Tobago] Problem with tabGroup and redered attribute

2007-03-09 Thread H. Swaczinna
Hi,

I've a tabGroup with some tabs and one the tabs has rendered=false
(for example a user has no right to see this tab). Then you can't 
activate a tab which is right of the the tab not rendered.
Clicking on the tab has no effect. Seems to be a bug in Tobago.

Regards
Helmut


RE: Re: [Tobago] Form submit using JavaScript

2007-03-06 Thread H. Swaczinna
Hi Madan,just one tip, may be this helps. You can use the (internally) Tobago function Tobago.reloadComponent() to execute a serveside action, get back a value via ajaxand finally execute some _javascript_. Example:function checkOrderIdAndConfirmSubmit() { var options = { onComplete:  function() { confirmSubmit();  } }; Tobago.reloadComponent(panel to reload, button with the action, options);}function confirmSubmit() { if (orderId exists) {  if (confirmDialog(...)) { Tobago.submit(...);  } }}RegardsHelmutHi All,Am bit in a urgency to complete my application as my project deadline is ahead.Am stuck with a few issues like this and the mouseOver functionality for tc:link/Could anyone plz suggest me how to proceed with this case ?Regards,Madan- Original Message From: madan chowdary [EMAIL PROTECTED]To: MyFaces Discussion users@myfaces.apache.orgSent: Friday, 2 March, 2007 5:27:56 PMSubject: [Tobago] Form submit using _javascript_Hi All,I have a usecase which
 does as follows,- User has to enter an orderID-If orderId is already present in the database, then he should be asked to confirm with the same orderId or cange the orderId.-This would be asked with a _javascript_ confirm dialog .- if 'Ok' is clicked, the form must be submitted. else if 'Cancel' does not do any thing.The first time he enters with the po number, it should go to the server process , if poNumber already exists, then it should come back to the same page , render all the text and then show the _javascript_ confirm dialog asking to choose the above case.I was able to achieve this as undertc:cell tc:panel f:facet
 name="layout" tc:gridLayout/ /f:facet tc:cell tc:button label="#{bundle.buy}" action="" id="buyButton" tc:attribute name="renderedPartially" value=":page:confirmPoNumberExists"/ /tc:button /tc:cell /tc:panel/tc:cell%-- poNumberExists Confirmation --%tc:cell tc:panel
 id="confirmPoNumberExists" f:facet name="layout" tc:gridLayout rows="10px;10px;" border="1"/ /f:facet tc:cell rendered="#{checkout.poNumberExists}" tc:out value="true"/ /tc:cell tc:cell rendered="#{!checkout.poNumberExists}" tc:out value="false"/ /tc:cell /tc:panel/tc:cellJust for testing i kept as follows to print true or false, when i click on buy button, was able to send a
 request with ajax and get back the value as true or false.But i was stuck how to proceed with "_javascript_ confirm" and submitting the form.Plz suggest me with this,Thnx in AdvanceRegards,Madan
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


RE: Why we use Tobago?

2007-03-06 Thread H. Swaczinna
Hi,

there's no direct way to use css styles. But you can use and define
markups instead, for example markup=number right aligns input
fields. To define your own markups see

http://myfaces.apache.org/tobago/faq.html 9. and 10.

Regards
Helmut



Hi all

Can I use css for any Tobago tag like “in“,”out” etc tag?
Sometime I need to left align right align some text filed, button but I
don’t know how to solved this problem. 
Please help if any one has answer.

Another question is: I am new in Tobago any one can explain me why we choice
Tobago ?

-- 
View this message in context: 
http://www.nabble.com/Why-we-use-Tobago--tf3355607.html#a9332229
Sent from the MyFaces - Users mailing list archive at Nabble.com.



[Tobago] How to redisplay a popup in case of an error

2007-03-05 Thread H. Swaczinna
Hi,

I have a popup with some input fields and a submit button
(tc:attribute name=popupClose value=afterSubmit/).
When the popup is submitted I want to check the entered values
and then redisplay the same popup in case of incorrect data entered,
so the user can correct his inputs. How can I do this?

Regards
Helmut


RE: Re: [Tobago] Problem with PDF download and Ajax

2007-02-27 Thread H. Swaczinna
Hi Madan,here's a (stripped) example I use to generate print files within java code: tc:button id="printButton"  label="Print" immediate="true" transition="false" action=""/ public void printAction() { String pathname = System.getProperty("java.io.tmpdir"); String filename = "test.pdf"; File pdfFile = new File(pathname, filename); try { PrintStream out = new PrintStream(pdfFile); // Write the PDF content out.println(...); out.close(); sendFile(pathname, filename, "application/pdf"); } catch (IOException x) { LOG.error("Can't create PDF file", x); } }RegardsHelmutHi Helmut,As per ur code, u give the location of a PDF doc on the server.Which when referred then that would be downloaded.But what if a pdf doc is generated within a javacode, say with Jasper Reports.How can i pass that pdf doc generated in runtime to the jsp page and display that ?Thnx in Advance,Regards,Madan- Original Message From: Bernd Bohmann [EMAIL PROTECTED]To: MyFaces Discussion users@myfaces.apache.orgSent: Tuesday, 27 February, 2007 4:25:31 AMSubject: Re: [Tobago] Problem with PDF download and AjaxHello
 Helmut,just solved see:http://issues.apache.org/jira/browse/TOBAGO-303Should be available with the next nightly buildRegardsBerndH. Swaczinna wrote: Hi,  I've a page with a link to download a PDF file. The PDF download itself works without a problem. But after a download Ajax requests don't work anymore, for example a popup or a tabGroup with reloadTab.  Here's a small testcase for this behavior.  The page:  %@ taglib uri="http://myfaces.apache.org/tobago/component"; prefix="tc"  %%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"  %%@ page contentType="text/html;charset=UTF-8"
 language="java"  %%@ page pageEncoding="UTF-8"  %f:viewtc:page id="testPage" width="300px" height="200px" tc:panel f:facet name="layout" tc:gridLayout cellspacing="0"  rows="fixed;fixed"/ /f:facet tc:link id="pdfLink" label="PDF" immediate="true" transition="false"
 actionListener="#{anlagenController.showPDFActionListener}" f:attribute name="file" value="test1.pdf"/ /tc:link tc:link id="ajaxLink" label="Ajax" tc:attribute name="renderedPartially" value="testPopup"/ f:facet name="popup" tc:popup id="testPopup" width="300" height="200" tc:button id="closeButton" 
 label="Close" tc:attribute name="popupClose" value="immediate"/ /tc:button /tc:popup /f:facet /tc:link /tc:panel /tc:page /f:view  The java code for the PDF download:  public void showPDFActionListener(ActionEvent e) { String filename = (String)e.getComponent().getAttributes().get("file"); sendFile(attachmentPath, filename, "application/pdf"); }  protected void
 sendFile(String filepath, String filename, String mimeType) { File file = new File(filepath, filename); if (file.exists()  file.isFile()) { try { InputStream in = new FileInputStream(file); FacesContext facesContext = FacesContext.getCurrentInstance(); HttpServletResponse response =  (HttpServletResponse)facesContext.getExternalContext().getResponse(); response.setContentType(mimeType); response.setContentLength(in.available());
 response.setHeader("Content-disposition",  " attachment;filename=\"" + filename + "\""); ServletOutputStream out = response.getOutputStream(); byte[] buffer = new byte[0x1]; while (in.read(buffer)  0) { out.write(buffer); } in.close(); out.close(); StateManager stateManager = (StateManager)facesContext.getApplication().getStateManager();
 stateManager.saveSerializedView(facesContext);  facesContext.responseComplete(); } catch (Exception x) { getLog().error("Error writing output", x); } } else { getLog().error("File " + file.getAbsolutePath() + " not found"); } } I think there's a problem with Ajax when a page submit has no result.  Regards Helmut 
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


RE: Re: [Tobago] nesting tc:sheet

2007-02-26 Thread H. Swaczinna
There's no tc:selectItems in the Tobago tag doc. Is this a new tag?

Regards
Helmut


tc:selectItems may resolve your problem, it is similar to f:selectItems 
but allows $-Expressions, as far as I know. So you can use forEach.

Do you really need nested loops? Is the inner a loop over the items? 
Then you can use ?:selectItems instead of ?:selectItem.

Regards

Udo

Michał 'Gandalf' Stawicki schrieb:
 Hi,

 no answers to this one...

 Is there any way in Tobago to do double-iteration (so I iterate over
 some List, and than I iterate over some elements than I get from the
 first list)? I can't use forEach  as I need to use tc:selectOneChoice
 and f:selectItems and these won't work with forEach

 regards,
 michael

 On 14/02/07, Michał 'Gandalf' Stawicki [EMAIL PROTECTED] wrote:
 Hi,

 did anyone tried nesting tc:sheet inside another tc:sheet's column?

 I don't get any errors, but the inner tc:sheet just isn't rendered

 regards,
 michael

 -- 
 [EMAIL PROTECTED]
 http://stawicki.jasliska.pl
 GG: 369
 JID: [EMAIL PROTECTED]






[Tobago] Problem with PDF download and Ajax

2007-02-26 Thread H. Swaczinna
Hi,

I've a page with a link to download a PDF file. The PDF download itself
works without a problem. But after a download Ajax requests don't work
anymore, for example a popup or a tabGroup with reloadTab.

Here's a small testcase for this behavior.

The page:

%@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc 
%%@ taglib uri=http://java.sun.com/jsf/core; prefix=f 
%%@ page contentType=text/html;charset=UTF-8 language=java 
%%@ page pageEncoding=UTF-8 
%f:view
 tc:page id=testPage width=300px height=200px
tc:panel
  f:facet name=layout
tc:gridLayout cellspacing=0 
  rows=fixed;fixed/
  /f:facet
  tc:link id=pdfLink
label=PDF
immediate=true
transition=false
actionListener=#{anlagenController.showPDFActionListener}
f:attribute name=file value=test1.pdf/
  /tc:link
  tc:link id=ajaxLink
label=Ajax
tc:attribute name=renderedPartially value=testPopup/
f:facet name=popup
  tc:popup id=testPopup width=300 height=200
tc:button id=closeButton 
  label=Close
  tc:attribute name=popupClose value=immediate/
/tc:button
  /tc:popup
/f:facet
  /tc:link
/tc:panel
  /tc:page
/f:view

The java code for the PDF download:

  public void showPDFActionListener(ActionEvent e) {
String filename = (String)e.getComponent().getAttributes().get(file);
sendFile(attachmentPath, filename, application/pdf);
  }

  protected void sendFile(String filepath, String filename, String mimeType) {
File file = new File(filepath, filename);
if (file.exists()  file.isFile()) {
  try {
InputStream in = new FileInputStream(file);
FacesContext facesContext = FacesContext.getCurrentInstance();
HttpServletResponse response = 
  (HttpServletResponse)facesContext.getExternalContext().getResponse();
response.setContentType(mimeType);
response.setContentLength(in.available());
response.setHeader(Content-disposition, 
 attachment;filename=\ + filename + \);
ServletOutputStream out = response.getOutputStream();
byte[] buffer = new byte[0x1];
while (in.read(buffer)  0) {
  out.write(buffer);
}
in.close();
out.close();
StateManager stateManager = 
(StateManager)facesContext.getApplication().getStateManager();
stateManager.saveSerializedView(facesContext); 
facesContext.responseComplete();
  } catch (Exception x) {
getLog().error(Error writing output, x);
  }
} else {
  getLog().error(File  + file.getAbsolutePath() +  not found);
}
  }
 
I think there's a problem with Ajax when a page submit has no result.

Regards
Helmut


[Tobago] How to display an euro with IE and ajax

2007-02-22 Thread H. Swaczinna
Hi,

I want to display an euro character (€) in a label that's on a
ajax reloaded panel. There's no problem with Firefox, but with IE(5.5/6.0)
I see the string euro instead of the euro char. The label is
loaded from a resource bundle (in xml style). I tried to encode the
euro in the resource but that doesn't help.

Resource  - IE
€   - euro
euro;  - 
amp;euro;  - euro;

I think Tobago still has some problems with the character encoding
in ajax reloaded components.

Regards
Helmut


How to cleanup an application scoped bean

2007-02-21 Thread H. Swaczinna
Hi,

I have an application scoped bean and want to do some cleanup when
the application is shutdown (undeployed). Is there a way to register
the bean somehow with the application context like I can register a
session scoped bean with the session context?

Regards
Helmut


RE: Re: How to cleanup an application scoped bean

2007-02-21 Thread H. Swaczinna
Ok, but how can I access (find) the bean from such servletcontext 
listener? There's no FacesContext at that time I think.

Regards
Helmut


you can use a servletcontext listener to do some cleanup on shutdown

-M

On 2/21/07, H. Swaczinna [EMAIL PROTECTED] wrote:
 Hi,

 I have an application scoped bean and want to do some cleanup when
 the application is shutdown (undeployed). Is there a way to register
 the bean somehow with the application context like I can register a
 session scoped bean with the session context?

 Regards
 Helmut



-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


RE: Re: Re: How to cleanup an application scoped bean

2007-02-21 Thread H. Swaczinna
Ok, looks simple. Thank you.


contextDestroyed(ServletContextEvent sce)
{

 ServletContext servletCxt = sce.getServletContext()
 MyBean mb = (MyBean) servletCxt.getAttribute(nameOfTheManagedBean);
 mb.doIt();

}

On 2/21/07, H. Swaczinna [EMAIL PROTECTED] wrote:
 Ok, but how can I access (find) the bean from such servletcontext
 listener? There's no FacesContext at that time I think.

 Regards
 Helmut


 you can use a servletcontext listener to do some cleanup on shutdown
 
 -M
 
 On 2/21/07, H. Swaczinna [EMAIL PROTECTED] wrote:
  Hi,
 
  I have an application scoped bean and want to do some cleanup when
  the application is shutdown (undeployed). Is there a way to register
  the bean somehow with the application context like I can register a
  session scoped bean with the session context?
 
  Regards
  Helmut
 
 
 
 --
 Matthias Wessendorf
 http://tinyurl.com/fmywh
 
 further stuff:
 blog: http://jroller.com/page/mwessendorf
 mail: mwessendorf-at-gmail-dot-com



-- 
Matthias Wessendorf
http://tinyurl.com/fmywh

further stuff:
blog: http://jroller.com/page/mwessendorf
mail: mwessendorf-at-gmail-dot-com


RE: [Tobago] How to get a horizontal scrollbar for tc:sheet?

2007-02-12 Thread H. Swaczinna
Hi everybody,

nobody outthere who can give me a hint on this topic?

Regards
Helmut


Hi,

I have a tc:sheet with a lot of columns, so not all can be displayed
at once on the page. The sum of the pixel widths of the column is greater 
than the page width. Tobago sets all columns that don't fit on the
page to width zero. So they never can be seen or resized. What I expect is 
a horizontal scrollbar for the sheet or the containing panel or cell.
Setting scrollbars=true for the containing cell doesn't help. So how do 
I get a horizontal scrollbar?

Regards
Helmut


RE: [Tobago] Theme Package Issue

2007-02-12 Thread H. Swaczinna
Hi Varna,this seems to be a related bug tohttps://issues.apache.org/jira/browse/TOBAGO-212RegardsHelmutHi,I Created a new theme whose package structure is "com.mycompany.tobago.renderkit", fallback theme is speyside.When using this theme getting the following _javascript_ error : 
Tobago.Config
 has no properties
Tobago.Config.set("Tobago", "themeConfig", "wintage/standard");
The reason is the wintage/
theme-config.js from my wintage theme is included before the standard/theme-config.js. /script
script src="/Store/com/mycompany/tobago/renderkit/html/wintage/standard/script/theme-config.js" type
="text/_javascript_"/scriptscript src=
"/Store/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/theme-config.js" type="text/_javascript_"
Are these script includes sorted alphabetically ?? Isn't this an issue ?? I Guess the includes must be sorted based on fallback dependency !! Atleast the standard theme-config.js must be included first, Because 
Theme.Config property is initialized there.Regards,Varma



[Tobago] How to get a horizontal scrollbar for tc:sheet?

2007-02-08 Thread H. Swaczinna
Hi,

I have a tc:sheet with a lot of columns, so not all can be displayed
at once on the page. The sum of the pixel widths of the column is geater 
than the page width. Tobago sets all columns that don't fit on the
page to width zero. So they never can be seen or resized. What I expect is 
a horizontal scrollbar for the sheet or the containing panel or cell.
Setting scrollbars=true for the containing cell doesn't help. So how do 
I get a horizontal scrollbar?

Regards
Helmut


[Tobago] onchange has no effect in tc:in

2007-02-06 Thread H. Swaczinna
Hi,

the onchange attribute of tc:in has no effect (but is documented).
So I tried to attach a tc:command tag which also has no effect.
So there's no way to execute some client or server side action when
the user changes the content of the input field without submitting and 
reloading the page explicitly by clicking a button or link. I want to 
update the contents of some other fields when the user enters a value in 
this field. How should I do this? Please make either onchange or
tc:command working. I would be lucky if I could have both. Thanks.

Regards
Helmut


RE: Please test the current snapshot of tobago 1.0.10

2007-02-05 Thread H. Swaczinna
Hello Bernd,

seems to be ok. I tested my app with the current snapshot.
But one small thing remains open. In TOBAGO-252 is still a small problem.
I added a comment a week ago.

Regards
Helmut

Hello,

I would like to release the 1.0.10 version during the next week.
I ask everbody to test the current snapshot, please.

Regards


Bernd


[Tobago] PhaseListeners not invoked with ajax request

2007-02-02 Thread H. Swaczinna
Hi,

when a server request is invoked by ajax not all registered
phaseListeners are invoked. Only in phases RESTORE_VIEW and
APPLY_REQUEST_VALUES the listeners are invoked. Even when an action 
is executed, there's no invocation of INVOKE_APPLICATION listeners.

In general, is the lifecycle in ajax request the same as in normal
JSF requests? Or is this something completely different?

Regards
Helmut


[Tobago] tc:reload question

2007-02-02 Thread H. Swaczinna
Hi,

is there any possibilty to execute a server side action(Listener) when
when a tc:sheet is reload by a tc:reload?

Regards
Helmut


RE: Re: [Tobago] tc:reload question

2007-02-02 Thread H. Swaczinna
Hi Volker,

thanks for the tip. But I found another (better?) way to do this.
I use a javascript timer to reload the sheet instead of tc:reload.
The timer function calls reloadComponent() for the sheet with the 
action to be executed.

Regards
Helmut


Hi Helmut,

afaik there is (currently) no officall way to do this, but we (me and
Bernd) already have talked about the need.

But if you add the update attribute to the tc:reload with a
valueBinding, you can put anny code in this getter.
Currently this getter is invoked once per request, just before
rendering, but don't relay on this.

Regards,
  Volker

2007/2/2, H. Swaczinna [EMAIL PROTECTED]:
 Hi,

 is there any possibilty to execute a server side action(Listener) when
 when a tc:sheet is reload by a tc:reload?

 Regards
 Helmut



[Tobago] Lifecylce problem with renderedPartially and selectBooleanCheckbox

2007-02-01 Thread H. Swaczinna
Hello,

I've a selectBooleanCheckbox with a nested command tag with a
renderedPartially attribute. The selectBooleanCheckbox has a 
valueChangeListener. The valueChangeListener should be called and
then some part of the page reloaded when the checkbox is clicked. This 
works in general but the lifecycle sequence is not correct. The 
valueChangeListener is called first and then the value is written back 
to the model. It should be vice versa.

JSP:

tc:panel id='panel'
...
tc:selectBooleanCheckbox id=checkbox
  valueChangeListener=#{controller.valueChangeListener}
  value=#{controller.checkbox}
f:facet name=change
  tc:command
tc:attribute name=renderedPartially
  value=panel/
  /tc:command
/f:facet
/tc:selectBooleanCheckbox
...

Java:

  public void valueChangeListener(ValueChangeEvent e) {
LOG.debug(valueChangeListener:  + e.getNewValue());
  }

  public void setCheckbox(Boolean checkbox) {
LOG.debug(setCheckbox:  + checkbox);
  }

LOG:

...
controller - valueChangeListener: true
controller - setCheckbox: true
...


Regards
Helmut


RE: Re: [Tobago] Lifecylce problem with renderedPartially and selectBooleanCheckbox

2007-02-01 Thread H. Swaczinna
Hello Volker,

no, without ajax, the model is updated first and then the 
valueChangeListener is called. And the bevaviour with ajax was
some days (snapshots) ago the same as without. So I build my 
application code based on this behaviour ... :-(

But yes, you're right, ValueChangeListeners should be fired in 
validationPhase. So the baviour of Tobago (myFaces?) is inconsistent.

Regards
Helmut

Hi Helmut,

this is the correct behavior.

ValueChangeListeners are fired in validationPhase (see jsf1.1 spec 3.2.5.3),
setters are executed in updateModelPhase.

Should be the same as without ajax.

Regards,
  Volker

2007/2/1, H. Swaczinna [EMAIL PROTECTED]:
 Hello,

 I've a selectBooleanCheckbox with a nested command tag with a
 renderedPartially attribute. The selectBooleanCheckbox has a
 valueChangeListener. The valueChangeListener should be called and
 then some part of the page reloaded when the checkbox is clicked. This
 works in general but the lifecycle sequence is not correct. The
 valueChangeListener is called first and then the value is written back
 to the model. It should be vice versa.

 JSP:

 tc:panel id='panel'
 ...
 tc:selectBooleanCheckbox id=checkbox
   valueChangeListener=#{controller.valueChangeListener}
   value=#{controller.checkbox}
 f:facet name=change
   tc:command
 tc:attribute name=renderedPartially
   value=panel/
   /tc:command
 /f:facet
 /tc:selectBooleanCheckbox
 ...

 Java:

   public void valueChangeListener(ValueChangeEvent e) {
 LOG.debug(valueChangeListener:  + e.getNewValue());
   }

   public void setCheckbox(Boolean checkbox) {
 LOG.debug(setCheckbox:  + checkbox);
   }

 LOG:

 ...
 controller - valueChangeListener: true
 controller - setCheckbox: true
 ...


 Regards
 Helmut



[Tobago] onchange has no effect in tc:selectBooleanCheckbox (again)

2007-02-01 Thread H. Swaczinna
Hi,

I want to change the content of some fields on the page when the user 
clicks a checkbox without submitting and reloading the whole page. It 
tried this with ajax reload and the valueChangeListener. But I just 
learned, I can't access the values in the model in the valueChangeListener 
of the checkbox because it is executed before the model is updated. 
(This had worked some days ago.)

Before, I had tried to do this with javascript at the client. But I found 
no way to assign javascript code to the checkbox. As I mentioned earlier, 
the onchange attribute has no effect and the tc:command has no onchange.

How can I change other fields when the checkbox is clicked?
Could you please make the onchange attribute of tc:selectBooleanCheckbox
work?

Regards
Helmut


[Tobago] tc:validateFileItem

2007-01-29 Thread H. Swaczinna
Hello,

the message ContentType x/y not expected. of tc:validateFileItem
seems to be hardcoded in class FileItemValidator. I would like to
see a german maessage.

Regards
Helmut


RE: Re: [Tobago] Still NotSerializableException in file upload

2007-01-26 Thread H. Swaczinna
Problem is fixed with commons-fileupload 1.1.1. 
Thanks
Helmut


Ok,

update to commons-fileupload 1.1.1 should fixed the problem.
See  https://issues.apache.org/jira/browse/TOBAGO-257

Regards

Bernd

H. Swaczinna wrote:
 Hello,
 
 my fileupload works fine now, but the NotSerializableException
 still occurs in two cases:
 
 First, when submitting without file name entered in the file field.
 Second, when the selected file is not of the type specified in the
 validateFileItem tag.
 
 Not my fault this time, I think.
 
 Regards
 Helmut



RE: Re: [Tobago] Problem with progress bar and PDF download

2007-01-26 Thread H. Swaczinna
Ok, this works. Thanks to Udo.

Helmut

Hello Helmut,

Udo commited the latest changes for progressbar.

You can disable the progressbar with the attribute transition of button 
or link.

Regards

Bernd

H. Swaczinna wrote:
 Hello,
 
 now to the problem with the progress bar I mentioned earlier.
 
 I want to download a PDF file as the result of an action. I found code
 on the net for doing this 
(http://www.nabble.com/download-file-breaks-lifecycle-t2893828.html).
 This works fine. The browser options a dialog box, where you can choose
 to open or to store the PDF file. The content of the page remains 
 unchanged.
 
 But the page remains disabled and with the progress bar running for
 ever, because the page waits for the result of the action, which never
 comes. Because there's no target attribute in this case, Tobago can not 
 know, that there will be no result from the action. So I think, we need 
 some kind of switch, to switch the progress bar off for some special 
 cases.
 
 Regards
 Helmut
 
 P.S. Sorry for the many (bug) postings and thank you for quick bug fixes
 and the fantastic support so far.



RE: Re: [Tobago] Problems with target attribute

2007-01-25 Thread H. Swaczinna
Ok, both issues are fixed. Thank you.

But there's another problem with the progress bar. I'll start a new
thread for this.

Regards
Helmut


I think it is fixed for link now

Bernd Bohmann wrote:
 Hello Helmut,
 
 should be fixed for button now.
 
 TOBAGO-41 doesn't works very well with TOBAGO-103
 
 I will look at the link renderer, but this take some time.
 
 Regards
 
 Bernd
 
 H. Swaczinna wrote:
 Hello,

 I want to display the result of an action in a new window. I understand,
 this can be done with the target attribute of tc:button and tc:link.
 But there're two problems:

 First, if I specify a target in tc:link, the action of the link is not
 invoked and the newly opened window remains empty.

 Sesond, when I use a tc:button instead, the action is invoked and the
 result is displayed in the new window. But the parent window remains
 disabled with a progress bar running for ever. I think, the window
 waits for result, which was redirected to the new window.

 JSP:

 tc:link id=newWindoLink
   label=New window
   action=#{anlagenController.action}
   target=New window/

 tc:button id=newWindowButton
   label=New window
   action=#{anlagenController.action}
   target=New window/

 AnlagenController.java:

   public String action() {
 LOG.debug(action);
 return newWindow;
   }

 faces-config.xml:

 navigation-case
   from-outcomenewWindow/from-outcome
   to-view-id/main.jsp/to-view-id
 /navigation-case


 Regards
 Helmut




[Tobago] required has no effect for tc:file

2007-01-25 Thread H. Swaczinna
Hello,

the required=true attribute has no effect in the tc:file tag.
You can submit the page without a file name entered.

Regards
Helmut


[Tobago] tc:file always has a fixed width

2007-01-25 Thread H. Swaczinna
Hello,

the width of the tc:file component is always fixed. It doesn't shrink
or spread to the width specified in the gridLayout.

Regards
Helmut


[Tobago] immediate has no effect on tabGroup

2007-01-25 Thread H. Swaczinna
Hello,

the immediate=true attribute of tc:link or tc:button has no effect,
when the link or button is on a tab in a tabGroup. Clicking the link
or button validates the fields on the page. Is the link or button
outside the tabGroup it does not. The tabGroup has switchType realodTab.

Regards
Helmut


[Tobago] Problem with progress bar and PDF download

2007-01-25 Thread H. Swaczinna
Hello,

now to the problem with the progress bar I mentioned earlier.

I want to download a PDF file as the result of an action. I found code
on the net for doing this 
(http://www.nabble.com/download-file-breaks-lifecycle-t2893828.html).
This works fine. The browser options a dialog box, where you can choose
to open or to store the PDF file. The content of the page remains 
unchanged.

But the page remains disabled and with the progress bar running for
ever, because the page waits for the result of the action, which never
comes. Because there's no target attribute in this case, Tobago can not 
know, that there will be no result from the action. So I think, we need 
some kind of switch, to switch the progress bar off for some special 
cases.

Regards
Helmut

P.S. Sorry for the many (bug) postings and thank you for quick bug fixes
and the fantastic support so far.


RE: Window remains locked onClick of commandLink with target.

2007-01-25 Thread H. Swaczinna
Hi,I think, Bernd fixed this bug yesterday. Try a new snapshot from the nightly build.RegardsHelmut









Hello,


In my application I have a use case where user search for message, matching certain criteria.

The application shows a list of messages using a datatable, in which one column has a commandLink with a target set.

This is done, so that if a user clicks on the link the selected message gets displayed in an newly opened browser window.

This works fine, except that after the user has read the message and closes the popupWindow, and selects another message to read an alert appears stating:

"Window has been locked"


The code of my page looks like:

 


t:dataTable 

 id="messageList"

 value="#{messageSearchBean.foundMessages}" var="message" 


 t:column 

   f:facet name="header"

   h:outputText value="${bundle.lblSubject}"/ 

  /f:facet

   h:commandLink 

   action="" 

   immediate="true"

   value="#{message.subject}"

   target="readMessageWindow"

   t:updateActionListener property="#{messageEditBean.message}" value="#{message}" /

  /h:commandLink

 /t:column 

/t:dataTable


I assume the locking of the window has been build in to prevent double submits, which it does quite nicely, but is an annoyance for my use case.

Did anybody encounter this same behaviour? Is this behaviour conform JSR-spec of is it MyFaces specific and if the latter: Is there a work-araound available?

Any suggestions how how I could unlocked my window are greatly appreciated.


With kind regards,

 Marco



--
Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp  Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is 
available at http://www.merck.com/contact/contacts.html) that may be 
confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this 
message. If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then 
delete it from your system.

--



RE: RE: Window remains locked onClick of commandLink with target.

2007-01-25 Thread H. Swaczinna
Sorry, forget my answer. It referred to Tobago. In Togabo, there was the same problem,which was fixed.HelmutHi,I think, Bernd fixed this bug yesterday. Try a new snapshot from the nightly build.RegardsHelmut









Hello,


In my application I have a use case where user search for message, matching certain criteria.

The application shows a list of messages using a datatable, in which one column has a commandLink with a target set.

This is done, so that if a user clicks on the link the selected message gets displayed in an newly opened browser window.

This works fine, except that after the user has read the message and closes the popupWindow, and selects another message to read an alert appears stating:

"Window has been locked"


The code of my page looks like:

 


t:dataTable 

 id="messageList"

 value="#{messageSearchBean.foundMessages}" var="message" 


 t:column 

   f:facet name="header"

   h:outputText value="${bundle.lblSubject}"/ 

  /f:facet

   h:commandLink 

   action="" 

   immediate="true"

   value="#{message.subject}"

   target="readMessageWindow"

   t:updateActionListener property="#{messageEditBean.message}" value="#{message}" /

  /h:commandLink

 /t:column 

/t:dataTable


I assume the locking of the window has been build in to prevent double submits, which it does quite nicely, but is an annoyance for my use case.

Did anybody encounter this same behaviour? Is this behaviour conform JSR-spec of is it MyFaces specific and if the latter: Is there a work-araound available?

Any suggestions how how I could unlocked my window are greatly appreciated.


With kind regards,

 Marco



--
Notice:  This e-mail message, together with any attachments, contains
information of Merck  Co., Inc. (One Merck Drive, Whitehouse Station,
New Jersey, USA 08889), and/or its affiliates (which may be known
outside the United States as Merck Frosst, Merck Sharp  Dohme or MSD
and in Japan, as Banyu - direct contact information for affiliates is 
available at http://www.merck.com/contact/contacts.html) that may be 
confidential, proprietary copyrighted and/or legally privileged. It is 
intended solely for the use of the individual or entity named on this 
message. If you are not the intended recipient, and have received this 
message in error, please notify us immediately by reply e-mail and then 
delete it from your system.

--




RE: Re: [Tobago] immediate has no effect on tabGroup

2007-01-25 Thread H. Swaczinna
Hello Bernd,

here comes a simple example:

f:view
  tc:page label=Test width=200px height=100px
f:facet name=layout
  tc:gridLayout cellspacing=0 
rows=fixed;fixed;1*/
/f:facet
tc:date id=dateField value=#{headController.geplSendedatum}/
tc:button label=No validation immediate=true/
tc:tabGroup switchType=reloadTab
  tc:tab id=tab1 label=Tab1 
tc:button label=With validation immediate=false/
  /tc:tab 
  tc:tab id=tab2 label=Tab2 
tc:button label=Should be without validation immediate=true/
  /tc:tab 
/tc:tabGroup
  /tc:page
/f:view

If you enter an invalid date in the date field, it is not validated
when you click the first button. It is validated, when you click the
button on the first tab. So far, everything is ok. But when you click
the button on the second tab, validation is also executed, but it  should
not be.

Regards
Helmut


Hello Helmut,

I can't reproduce your problem. Can you send an example page, please.

Regards

Bernd

H. Swaczinna wrote:
 Hello,
 
 the immediate=true attribute of tc:link or tc:button has no effect,
 when the link or button is on a tab in a tabGroup. Clicking the link
 or button validates the fields on the page. Is the link or button
 outside the tabGroup it does not. The tabGroup has switchType realodTab.
 
 Regards
 Helmut



[Tobago] Fileupload doesn't work in popup

2007-01-24 Thread H. Swaczinna
Hello,

I want want to do a fileupload in a popup. But I get this error message:

2007-01-24 12:01:27 http-8080-Processor25 ERROR - 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.FileRenderer:90
 - Can't process multipart/form-data without TobagoRequest. Please check the 
web.xml and define a TobagoMultipartFormdataFilter. See documentation for 
tc:file

The fileupload works, when it is on the page.

This is the popup:

tc:button id=anlagenInsertButton
  image=image/insert.gif
  tc:attribute name=renderedPartially value=uploadPopup/
  f:facet name=popup
tc:popup id=uploadPopup width=600 height=200
  tc:box label=Neue Anlage
f:facet name=layout
  tc:gridLayout rows=*;fixed columns=*;*;*/
/f:facet
tc:cell spanX=3
  tc:file id=dateiname
value=#{anlagenController.file}/
/tc:cell
tc:cell/
tc:button id=saveButton 
  label=#{mainBundle.button_label_save}
  tc:attribute name=popupClose value=afterSubmit/
  tc:attribute name=renderedPartially 
value=:mainPage:detailView:anlagenView:panel/
/tc:button
tc:button id=cancelButton 
  label=#{mainBundle.button_label_cancel}
  tc:attribute name=popupClose value=immediate/
  tc:attribute name=renderedPartially value=uploadPopup/
/tc:button
  /tc:box
/tc:popup
  /f:facet
/tc:button


Regards
Helmut


RE: Re: [Tobago] Fileupload doesn't work in popup

2007-01-24 Thread H. Swaczinna
Hi Volker!

The enctype=multipart/form-data is missing on html form tag if the
fileInput was not on the initally page.

No, that's ok. The enctype=multipart/form-data is not missing.
The fileupload works for example on a tab, which is loaded by Ajax.

Please use a nonAjax popup in the meantime.

Hm, I thought nonAjax popups aren't supportet any more?

Another issue with your code: I don't think that it is possible to
upload a file by ajax, you should remove the renderedPartially
attribute from the save button.

Ok, this works. Even with an Ajax popup. The renderedPartially on the
save button is the problem. But it would be nice, if file upload
will work with renderedPartially. Without, the whole page is submitted,
not only the file upload.

The renderedPartially attribute on a button with popupClose=immediate
has no effect.

Thanks

Regards
Helmut

2007/1/24, H. Swaczinna [EMAIL PROTECTED]:
 Hello,

 I want want to do a fileupload in a popup. But I get this error message:

 2007-01-24 12:01:27 http-8080-Processor25 ERROR - 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.FileRenderer:
90 - Can't process multipart/form-data without TobagoRequest. Please check the 
web.xml and define a TobagoMultipartFormdataFilter. See documentation for 
tc:file

 The fileupload works, when it is on the page.

 This is the popup:

 tc:button id=anlagenInsertButton
   image=image/insert.gif
   tc:attribute name=renderedPartially value=uploadPopup/
   f:facet name=popup
 tc:popup id=uploadPopup width=600 height=200
   tc:box label=Neue Anlage
 f:facet name=layout
   tc:gridLayout rows=*;fixed columns=*;*;*/
 /f:facet
 tc:cell spanX=3
   tc:file id=dateiname
 value=#{anlagenController.file}/
 /tc:cell
 tc:cell/
 tc:button id=saveButton
   label=#{mainBundle.button_label_save}
   tc:attribute name=popupClose value=afterSubmit/
   tc:attribute name=renderedPartially 
value=:mainPage:detailView:anlagenView:panel/
 /tc:button
 tc:button id=cancelButton
   label=#{mainBundle.button_label_cancel}
   tc:attribute name=popupClose value=immediate/
   tc:attribute name=renderedPartially 
value=uploadPopup/
 /tc:button
   /tc:box
 /tc:popup
   /f:facet
 /tc:button


 Regards
 Helmut



RE: Re: Re: [Tobago] Fileupload doesn't work in popup

2007-01-24 Thread H. Swaczinna
No, this is not the case. Values entered outside the ajax reloaded
piece are not validated and written to the backing bean. For example
when I open a popup with the rendered partially attribute or switch
between tabs with switchType=reloadTab. This is what I expect
Tobago should do. So please don't change...

Regards
Helmut


It is always the whole page submitted, even if the ajax request just
updates a small piece.

The ajax request sends the complete serialized html form to the server.

Regards,
  Volker

2007/1/24, H. Swaczinna [EMAIL PROTECTED]:
 Hi Volker!

 The enctype=multipart/form-data is missing on html form tag if the
 fileInput was not on the initally page.

 No, that's ok. The enctype=multipart/form-data is not missing.
 The fileupload works for example on a tab, which is loaded by Ajax.

 Please use a nonAjax popup in the meantime.

 Hm, I thought nonAjax popups aren't supportet any more?

 Another issue with your code: I don't think that it is possible to
 upload a file by ajax, you should remove the renderedPartially
 attribute from the save button.

 Ok, this works. Even with an Ajax popup. The renderedPartially on the
 save button is the problem. But it would be nice, if file upload
 will work with renderedPartially. Without, the whole page is submitted,
 not only the file upload.

 The renderedPartially attribute on a button with popupClose=immediate
 has no effect.

 Thanks

 Regards
 Helmut

 2007/1/24, H. Swaczinna [EMAIL PROTECTED]:
  Hello,
 
  I want want to do a fileupload in a popup. But I get this error message:
 
  2007-01-24 12:01:27 http-8080-Processor25 ERROR -
 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.FileRenderer
:
 90 - Can't process multipart/form-data without TobagoRequest. Please check 
the
 web.xml and define a TobagoMultipartFormdataFilter. See documentation for
 tc:file
 
  The fileupload works, when it is on the page.
 
  This is the popup:
 
  tc:button id=anlagenInsertButton
image=image/insert.gif
tc:attribute name=renderedPartially value=uploadPopup/
f:facet name=popup
  tc:popup id=uploadPopup width=600 height=200
tc:box label=Neue Anlage
  f:facet name=layout
tc:gridLayout rows=*;fixed columns=*;*;*/
  /f:facet
  tc:cell spanX=3
tc:file id=dateiname
  value=#{anlagenController.file}/
  /tc:cell
  tc:cell/
  tc:button id=saveButton
label=#{mainBundle.button_label_save}
tc:attribute name=popupClose value=afterSubmit/
tc:attribute name=renderedPartially
 value=:mainPage:detailView:anlagenView:panel/
  /tc:button
  tc:button id=cancelButton
label=#{mainBundle.button_label_cancel}
tc:attribute name=popupClose value=immediate/
tc:attribute name=renderedPartially
 value=uploadPopup/
  /tc:button
/tc:box
  /tc:popup
/f:facet
  /tc:button
 
 
  Regards
  Helmut
 



[Tobago] Problems with target attribute

2007-01-24 Thread H. Swaczinna
Hello,

I want to display the result of an action in a new window. I understand,
this can be done with the target attribute of tc:button and tc:link.
But there're two problems:

First, if I specify a target in tc:link, the action of the link is not
invoked and the newly opened window remains empty.

Sesond, when I use a tc:button instead, the action is invoked and the
result is displayed in the new window. But the parent window remains
disabled with a progress bar running for ever. I think, the window
waits for result, which was redirected to the new window.

JSP:

tc:link id=newWindoLink
  label=New window
  action=#{anlagenController.action}
  target=New window/

tc:button id=newWindowButton
  label=New window
  action=#{anlagenController.action}
  target=New window/

AnlagenController.java:

  public String action() {
LOG.debug(action);
return newWindow;
  }

faces-config.xml:

navigation-case
  from-outcomenewWindow/from-outcome
  to-view-id/main.jsp/to-view-id
/navigation-case


Regards
Helmut


[Tobago] Still NotSerializableException in file upload

2007-01-24 Thread H. Swaczinna
Hello,

my fileupload works fine now, but the NotSerializableException
still occurs in two cases:

First, when submitting without file name entered in the file field.
Second, when the selected file is not of the type specified in the
validateFileItem tag.

Not my fault this time, I think.

Regards
Helmut


RE: Re: [Tobago] Sessions with Tobago

2007-01-23 Thread H. Swaczinna
Hi,you can set custom styles for individual components via _javascript_ in the onload handler ofthe page. But this is more like a workaround, because not all components support markupsand I don't want to create for everey color or style I need a new markup in my own theme.Example:tc:script  function initStyles() { setStyle('mainPage:text1', 'color', 'red'); setStyle('mainPage:text1', 'fontWeight', 'bold'); }  function setStyle(id, style, value) { if (value != null  value != "") { var element = document.getElementById(id); if (element != null) { element.style[style] = value; } else { alert('Element ' + id + ' not found!'); } } } RegardsHelmutHi Bernd,With out writing any custom themes, can i display a text in Bold/Red in color.As i am a newbie , i dont think that i would be able to write my own custome theme rt now.But i need to display the text in bold using Tobago tags.Please help me over this,thnx- Original Message From: Bernd Bohmann [EMAIL PROTECTED]To: MyFaces Discussion users@myfaces.apache.orgSent: Tuesday, 23 January, 2007 12:50:06 PMSubject: Re: [Tobago] Sessions with TobagoHello,with an own theme you can define your own markup:http://myfaces.apache.org/tobago/faq.html#tobago/custommarkupRegardsBerndmadan chowdary wrote: Hi Bernd,  Thnx for your rely and suggestions.  I will work over with sessions once i reach my office.  But i have one more doubt.  Just for time being, i want to display a tc:out value in bold, and other one in red color. I used the markup as specified in the docs, but the whole text background is changing the color.   I just need to display the text in Red/Bold.  How to achieve this ?  - Original Message  From: Bernd Bohmann [EMAIL PROTECTED] To: MyFaces Discussion users@myfaces.apache.org Sent: Tuesday, 23 January, 2007 12:41:22 AM Subject: Re: [Tobago] Sessions
 with Tobago  Hello,  madan chowdary wrote: Hi all, I am new to Tobago and working over that, seeing over the net and this group. My query is how to use sessions with Tobago. I want a userID to be put into HttpSession object. I Tried this with intializing my managed bean with session scope. But i dont need all my values of the bean to set in the session.I just need userID. You have several options.  You can add a own managed bean for the userId only  or  you can set it in the session in your managed bean with  FacesContext.getCurrentInstance().getExternalContext().getSessionMap().put("userId",  userId);can anyone please help me over this... and can anyone please tell me where can i get detailed explaination
 about the tags and how to change the styles of the components, i want to use my custom Styles. http://myfaces.apache.org/tobago/documentation.html  http://myfaces.apache.org/tobago/faq.html#tobago/owntheme  The own theme section should be improved but your help is welcome :-)  How to get latest build Tobago 1.0.10, i dont see that in download section in Tobagosite.   The 1.0.10 is not release but you can download the nightly build  http://myfaces.apache.org/tobago/download.html  http://people.apache.org/builds/myfaces/nightly/ thnx in advance... Regards, Madan  __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/ __ Yahoo! India Answers: Share what you know. Learn something new http://in.answers.yahoo.com/
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


RE: [Tobago] Ajax with Tobago

2007-01-23 Thread H. Swaczinna
Hi,if you want to reload a component or a part of a page via Ajax, you can use the"renderedPartially" attribute. This can be add to buttons, links or command tags.The value of the attribute is the id of the component to reload.Example: tc:button label="" id="nextTabButton" action="" tc:attribute name="renderedPartially" value=":mainPage:detailView:panel"/ /tc:buttonWhen the button is clicked, Tobago first submits the contents of the panel identified by":mainPage:detailView:panel", then executes the action "#{mainController.nextTabAction}" andfinally rerenders and reloads the panel. This works not only with panels, but I can't say exactlywhich components do work. But at least, you can always put a panel around other components.RegardsHelmutHi All,Can u say where can i exactly use Ajax with Tobago.Which components will help me to use Ajax ?Regards,Madan
	

	
		 
Here’s a new way to find what you're looking for - Yahoo! Answers 


[Tobago] NotSerializableException in file uplaod

2007-01-23 Thread H. Swaczinna
Hi,

I want to do a file uplaod with Tobago, but I always get an exception
when submitting the page:

2007-01-23 15:40:44 http-8080-Processor23 ERROR - 
org.apache.myfaces.application.jsp.JspStateManagerImpl:599 - Exiting s
erializeView - Could not serialize state: 
org.apache.commons.fileupload.DeferredFileOutputStream
java.io.NotSerializableException: 
org.apache.commons.fileupload.DeferredFileOutputStream
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at 
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at 
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
...

JSP:

tc:file id=dateiname value=#{anlagenController.file}/

AnlagenController.java:

  public void setFile(FileItem file) {
LOG.error(Setting fileItem  + file.getName());
this.filename = file.getName();
  }

web.xml:

  filter
filter-namemultipartFormdataFilter/filter-name

filter-classorg.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter/filter-class
  /filter

classpath:

tobago-fileupload-1.0.10-SNAPSHOT.jar
commons-fileupload-1.0.jar


I've no idea what's wrong or missing. And there's no documentation,
except the simple example in the source...

Regards
Helmut


RE: Re: [Tobago] NotSerializableException in file uplaod

2007-01-23 Thread H. Swaczinna
Adding Serializable doesn't help.I don't know any savestate or keepalive tags. Helmut


  


AnlagenController implements the Serializable Class??

Is there any savestate or keepalive tag in your jsp?


H. Swaczinna escribió:

  Hi,

I want to do a file uplaod with Tobago, but I always get an exception
when submitting the page:

2007-01-23 15:40:44 http-8080-Processor23 ERROR - org.apache.myfaces.application.jsp.JspStateManagerImpl:599 - Exiting s
erializeView - Could not serialize state: org.apache.commons.fileupload.DeferredFileOutputStream
java.io.NotSerializableException: org.apache.commons.fileupload.DeferredFileOutputStream
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
...

JSP:

tc:file id="dateiname" value="#{anlagenController.file}"/

AnlagenController.java:

  public void setFile(FileItem file) {
LOG.error("Setting fileItem " + file.getName());
this.filename = file.getName();
  }

web.xml:

  filter
filter-namemultipartFormdataFilter/filter-name
filter-classorg.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter/filter-class
  /filter

classpath:

tobago-fileupload-1.0.10-SNAPSHOT.jar
commons-fileupload-1.0.jar


I've no idea what's wrong or missing. And there's no documentation,
except the simple example in the source...

Regards
Helmut
  



-- 




  

  
   Carlos López Rodríguez
  RD Department
[EMAIL PROTECTED]
Tel. +34 93 556 52 00
  
  


  


  
  
  
  


  
  Disclaimer: The content of
this message (and of all the files attached) is confidential, and is
forwarded exclusively to the specified addresses. The message may
contain privileged information and/or be legally protected. You can
only reproduce or distribute this material if you are specifically
authorized to do so. 
  
If you are not the intended recipient, any use, disclosure or copying
of this e-mail (and any attachments) is unauthorized. If you have
received this e-mail in error, please immediately delete it and any
copies of it from your system and notify us via e-mail at [EMAIL PROTECTED].
Thank you.
  


  

  






RE: Re: [Tobago] NotSerializableException in file uplaod

2007-01-23 Thread H. Swaczinna
What do you mean exactly with statesaving tags? Any JSF or Tabago with a state attribute?Helmut


  


No, the question was for removing these tags


H. Swaczinna escribió:
Adding Serializable doesn't help.
I don't know any savestate or keepalive tags. 
  
Helmut
  
  

  

 AnlagenController implements the Serializable Class??


Is there any savestate or keepalive tag in your jsp?


H. Swaczinna escribió:

  Hi,

I want to do a file uplaod with Tobago, but I always get an exception
when submitting the page:

2007-01-23 15:40:44 http-8080-Processor23 ERROR - org.apache.myfaces.application.jsp.JspStateManagerImpl:599 - Exiting s
erializeView - Could not serialize state: org.apache.commons.fileupload.DeferredFileOutputStream
java.io.NotSerializableException: org.apache.commons.fileupload.DeferredFileOutputStream
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
...

JSP:

tc:file id="dateiname" value="#{anlagenController.file}"/

AnlagenController.java:

  public void setFile(FileItem file) {
LOG.error("Setting fileItem " + file.getName());
this.filename = file.getName();
  }

web.xml:

  filter
filter-namemultipartFormdataFilter/filter-name
filter-classorg.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter/filter-class
  /filter

classpath:

tobago-fileupload-1.0.10-SNAPSHOT.jar
commons-fileupload-1.0.jar


I've no idea what's wrong or missing. And there's no documentation,
except the simple example in the source...

Regards
Helmut
  



-- 



  

  
   Carlos López Rodríguez
  RD Department
  [EMAIL PROTECTED]
Tel. +34 93 556 52 00
  
  


  


  
  
  
  


  
  Disclaimer: The content of
this message (and of all the files attached) is confidential, and is
forwarded exclusively to the specified addresses. The message may
contain privileged information and/or be legally protected. You can
only reproduce or distribute this material if you are specifically
authorized to do so. 
  
If you are not the intended recipient, any use, disclosure or copying
of this e-mail (and any attachments) is unauthorized. If you have
received this e-mail in error, please immediately delete it and any
copies of it from your system and notify us via e-mail at [EMAIL PROTECTED].
Thank you.
  


  

  



  

  



-- 




  

  
   Carlos López Rodríguez
  RD Department
[EMAIL PROTECTED]
Tel. +34 93 556 52 00
  
  


  


  
  
  
  


  
  Disclaimer: The content of
this message (and of all the files attached) is confidential, and is
forwarded exclusively to the specified addresses. The message may
contain privileged information and/or be legally protected. You can
only reproduce or distribute this material if you are specifically
authorized to do so. 
  
If you are not the intended recipient, any use, disclosure or copying
of this e-mail (and any attachments) is unauthorized. If you have
received this e-mail in error, please immediately delete it and any
copies of it from your system and notify us via e-mail at [EMAIL PROTECTED].
Thank you.
  


  

  






RE: RE: [Tobago] Ajax with Tobago

2007-01-23 Thread H. Swaczinna
I don't think so, but I havn't tried. Can you put both panels in another panel?If not, you can try to call Tobago.reloadComponent() directly from _javascript_ for bothpanels.Helmut




Can you have two panels that are refreshed from the same 
toolBarCommand? I appear to get intermittent non-refresh behavior with this 
syntax:

t:toolBarCommand label="Refresh" 
action="" image="images/view-refresh.jpg" tip="Refresh list 
of quarantined messages" id="quarantineCmdRefresh" 
 t:attribute 
name="renderedPartially" 
value=":mainPage:quarantineInfoPanel"/ 
t:attribute name="renderedPartially" 
value=":mainPage:quarantineSheetPanel"//t:toolBarCommand


From: H. Swaczinna 
[mailto:[EMAIL PROTECTED] Sent: Tuesday, January 23, 2007 
4:06 AMTo: users@myfaces.apache.orgSubject: RE: [Tobago] 
Ajax with Tobago
Hi,if you want to reload a component or a part of a page via 
Ajax, you can use the"renderedPartially" attribute. This can be add to 
buttons, links or command tags.The value of the attribute is the id of the 
component to reload.Example: tc:button 
label="" id="nextTabButton" 
action="" 
tc:attribute 
name="renderedPartially" 
value=":mainPage:detailView:panel"/ 
/tc:buttonWhen the button is clicked, Tobago first submits the 
contents of the panel identified by":mainPage:detailView:panel", then 
executes the action "#{mainController.nextTabAction}" andfinally rerenders 
and reloads the panel. This works not only with panels, but I can't say 
exactlywhich components do work. But at least, you can always put a panel 
around other components.RegardsHelmut

  
  


  

  
  Hi All,Can u say where can i exactly use Ajax with 
  Tobago.Which components will help me to use Ajax 
  ?Regards,Madan
  
  Here’s a new way to find what you're looking for - Yahoo! 
  Answers 



RE: Re: [Tobago] How to initial focus

2007-01-20 Thread H. Swaczinna
Hello Volker,

I don't think, value binding works. Example:

Jsp:

tc:page id=mainPage width=1020px height=600px
focusId=#{mainController.fieldId}
label=#{mainController.fieldId}
...

MainContoller:

  public String getFieldId() {
getLog().debug(getFieldId: mainPage:headView:programm);
return mainPage:headView:programm;
  }

I can see the debug output from getFieldId() only once and I can see
the correct field id in the browser title. The focus is set to the
first field (which is not the desired field).

This works:

tc:page id=mainPage width=1020px height=600px
focusId=mainPage:headView:programm


Regards
Helmut



Hi Helmut,

the focusId attribute supports valuebinding, but the value must be the
clientId of the component. This means the id prefixed by the ids of
namingContainers, at leas by the id of the page. This should be
improved to be handled like for attributes, ge do a findComponent() to
examine the clientId.

And yes there is a bug in the javascript, empty string or every
illegal value forces the default behavior. please add a jira entry.

Regards,
  volker



2007/1/19, H. Swaczinna [EMAIL PROTECTED]:
 Hi,

 I want to set the initial focus when the page is loaded programmaticly,
 determined by a bean property. I've found no way to do this.
 The focusId attribute of tc:page doesn't allow value bindings (right?)
 So I set the focus via javascript in the onload attribute of tc:script.
 This sets the focus to the desired field, but afterwords, the focus
 is reset to the first field on the page. Even when I set focusId to
 the empty string. The doc says, setting focusId to the empty string
 disables automatic focus setting. So this seems to be a bug to me.

 Regards
 Helmut



RE: [Tobago] f:verbatim in tc:tabGroup

2007-01-20 Thread H. Swaczinna
Hello again,

here's a simple example:

%@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc 
%%@ taglib uri=http://java.sun.com/jsf/core; prefix=f 
%%@ page contentType=text/html;charset=UTF-8 language=java 
%%@ page pageEncoding=UTF-8
%f:view
 tc:page label=Test width=200px height=100px
tc:tabGroup switchType=reloadTab
  tc:tab label=Tab1 
tc:out value=You can see initialy this line/
f:verbatimhr//f:verbatim
  /tc:tab   
  tc:tab label=Tab2 
tc:out value=but not this/
f:verbatimhr//f:verbatim
  /tc:tab 
/tc:tabGroup
  /tc:page
/f:view

Can you check this please. Should I add a jira issue for this?

Regards
Helmut




Hello,

I want to display a horizontal line on a tab in tabGroup with
switchType=realodTab. I used this line from the tobago demo:

f:verbatimhr//f:verbatim

But the line is not shown, when I switch to this tab. But it appears, 
when I reload the whole page. So it looks like f:verbatim (or hr) doesn't 
work with Ajax reloading.

Regards
Helmut


[Tobago] How to initial focus

2007-01-19 Thread H. Swaczinna
Hi,

I want to set the initial focus when the page is loaded programmaticly,
determined by a bean property. I've found no way to do this.
The focusId attribute of tc:page doesn't allow value bindings (right?)
So I set the focus via javascript in the onload attribute of tc:script.
This sets the focus to the desired field, but afterwords, the focus
is reset to the first field on the page. Even when I set focusId to
the empty string. The doc says, setting focusId to the empty string
disables automatic focus setting. So this seems to be a bug to me.

Regards
Helmut


[Tobago] f:verbatim in tc:tabGroup

2007-01-17 Thread H. Swaczinna
Hello,

I want to display a horizontal line on a tab in tabGroup with
switchType=realodTab. I used this line from the tobago demo:

f:verbatimhr//f:verbatim

But the line is not shown, when I switch to this tab. But it appears, 
when I reload the whole page. So it looks like f:verbatim (or hr) doesn't 
work with Ajax reloading.

Regards
Helmut


RE: Re: [Tobago] Problems with Tobago.reloadComponent with onclick

2007-01-13 Thread H. Swaczinna
Hello Volker,

will Tobago.reloadComponent() be supported in the future or will it
be removed silently someday? I've used it in some places and I can't
replace it with renderedPartially in all cases.

Regards
Helmut


Hi John,

which version of tobago?

the onclick=Tobago.reloadComponent(clientId, '@autoId')/ should
work (afaik), but is not the intended way to code ajax reload (this
was a interim solution).

anyway, the 'messageCount' is not a valid clientId, and tc:in is not
ajax reloadable.

the clientId is build from ids of namingcontainers, at least tc:page,
and the id of the component, so a valid clientId has at last on colon.

to reload the content of a tx:in you can surround it by a tc:panel e.g
(in the intended way):

tc:page id=page/

  tc:panel id=panel
tx:in .../
  /tx:panel

  tc:button ...
tc:attribute name=renderedPartially value=:page:panel/
  /tc:button

/tc:page


see the colon before 'page:panel' to make the clientId absolute.

regards,

Volker


2007/1/12, John [EMAIL PROTECTED]:


 When I use the onclick as follows (per a previous message from Volker), I
 get the following error in IE.

 t:toolBarCommand label=Refresh action=#{quarantine.refresh}
 image=images/view-refresh.jpg tip=Refresh list of quarantined messages
 id=quarantineCmdRefresh onclick=Tobago.reloadComponent('messageCount',
 '@autoId')/


 Line: 582
 Char: 7
 Error: Object doesn't support this property or method
 Code:0


 If I remove the onclick part it works fine (but of course I can't use the
 AJAX dynamic updating of my tx:in  component

 Thanks,
 John


[Tobago] onchange has no effect in tc:selectBooleanCheckbox

2007-01-11 Thread H. Swaczinna
Hello,

the onchange attribute of tc:selectBooleanCheckbox has no effect.
It is not rendered into the HTML code. HTML allows onChange for
checkboxes.

Regards
Helmut


RE: Re: [Tobago] onchange has no effect in tc:selectBooleanCheckbox

2007-01-11 Thread H. Swaczinna
Hello Volker,

thanks for the tip, but this is not what I want. First, tc:command 
forces always a submit of the page, and second it doesn't work like 
documented.

tc:selectBooleanCheckbox id=nacherwerb
  value=#{rechteController.nacherwerb}
  f:facet name=change
tc:command 
onclick=javascript:alert('#{rechteController.nacherwerb}')/
  /f:facet
/tc:selectBooleanCheckbox

The javascript code is not executed. Maybe onclick is not the
appropriate attribute for a change facet, but there no onchange
in tc:command.

I simply want to execute some javascript, when the checkbox is toggled.

Regards
Helmut


Hi Helmut,

please use a f:facet name=change with a tc:command.

afaik the attribute is deprecated and will remvoed in a future release.

Regards,

  Volker

2007/1/11, H. Swaczinna [EMAIL PROTECTED]:
 Hello,

 the onchange attribute of tc:selectBooleanCheckbox has no effect.
 It is not rendered into the HTML code. HTML allows onChange for
 checkboxes.

 Regards
 Helmut



RE: Re: [Tobago] onchange has no effect in tc:selectBooleanCheckbox

2007-01-11 Thread H. Swaczinna
Hello Bernd,

I thought about a workaround for the missing readonly for checkboxes.
Simply reset the value via javascript in the onChangle handler.
This seems to be obsolet now, with your fix.

But there're other thinkable common usecases. For example enable or
disable input fields when the checkbox is toggled. This can be easily
done via javascript in an onChange handler. 

Or reload the content of a select list of a combobox. I think, this
can be done via tc:command. How can I do this without submitting and
reloading the page? How do I use partial rendering?

Regards
Helmut


Hello Helmut,

the page can rendered partially.

Can you describe your use case?

Regards

Bernd

H. Swaczinna wrote:
 Hello Volker,
 
 thanks for the tip, but this is not what I want. First, tc:command 
 forces always a submit of the page, and second it doesn't work like 
 documented.
 
 tc:selectBooleanCheckbox id=nacherwerb
   value=#{rechteController.nacherwerb}
   f:facet name=change
 tc:command 
onclick=javascript:alert('#{rechteController.nacherwerb}')/
   /f:facet
 /tc:selectBooleanCheckbox
 
 The javascript code is not executed. Maybe onclick is not the
 appropriate attribute for a change facet, but there no onchange
 in tc:command.
 
 I simply want to execute some javascript, when the checkbox is toggled.
 
 Regards
 Helmut
 
 
 Hi Helmut,

 please use a f:facet name=change with a tc:command.

 afaik the attribute is deprecated and will remvoed in a future release.

 Regards,

  Volker

 2007/1/11, H. Swaczinna [EMAIL PROTECTED]:
 Hello,

 the onchange attribute of tc:selectBooleanCheckbox has no effect.
 It is not rendered into the HTML code. HTML allows onChange for
 checkboxes.

 Regards
 Helmut




AW: Re: AW: Re: AW: Re: [Tobago] Problem with input validation and tab group (again)

2007-01-10 Thread H. Swaczinna
Hello Bernd,

I'll test this and the other issue tomorrow morning after the nightly
build.

Regards
Helmut


Hello Helmut,

I add all pending changes to tabGroup.

Can you test the tabGroup, please.

Please add a comment to

https://issues.apache.org/jira/browse/TOBAGO-237

Regards

Bernd


Bernd Bohmann wrote:
 Hello Helmut,
 
 I forgot to unified activeIndex and state they point to the same 
 feature. I add a simple fix for this until I'm finished.
 
 I start the nigthly build.
 
 Regards
 
 Bernd
 
 H. Swaczinna wrote:
 Hello Bernd,

 there's nothing going wrong in the page. I can provide a simple
 example to you, where reloadPage doesn't work.

 test.jsp:

 %@ taglib uri=http://myfaces.apache.org/tobago/component; 
 prefix=tc %%@ taglib uri=http://java.sun.com/jsf/core; prefix=f 
 %%@ page contentType=text/html;charset=UTF-8 language=java %%@ 
 page pageEncoding=UTF-8
 f:view
  tc:page label=Test width=200px height=100px
 tc:tabGroup switchType=reloadPage  
 state=#{mainController.selectedTab}
   tc:tab label=Tab1 tc:out value=Tab1/
   /tc:tab tc:tab label=Tab2 tc:out 
 value=Tab2/
   /tc:tab tc:tab label=Tab3 tc:out 
 value=Tab3/
   /tc:tab   /tc:tabGroup
   /tc:page
 /f:view

 MainContoller.java:

   public int getSelectedTab() {
 getLog().debug(getSelectedTab:  +  selectedTab);
 return selectedTab;
   }

   public void setSelectedTab(int selectedTab) {
 getLog().debug(setSelectedTab:  +  selectedTab);
 this.selectedTab = selectedTab;
   }


 The log:

 2007-01-08 22:43:08 http-8080-Processor25 DEBUG - 
 de.wlps.ndr.workflow.gena.webapp.web.MainController:342 - 
 setSelectedTab: 0
 2007-01-08 22:43:08 http-8080-Processor25 DEBUG - 
 de.wlps.ndr.workflow.gena.webapp.web.MainController:337 - 
 getSelectedTab: 0

 When I remove the state attribute from the tabGroup 
 (state=#{mainController.selectedTab}), switching tabs is possible.

 Regards
 Helmut

 Hello Helmut,

 I move switching the tab to the INVOKE_APPLICATION phase instead of 
 the UPDATE_MODEL_VALUES phase. Looks like something on the page goes 
 wrong in the UPDATE_MODEL_VALUES phase.

 Can you verify this, please.

 Regards

 Bernd

 H. Swaczinna wrote:
 Hello Bernd,

 thank you for fixing this bug. But there's a new bug now:
 switchType=reloadPage doesn't work anymore. Switching tabs
 is not possible at all.

 Regards
 Helmut



 Hello Helmut,

 i think this is a bug. Can you add a jira issue please?

 Thanks

 Bernd

 H. Swaczinna wrote:
 Hello,

 I've got a problem with input validation in a tabGroup with 
 switchType=reloadTab. When I enter an invalid value in an input 
 field
 on a tab, I can switch to another tab. The validation of the field is
 excuted and failes, but switching tabs is not blocked. When I switch
 back to the tab with the invalid field, the field is not marked as
 invalid.

 With switchType=reloadPage, I cannot the switch to another tab 
 and the
 field is marked as invalid. This is, what I'm expecting.

 I'm using the current 1.0.10 snapshot.

 Regards
 Helmut





[Tobago] readonly has no effect in tc:selectBooleanCheckbox

2007-01-10 Thread H. Swaczinna
Hello,

the readonly attribute of tc:selectBooleanCheckbox has no effect.
It is not rendered into the HTML code.

Regards
Helmut


[Tobago] How to handle error during Ajax requests

2007-01-10 Thread H. Swaczinna
Hello,

when an Ajax request failes, for example in a tabGroup with switchType 
reloadTab, I always see this message:

Server Error: Fehler beim Bearbeiten der Anfrage. M�glicherweise ein Session 
Timeout!

Is there a possibility to change (the ö) or customize this message? Or 
handle the error in a better way?

Regards
Helmut


AW: Re: [Tobago] How to use TabChangeListener?

2007-01-08 Thread H. Swaczinna
Hello Bernd!


is the GenaTabChangeListener instance of TabChangeListener?

Yes, of course.

public class GenaTabChangeListener implements TabChangeListener {

With the binding attribute you can point directly to a managed bean.

Do you mean this binding attributte?

   binding=#{mainController.tabChangeListener}/

But setTabChangeListener() in my managed bean (mainController) is not 
called, when a new TabChangeListener instance is created. Only the first 
time.

Regards
Helmut


H. Swaczinna wrote:
 Hello,
 
 I've set in my tabGroup a TabChangeListener
 
   tc:tabGroup switchType=reloadPage  
 binding=#{mainController.tabGroup}
 state=#{mainController.selectedTab}
 tc:tabChangeListener 
type=de.wlps.ndr.workflow.common.webapp.web.GenaTabChangeListener
   binding=#{mainController.tabChangeListener}/
 
 But every time the processTabChange() method is called, a new instance
 of GenaTabChangeListener is created. And this instance is not set
 via the binding in my backing bean. Even if I create the TabChangeListener 
 in the getTabChangeListener() method, there's always a new one created. 
 So the backing bean doesn't know the TabChangeListener and vice versa. 
 How do I access the backing bean from a TabChangeListener? For example to 
 store data entred in a tab when the user switches to another tab. Is it 
 possible to declare the TabChangeListener as a managed bean in 
 faces-config.xml?
 
 Regards
 Helmut



AW: Re: [Tobago] Problem with input validation and tab group (again)

2007-01-08 Thread H. Swaczinna
Hello Bernd,

thank you for fixing this bug. But there's a new bug now:
switchType=reloadPage doesn't work anymore. Switching tabs
is not possible at all.

Regards
Helmut



Hello Helmut,

i think this is a bug. Can you add a jira issue please?

Thanks

Bernd

H. Swaczinna wrote:
 Hello,
 
 I've got a problem with input validation in a tabGroup with 
 switchType=reloadTab. When I enter an invalid value in an input field
 on a tab, I can switch to another tab. The validation of the field is
 excuted and failes, but switching tabs is not blocked. When I switch
 back to the tab with the invalid field, the field is not marked as
 invalid.
 
 With switchType=reloadPage, I cannot the switch to another tab and the
 field is marked as invalid. This is, what I'm expecting.
 
 I'm using the current 1.0.10 snapshot.
 
 Regards
 Helmut



  1   2   >