[ANNOUNCE] Apache Tobago 2.4.2 released

2020-02-17 Thread Volker Weber
The Apache MyFaces team is pleased to announce the release of Apache
Tobago 2.4.1.

Apache Tobago is a component library for JavaServer Faces (JSF) that
allows to write web-applications without the need of coding HTML, CSS
and JavaScript

Main features


Tobago 2.4.2
* Bugfixes


Please check the release notes for each version at these URLs for a full
list of the changes:

https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310273=12345177


For more information about Apache Tobago, please visit
http://myfaces.apache.org/tobago/.

Have fun,
-The MyFaces team


Re: [Tobago] f:ajax inside tc:in event="keyup"

2018-08-21 Thread Volker Weber
Hi Dennis,

Am Mo., 20. Aug. 2018 um 18:50 Uhr schrieb Dennis Kieselhorst <
d...@apache.org>:

>
> I see, I'm not sure if this is really the intended behaviour.
>
> @Udo, Henning what do you think?
>
> Cheers
> Dennis
>

I'm not sure about your question, is it about the behavior of the
"onchange" event? I think this works like intended. It makes no sense to
fire this event at a text input on every keypress, even if each keypress
changes the content.

Regards,
  Volker



-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de


Re: TRINIDAD Api/Impl release date

2016-03-31 Thread Volker Weber
Hi,

2016-03-31 6:07 GMT+02:00 Keertipati, Gopichand <
gopichand.keertip...@in.pega.com>:

> Hi,
>
>
> I am interested in Trinindad updates , I need information for some
> questions
>
> 1. What is the latest version of trinidad api / impl ?
> 2. From where can i download the latest version of trinidad api / impl
> (Please provide me the link) ?
>

http://myfaces.apache.org/trinidad/index.html
http://myfaces.apache.org/trinidad/download.html

Regards,
Volker


> 3. If Trinidad 2.1.1 is not released yet, when are you planning to release
> it ?
>
>
> Regards,
> Gopi
>
>


-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de


Re: Distinguish if parameters are sent by POST or GET

2015-03-18 Thread Volker Weber
Hi Georg,

in ServletContext you can use HttpServletRequest.getMethod():
  ((HttpServletRequest)
FacesContext.getCurrentInstance().getExternalContext().getRequest()).getMethod()

regards,

Volker




2015-03-18 15:46 GMT+01:00 Georg Füchsle giofy...@googlemail.com:

 Hallo Max,

 Thanks for replying. My attempt did not work:

 I want distinguish GET and POST inside a PhaseListener.

 In the PhaseListener I receive the FacesContext from the PhaseEvent. I also
 tried to receive the FacesContext from static:

 public void beforePhase(PhaseEvent event)
 {
if (event.getPhaseId() == PhaseId.RESTORE_VIEW)
 {

 ExternalContext extCtx =
 event.getFacesContext().getExternalContext();

 boolean post1 = FacesContext.getCurrentInstance().isPostback();

 boolean post2 = event.getFacesContext().isPostback();

 logger.info(post1:  + post1 +- post2:  + post2);



 Called With Get:
 http://localhost:8080/TextTool/pages/start/texttool.jsf?BEDIENER=Gio
 15:41:04,609 INFO  [jsf.StartPhaseListener] (default task-60)
 *post1: false   - post2: false*

 Called with POST from a form:
 15:42:09,045 INFO  [jsf.StartPhaseListener] (default task-69) *post1:
 false   - post2: false*


 What do I do wrong?

 Gio

 2015-03-18 15:18 GMT+01:00 Max Starets max.star...@oracle.com:

  Georg,
 
  Have you tried isPostback() on FacesContext? If you are not including
 view
  state as one of the parameters, it will return false for GET requests.
 
  Max
 
 
  On 3/18/2015 9:19 AM, Georg Füchsle wrote:
 
  Hallo!
 
  Is it possible to see if a parameter read in my jsf-app was sent by post
  or
  by get?
 
  My webapp should be startet calling a starturl with some post
 parameters.
  I
  would like to forebid the use of get parameters. is it possible?
 
  thanks
 
  Gio
 
 
 




-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de


Re: [TOBAGO] Problem with building a UISheet

2014-04-23 Thread Volker Weber
Hi Michael,

the sheet iterates over a collection of objects. You need to set the sheets
value with this collection.

regards,

  Volker



2014-04-23 10:36 GMT+02:00 Michael Linke michaelli...@me.com:

 Hello!

 I'm have some problems with creating a Table. I want to create a dynamic
 table with some columns in it.

 Here is my simplified code:

 UIColumn col = (UIColumn)
 FacesContext.getCurrentInstance().getApplication().createComponent(UIColumn.COMPONENT_TYPE);
 col.setBorderLeft(Measure.valueOf(1));
 col.setBorderRight(Measure.valueOf(1));
 col.setPaddingLeft(Measure.valueOf(1));
 col.setPaddingRight(Measure.valueOf(1));
 col.setId(ID);
 col.setLabel(Label);

 UIOut element = (UIOut)
 FacesContext.getCurrentInstance().getApplication().createComponent(UIOut.COMPONENT_TYPE);
 element.setId(ID_Element);
 element.setValue(Test);

 col.getChildren().add(element);

 sheet.getChildren().add(col);
 sheet.setColumns(150px);



 The result is that I get a Table with one column (as expected) but without
 the out-Element.
 Any Ideas whats wrong?

 I'm using Tobago 1.5.10.


 Bets Regards,

 Michael




-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de


Re: [Tobago] Image resizing

2013-11-21 Thread Volker Weber
Hi Hani,

i think this is a performance issue but i found a solution:

tc:column id=barChart sortable=false align=left
  tc:panel
f:facet name =layout
  tc:flowLayout /
/f:facet
tc:image value=#{item.gauge.resourcePath}
width=#{item.gauge.width}
   height=16 /
  tc:panel
/tc:column

this works in the demo.

Regards,
  Volker



2013/11/21 Volker Weber v.we...@inexso.de

 Hi Hani,

 i see the problem. The valueBinding for the width is evaluated only once,
 and this value is used for all rows.
 I think Udo should have a look at this. Please file a jira issue.

 Regards,
   Volker


 2013/11/21 Abushammala, Hani (EXTERN: BERIS) 
 extern.hani.abushamma...@volkswagen.de

 Hi Volker,

 try to get the image width from the bean or from the var object. The
 image will not be displayed.

 Regards,
 Hani

 Von: weber.vol...@googlemail.com [mailto:weber.vol...@googlemail.com] Im
 Auftrag von Volker Weber
 Gesendet: Mittwoch, 20. November 2013 18:14
 An: MyFaces Discussion
 Betreff: Re: [Tobago] Image resizing

 Hi Hani,
 i can't reproduce the problem in the demo (alpha-3-SNAPSHOT).
 The width and height attributes of the image works in the sheet.
 I have attached a diff for the demo.
 Regards,
   Volker

 2013/11/20 Abushammala, Hani (EXTERN: BERIS) 
 extern.hani.abushamma...@volkswagen.demailto:
 extern.hani.abushamma...@volkswagen.de
 Hi Volker,

 thanks for the hint. I tried this way already, but it doesn't work.  The
 image could be displayed with fixed width.

 Any ideas?

 Regards,
 Hani


 -Ursprüngliche Nachricht-
 Von: weber..com [mailto:weber..commailto:
 weber..com] Im Auftrag von Volker Weber
 Gesendet: Mittwoch, 20. November 2013 09:38
 An: MyFaces Discussion
 Betreff: Re: [Tobago] Image resizing

 Hi,

 the content of the column gets the width from the sheets column attribute.
 You should wrap the image into a panel:

 tc:column id=barChart sortable=false align=left
   tc:panel
 f:facet name =layout
   tc:gridlayout rows=16px columns=#{item.gauge.width}
 /f:facet
  tc:image value=#{item.gauge.resourcePath} /
   tc:panel
 /tc:column

 Regards,

   Volker



 2013/11/14 Abushammala, Hani (EXTERN: BERIS) 
 ext.a...@demailto:ext.a...@de

  Hi,
 
  I need help to resolve a layout problem.
 
  In our application we display a bar chart within the sheet, but the used
  image for the chart could not be dynamically resized after migration
 from
  Tobago 1.0.39 to 2.0.0 alpha 1. We tried many ways to display an
 image
  or panel with dynamic width within the sheet, but it doesn't work,
 because
  the width variable could not be called from bean.
 
 
  Example:
  tc:sheet id=sheet var=item
  value=#{bean.items}
  columns=60px;60px;200px
  tc:column label=MIN
  id=min sortable=true align=center
  tc:out value=#{item.minValue} id=t_min /
  /tc:column
  tc:column label=MAX
  id=max sortable=true align=center
  tc:out value=#{item.maxValue} id=t_max /
  /tc:column
  tc:column id=barChart sortable=false align=left
  tc:image value=#{item.gauge.resourcePath}
  width=#{item.gauge.width}
  height=16 /
  /tc:column
  /tc:sheet
 
  Here the image will be resized automatically to 200px.
 
  Any ideas?
 
 
 
  The application details:
  tobago-core-2.0.0-alpha-1.jar
  myfaces-impl-2.1.12.jar
  myfaces-api-2.1.12.jar
  Browser: Firefox 22.0
 
  Regards,
  Hani
 
 
 
  Regards,
  Hani
 
 
 


 --
 inexso - information exchange solutions GmbH
 Ofener Straße 30 | 26121 Oldenburg
 www.inexso.dehttp://www.inexso.de



 --
 inexso - information exchange solutions GmbH
 Ofener Straße 30 | 26121 Oldenburg
 www.inexso.dehttp://www.inexso.de




 --
 inexso - information exchange solutions GmbH
 Ofener Straße 30 | 26121 Oldenburg
 www.inexso.de




-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de


Re: [Tobago] Image resizing

2013-11-21 Thread Volker Weber
Hi Hani,

i see the problem. The valueBinding for the width is evaluated only once,
and this value is used for all rows.
I think Udo should have a look at this. Please file a jira issue.

Regards,
  Volker


2013/11/21 Abushammala, Hani (EXTERN: BERIS) 
extern.hani.abushamma...@volkswagen.de

 Hi Volker,

 try to get the image width from the bean or from the var object. The image
 will not be displayed.

 Regards,
 Hani

 Von: weber.vol...@googlemail.com [mailto:weber.vol...@googlemail.com] Im
 Auftrag von Volker Weber
 Gesendet: Mittwoch, 20. November 2013 18:14
 An: MyFaces Discussion
 Betreff: Re: [Tobago] Image resizing

 Hi Hani,
 i can't reproduce the problem in the demo (alpha-3-SNAPSHOT).
 The width and height attributes of the image works in the sheet.
 I have attached a diff for the demo.
 Regards,
   Volker

 2013/11/20 Abushammala, Hani (EXTERN: BERIS) 
 extern.hani.abushamma...@volkswagen.demailto:
 extern.hani.abushamma...@volkswagen.de
 Hi Volker,

 thanks for the hint. I tried this way already, but it doesn't work.  The
 image could be displayed with fixed width.

 Any ideas?

 Regards,
 Hani


 -Ursprüngliche Nachricht-
 Von: weber..com [mailto:weber..commailto:
 weber..com] Im Auftrag von Volker Weber
 Gesendet: Mittwoch, 20. November 2013 09:38
 An: MyFaces Discussion
 Betreff: Re: [Tobago] Image resizing

 Hi,

 the content of the column gets the width from the sheets column attribute.
 You should wrap the image into a panel:

 tc:column id=barChart sortable=false align=left
   tc:panel
 f:facet name =layout
   tc:gridlayout rows=16px columns=#{item.gauge.width}
 /f:facet
  tc:image value=#{item.gauge.resourcePath} /
   tc:panel
 /tc:column

 Regards,

   Volker



 2013/11/14 Abushammala, Hani (EXTERN: BERIS) 
 ext.a...@demailto:ext.a...@de

  Hi,
 
  I need help to resolve a layout problem.
 
  In our application we display a bar chart within the sheet, but the used
  image for the chart could not be dynamically resized after migration from
  Tobago 1.0.39 to 2.0.0 alpha 1. We tried many ways to display an
 image
  or panel with dynamic width within the sheet, but it doesn't work,
 because
  the width variable could not be called from bean.
 
 
  Example:
  tc:sheet id=sheet var=item
  value=#{bean.items}
  columns=60px;60px;200px
  tc:column label=MIN
  id=min sortable=true align=center
  tc:out value=#{item.minValue} id=t_min /
  /tc:column
  tc:column label=MAX
  id=max sortable=true align=center
  tc:out value=#{item.maxValue} id=t_max /
  /tc:column
  tc:column id=barChart sortable=false align=left
  tc:image value=#{item.gauge.resourcePath}
  width=#{item.gauge.width}
  height=16 /
  /tc:column
  /tc:sheet
 
  Here the image will be resized automatically to 200px.
 
  Any ideas?
 
 
 
  The application details:
  tobago-core-2.0.0-alpha-1.jar
  myfaces-impl-2.1.12.jar
  myfaces-api-2.1.12.jar
  Browser: Firefox 22.0
 
  Regards,
  Hani
 
 
 
  Regards,
  Hani
 
 
 


 --
 inexso - information exchange solutions GmbH
 Ofener Straße 30 | 26121 Oldenburg
 www.inexso.dehttp://www.inexso.de



 --
 inexso - information exchange solutions GmbH
 Ofener Straße 30 | 26121 Oldenburg
 www.inexso.dehttp://www.inexso.de




-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de


Re: [Tobago] Image resizing

2013-11-20 Thread Volker Weber
Hi,

the content of the column gets the width from the sheets column attribute.
You should wrap the image into a panel:

tc:column id=barChart sortable=false align=left
  tc:panel
f:facet name =layout
  tc:gridlayout rows=16px columns=#{item.gauge.width}
/f:facet
 tc:image value=#{item.gauge.resourcePath} /
  tc:panel
/tc:column

Regards,

  Volker



2013/11/14 Abushammala, Hani (EXTERN: BERIS) 
extern.hani.abushamma...@volkswagen.de

 Hi,

 I need help to resolve a layout problem.

 In our application we display a bar chart within the sheet, but the used
 image for the chart could not be dynamically resized after migration from
 Tobago 1.0.39 to 2.0.0 alpha 1. We tried many ways to display an image
 or panel with dynamic width within the sheet, but it doesn't work, because
 the width variable could not be called from bean.


 Example:
 tc:sheet id=sheet var=item
 value=#{bean.items}
 columns=60px;60px;200px
 tc:column label=MIN
 id=min sortable=true align=center
 tc:out value=#{item.minValue} id=t_min /
 /tc:column
 tc:column label=MAX
 id=max sortable=true align=center
 tc:out value=#{item.maxValue} id=t_max /
 /tc:column
 tc:column id=barChart sortable=false align=left
 tc:image value=#{item.gauge.resourcePath}
 width=#{item.gauge.width}
 height=16 /
 /tc:column
 /tc:sheet

 Here the image will be resized automatically to 200px.

 Any ideas?



 The application details:
 tobago-core-2.0.0-alpha-1.jar
 myfaces-impl-2.1.12.jar
 myfaces-api-2.1.12.jar
 Browser: Firefox 22.0

 Regards,
 Hani



 Regards,
 Hani





-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de


Re: [Tobago] Image resizing

2013-11-20 Thread Volker Weber
Hi Hani,

i can't reproduce the problem in the demo (alpha-3-SNAPSHOT).
The width and height attributes of the image works in the sheet.
I have attached a diff for the demo.

Regards,
  Volker


2013/11/20 Abushammala, Hani (EXTERN: BERIS) 
extern.hani.abushamma...@volkswagen.de

 Hi Volker,

 thanks for the hint. I tried this way already, but it doesn't work.  The
 image could be displayed with fixed width.

 Any ideas?

 Regards,
 Hani


 -Ursprüngliche Nachricht-
 Von: weber..com [mailto:weber..com] Im Auftrag von Volker
 Weber
 Gesendet: Mittwoch, 20. November 2013 09:38
 An: MyFaces Discussion
 Betreff: Re: [Tobago] Image resizing

 Hi,

 the content of the column gets the width from the sheets column attribute.
 You should wrap the image into a panel:

 tc:column id=barChart sortable=false align=left
   tc:panel
 f:facet name =layout
   tc:gridlayout rows=16px columns=#{item.gauge.width}
 /f:facet
  tc:image value=#{item.gauge.resourcePath} /
   tc:panel
 /tc:column

 Regards,

   Volker



 2013/11/14 Abushammala, Hani (EXTERN: BERIS) 
 ext.a...@de

  Hi,
 
  I need help to resolve a layout problem.
 
  In our application we display a bar chart within the sheet, but the used
  image for the chart could not be dynamically resized after migration from
  Tobago 1.0.39 to 2.0.0 alpha 1. We tried many ways to display an
 image
  or panel with dynamic width within the sheet, but it doesn't work,
 because
  the width variable could not be called from bean.
 
 
  Example:
  tc:sheet id=sheet var=item
  value=#{bean.items}
  columns=60px;60px;200px
  tc:column label=MIN
  id=min sortable=true align=center
  tc:out value=#{item.minValue} id=t_min /
  /tc:column
  tc:column label=MAX
  id=max sortable=true align=center
  tc:out value=#{item.maxValue} id=t_max /
  /tc:column
  tc:column id=barChart sortable=false align=left
  tc:image value=#{item.gauge.resourcePath}
  width=#{item.gauge.width}
  height=16 /
  /tc:column
  /tc:sheet
 
  Here the image will be resized automatically to 200px.
 
  Any ideas?
 
 
 
  The application details:
  tobago-core-2.0.0-alpha-1.jar
  myfaces-impl-2.1.12.jar
  myfaces-api-2.1.12.jar
  Browser: Firefox 22.0
 
  Regards,
  Hani
 
 
 
  Regards,
  Hani
 
 
 


 --
 inexso - information exchange solutions GmbH
 Ofener Straße 30 | 26121 Oldenburg
 www.inexso.de




-- 
inexso - information exchange solutions GmbH
Ofener Straße 30 | 26121 Oldenburg
www.inexso.de
Index: tobago-example/tobago-example-demo/src/main/webapp/content/02-sheet/sheet.xhtml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+UTF-8
===
--- tobago-example/tobago-example-demo/src/main/webapp/content/02-sheet/sheet.xhtml	(revision 1543882)
+++ tobago-example/tobago-example-demo/src/main/webapp/content/02-sheet/sheet.xhtml	(revision )
@@ -127,7 +127,7 @@
 /tc:panel
 
 tc:sheet value=#{demo.solarList} id=sheet
-  columns=3*;1*;3*;3*;3*;3* var=luminary
+  columns=3*;1*;3*;3*;3*;200px;3* var=luminary
   state=#{demo.sheetState}
   showHeader=#{overviewController.sheetConfig.sheetShowHeader}
   showPagingAlways=#{overviewController.sheetConfig.showPagingAlways}
@@ -175,6 +175,9 @@
   /tc:column
   tc:column label=#{overviewBundle.solarArrayDistance} sortable=true align=right id=distance
 tc:out value=#{luminary.distance} id=t_distance/
+  /tc:column
+  tc:column label=image 
+tc:image value=image/feather-leaf.png height=16 width=100/
   /tc:column
   tc:column label=#{overviewBundle.solarArrayPeriod} sortable=true align=right id=period
 tc:out value=#{luminary.period} id=t_period/


Re: [TOBAGO] - Use a button in a PopUp

2012-04-21 Thread Volker Weber
Hi,

i think, but not sure, the problem is the popup inside the sheet.

try define the popup outside the sheet and open it via
tc:popupReference in the button.


Regards,
Volker



Am 20. April 2012 14:57 schrieb AM greenm...@gmail.com:
 Hello!

 I'd like to insert into a method of my controller, when i click on the
 last button (labeled as This Button doesn't work)
 I have following jsp-code:

 tc:sheet  

        tc:column ../tc:column

        tc:column

           tc:panel

               tc:button label=But1
 actionListener=#{Controller.doAnything}

                    f:facet name=popup

                        tc:popup width=500 height=300

                            tc:box label=TXT

                                f:facet name=layout
                                    tc:gridLayout columns=*
 rows=fixed;*;fixed/
                                /f:facet

                                tx:textarea label=Input1 /

                                tc:panel

                                    f:facet name=layout
                                        tc:gridLayout
 columns=*;fixed;fixed rows=fixed/
                                    /f:facet

                                    tc:out/

                                    tc:button label=This Button
 doesn't work action=#{Controller.doImportantStuff}
                                        tc:attribute
 name=popupClose value=afterSubmit /
                                    /tc:button
 close tags/

 In debugging mode, nothing happens, it looks like i dont have coded
 any action on this button =/

 Thanks a lot for spending your time to help me!



-- 
inexso - information exchange solutions GmbH
Ofener Str. 30      | 26121 Oldenburg
Tel.: +49 441 219 730 0 |
FAX:  +49 441 219 730 66 | eMail: v.we...@inexso.de

Firmensitz: Oldenburg | Amtsgericht Oldenburg HRB 205251
Geschäftsführer: Stefan Schulte, Michael Terschüren


Re: [tobago] Get how to change selected tab

2012-03-28 Thread Volker Weber
Hi Armin,

first: please prefix the subject with [tobago] for tobago specific questions.

what did the Button do? If you set the tabId = 0 in the code, the
Tabgroup should render first tab. Didn't this work? which tobago
version?


Regards,
Volker

Am 28. März 2012 13:31 schrieb AM greenm...@gmail.com:
 I have 3 Tabs in a tabGroup.

 When i am on the third tab and i click there on a button i want to go
 back to the first tab automatically.

 Code:

 tc:tabGroup id=tabs rendered=#{controller.anotherId != 0}
 selectedIndex=#{controller.tabId} 

                tc:tab label=ABC
                  /tc:tab

                    tc:tab label=DEF
                   /tc:tab

                    tc:tab label=GHI
                   /tc:tab
 /tc:tabGroup

 in my java-code i have gettersetter for tabId.
 whith this solution, i have to click twice on the button to return to
 the first tab.



-- 
inexso - information exchange solutions GmbH
Ofener Str. 30      | 26121 Oldenburg
Tel.: +49 441 219 730 0 |
FAX:  +49 441 219 730 66 | eMail: v.we...@inexso.de

Firmensitz: Oldenburg | Amtsgericht Oldenburg HRB 205251
Geschäftsführer: Stefan Schulte, Michael Terschüren


Re: Use a button in a sheet and open a popup with the same row

2012-03-26 Thread Volker Weber
Hi AM,

you should add a actionListener and a parameter to the button:


tc:button label=Detail actionListener=#{suchController.selectDetail}
  f:facet name=popup
...
  /f:facet
  f:parameter name=detail value=#{perGes}/
/tc:button


and in suchController:

public void selectDetail(ActionEvent event) {
   Object detail =  ComponentUtil.findParameter(event.getComponent(), detail);
   // detail is your row var
}


Regards,
Volker

Am 26. März 2012 09:21 schrieb AM greenm...@gmail.com:
 Hello!

 I have a tc:sheet and I want for each row a button.
 This button has to open a pop up.

 ^^ it works well!

 My problem is that I would like to get the data from a row, which
 button I had clicked.

 tc:sheet value=#{suchController.suchPerGesuchter} var=perGes 
 columns=*;*

        tc:column label=NAME    tc:out value=#{per [0]} /  /tc:column

        tc:column
           jsp:include page=/PopUp.jsp /  tc:button label=TEST /--%
           tc:panel

                tc:button label=Detail
                    f:facet name=popup
                        tc:popup width=950 height=400
                            tc:box label=Details
                                f:facet name=layout
                                    tc:gridLayout columns=* rows=*;fixed/
                                /f:facet
                                tc:panel
                                    f:facet name=layout
                                        tc:gridLayout
 columns=*;*;*;*;* rows=fixed/
                                    /f:facet
                                    tc:out value=PRINT ANOTHER INDEX
 OF THE ROW BEFORE  /
                                /tc:panel
          …..
    /tc:sheet



-- 
inexso - information exchange solutions GmbH
Ofener Str. 30      | 26121 Oldenburg
Tel.: +49 441 219 730 56 |
FAX:  +49 441 219 730 66 | eMail: volker.we...@inexso.de

Firmensitz: Oldenburg | Amtsgericht Oldenburg HRB 205251
Geschäftsführer: Stefan Schulte, Michael Terschüren


Re: [tobago] rowIndex is less than -1

2011-06-01 Thread Volker Weber
Hi Michael,

you should not change the value of a component outside of the
InvokeApplicationPhase, or exactly only between end of
UpdateModelValues and begin of RenderResponse!

The valueBinding should not fetch the value from the backend (DB or
whatever). You should hold a copy of your list in the model, and
update the copy, if needed, in InvokeApplication, or in a before
RenderResponse phaseListener.

BTW this is not only in tobago, but general in jsf.

Especially if the getter is cost intensive, like db access, because
the getter of a valueBinding is invoked multiple times during a
request.


Regards,
Volker

2011/5/31 Michael Kakuschky kakusc...@elbe-net.de:
 Hello

 I'm using at many places the tc:sheet component. If the content of the
 underlaying List did changed I got many times the following error message.
 It seems that if the count of records in the underlaying List  is less than
 before, the component comes in trouble. I'm using tobago 1.0.30 with myfaces
 1.1.8

 Is there something I can do to prevent this error? Maybe reinitialize the
 UIData component somehow?

 Thanks  best regards Michael

 org.apache.myfaces.tobago.component.UIData,Id: _idJsp29]}
        at
 javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:802)
        at javax.faces.component.UIData.encodeEnd(UIData.java:609)
        at
 org.apache.myfaces.tobago.component.UIData.encodeEnd(UIData.java:135)
        at
 org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:86)
        at
 org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:83)
        at
 org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent(DefaultLayoutRenderer.java:47)
        at
 org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
        at
 org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
        at
 org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
        at
 org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
        at
 org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
        at
 org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
        at
 org.apache.myfaces.tobago.renderkit.RenderUtil.encodeChildren(RenderUtil.java:58)
        at
 org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent(TabGroupRenderer.java:73)
        at
 org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView(TabGroupRenderer.java:457)
        at
 org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeEnd(TabGroupRenderer.java:168)
        at
 javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:799)
        ... 58 more
 Caused by: java.lang.IllegalArgumentException: rowIndex is less than -1
        at javax.faces.component.UIData.setRowIndex(UIData.java:239)
        at
 org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.SheetRenderer.renderSheet(SheetRenderer.java:378)
        at
 org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.SheetRenderer.encodeEnd(SheetRenderer.java:156)
        at
 javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:799)
        ... 74 more






-- 
inexso - information exchange solutions GmbH
Ofener Str. 30      | 26121 Oldenburg
Tel.: +49 441 219 730 56 |
FAX:  +49 441 219 730 66 | eMail: volker.we...@inexso.de

Firmensitz: Oldenburg | Amtsgericht Oldenburg HRB 205251
Geschäftsführer: Stefan Schulte, Michael Terschüren


Re: [tobago] Validation in Popups

2010-10-04 Thread Volker Weber
Hi Michael,

yes we have validation in Popups, but this is a bit hack like, nothing
to show as example.

The problem is the partial rendering and the popup handling in tobago 1.0.x:

If you need validation inside a popup, you should not close the popup
via popupClose attribute, but rerender the popup content partial and,
on success, close the popup via hidden button and javascript.

something like this should work, if you set the
#{myController.closePopup} value in your newItem action.

tc:cell
  f:facet name=layout
tc:gridLayout colums=fixed;1* /
  /f:facet
  tc:button width=100 label=add action=#{myController.newitem}
tc:attribute name=popupClose value=afterSubmit/
  /tc:button
  tc:text escape=false
 rendered=#{myController.closePopup}
 value=script
type=\text/javascript\Tobago.submitAction('full clientId of
hiddenCloseButton');/script /
  f:facet name=hiddenCloseButton
tc:button id=hiddenCloseButton 
  tc:attribute name=popupClose value=afterSubmit/
/tc:button
  /f:facet
/tc:cell

In tobago 1.5 this would be easier.

Regards,
Volker

2010/10/4 Michael Kakuschky kakusc...@elbe-net.de:
  Does nobody has an working example for validation in popus?

 Regards Michael

 Am 29.09.2010 08:57, schrieb Michael Kakuschky:

  Hello Udo, thanks for the answer but my form is already around the
 tc:button which I used to open the popup. Here is a snippset of my original
 version. The popup works and the form data will processed. Only validations
 and required checks doesn't work. In case of missing or wrong data the pop
 is just closing without calling the action method of the popups submit
 button. Can you show on this example what's todo or maybe wrong ?

 Thanks  best regards Michael

 tc:form
 tc:panel
 f:facet name=layout
 tc:gridLayout  rows=fixed columns=fixed /
 /f:facet
 tc:button label=new item
 tc:attribute name=renderedPartially value=non_modal_popup1/
 f:facet name=popup
 tc:popup width=500 height=325 id=non_modal_popup1 modal=true 
 tc:box label=create new item
 f:facet name=layout
 tc:gridLayout columns=1* rows=fixed;fixed /
 /f:facet
 tc:cell
 tx:in label=contact name value=#{myController.itemToAdd.contact_name}
 required=true /
 /tc:cell
 tc:cell
 tc:button width=100 label=add action=#{myController.newitem}
 tc:attribute name=popupClose value=afterSubmit/
 /tc:button
 /tc:cell
 /tc:box
 /tc:popup
 /f:facet
 /tc:button
 /tc:panel
 /tc:form

 Am 28.09.2010 15:12, schrieb Udo Schnurpfeil:

  Hello Michael,

 please try to put the form outside of the command tag, which opens the
 popup. This should solve your problems.

 The background is: The popup must be inside the form to consider it was
 already active.

 Regards,

 Udo

 Am 23.09.10 22:29, schrieb Michael Kakuschky:

  Hello, I have a form in a popup. Now it works fine and I add some
 validators to it. I checked that they are executed and throws the
 ValidatorException if the input does not match the requirements.

 In case of exceptions the action behind the popup form is not executed
 but unfortunately the popup is closed without any notification about the
 wrong input. Is there a way to keep the popup open so that the user is
 informed about the wrong input?

 thanks regards Michael





-- 
inexso - information exchange solutions GmbH
Ofener Str. 30      | 26121 Oldenburg
Tel.: +49 441 219 730 56 |
FAX:  +49 441 219 730 66 | eMail: volker.we...@inexso.de

Firmensitz: Hamburg   | Amtsgericht Hamburg, HRB 84273
Geschäftsführer: Stefan Schulte, Michael Terschüren, Dirk Fangohr


Re: [Tobago] calling of renderer class

2010-06-23 Thread Volker Weber
Hi Hani,

the easiest way to overwrite a Renderer is to put your own int the
tobago-resource-path into your application.
e.g. if you use the speyside theme put your renderer, which must be
named SheetRenderer, into the package
tobago-resource-path/html/standard/speyside/tag/


Regards,
Volker

2010/6/21 Abushammala, Hani (EXTERN: FTP)
extern.hani.abushamma...@volkswagen.de:
 Another question.

 How can i configure another renderer for the tobago component like the sheet 
 component.

 Any ideas or solutions?

 Regards,
 Hani

 -Ursprüngliche Nachricht-
 Von: Abushammala, Hani (EXTERN: FTP) 
 [mailto:extern.hani.abushamma...@volkswagen.de]
 Gesendet: Montag, 21. Juni 2010 09:52
 An: MyFaces Discussion
 Betreff: [Tobago] calling of renderer class

 Hi,

 I`ve developed a component to create a dynamic panel with a renderer
 class, but the renderer could not be called. The rendering works if the
 compoent class renders the output stream.
 I don`t know how i can configure the renderer for the new component in
 tobago.


 faces-config.xml:

      component
        descriptionThe dynamic panel component./description
        display-nameDynamicPanel/display-name
        !-- The name for registering the component. --
        component-typeextn.DynamicPanel/component-type
        !-- The implementation class. --
        component-classweb.components.UIDynamicPanel/component-class
        component-extension
            renderer-typeextn.DynamicPanelRenderer/renderer-type
        /component-extension
    /component

    render-kit
        renderer
            descriptionRenderer for DynamicPanel./description
            component-familyextn.DynamicPanelFamily/component-family
            renderer-typeextn.DynamicPanelRenderer/renderer-type

 renderer-classweb.components.DynamicPanelRenderer/renderer-class
        /renderer
    /render-kit


 Regards,
 Hani







-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] Javascript reload after Ajax Request.

2010-06-14 Thread Volker Weber
Hi,

in tobago 1.0.x is no support for tc:script during ajaxReload :-(
It is planned for 1.5, but, afaik, not implemented yet.

You can solve this in 1.0.x by using a tc:out with script content
inside the ajax reloaded panel.

eg. replace a
tc:script file=scripts/myFunctions.js onload=jsFunction() /
with a
tc:out escape=false
  value=script type=\text/javascript\new
Tobago.ScriptLoader(['ABSOLUTE_URL_TO_myFunctions.js'],
'jsFunction();');/script /

The Tobago.ScriptLoader is the javascript function which is used by
tobago internally to handle component reinitializing after (re)load.
It takes a array of urls to load, if not already loaded, and a
javascript to execute after files are loaded.
If you look into the generated html source you can find some of this scripts.

You can let the array empty if the script files are already loaded via
tc:script.


Note: you must calculate those tc:outs into the layout constraints.


Regards,
Volker

2010/6/11 Werner Punz werner.p...@gmail.com:
 Hi I am not familiar with Tobago in this case,
 but it is generally like that that elements loose attached event listeners
 (if they are dynamically attached) if the node is refreshed.

 The trick to cope with this is to intercept the ajax call once it is done ad
 reattach those events.

 JSF2 for instance has a special event listener api to cope with stuff like
 that, I am rather sure that you have something similar in your setup.

 Werner



 Am 11.06.10 15:15, schrieb Abushammala, Hani (EXTERN: FTP):

 Hello,

 I have the same Problem on a sheet, i`ve registered event listener to
 some element by loading of the page.
 But after the sheet is refreshed via Ajax (e.g. sorting), the jscript
 function will be not called again.


 Regars,
 Hani

 2007/4/9, madan chowdarymada...@yahoo.com:

 Hi All,

 I was just working with JavaScript in Tobago pages.

 I used onload function to call a javascript function which is used to
 Event.observe() on some components.

 These scripts are placed in a panel which gets refreshed via Ajax.

 The first time the page loads, then the desired task is achieved.

 But if the panel is refreshed via Ajax, then the javascript is not
 working.

 I need to call the function which was done onload, the same way when the
 panel is refreshed via Ajax.

 Is this possible ?

 Regards, Madan







-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] foreach in c:sheet

2010-05-27 Thread Volker Weber
Hi,

as Udo wrote, you can't use jstl inside tc:sheet!
Or to be more precise: the var param of tc:sheet is not available when
jstl iterates, because jstl evaluates before tobago starts renderring.

I also can't imagine how you do this with component binding, because
this is also done before rendering starts. Can you explain how you do
this?

But there is a way to solve this, you need binding to a extended
UIPanel implementation which drops and recreates children depending on
sheets var in each process* method.


Regards,
Volker


2010/5/27 Abushammala, Hani (EXTERN: FTP)
extern.hani.abushamma...@volkswagen.de:
 Hello Udo,

 Sorry, i forget to list the important libraries in use:

 avalon-framework-4.1.3.jar
 tobago-core-1.0.24.jar
 jstl-1.1.0.jar
 myfaces-impl-1.1.7.jar
 myfaces-api-1.1.7.jar
 commons-el-1.0.jar
 standard-1.1.2.jar


 Thank you.


 -Ursprüngliche Nachricht-
 Von: Abushammala, Hani (EXTERN: FTP) 
 [mailto:extern.hani.abushamma...@volkswagen.de]
 Gesendet: Mittwoch, 26. Mai 2010 15:12
 An: MyFaces Discussion
 Betreff: AW: [Tobago] foreach in c:sheet

 Hello Udo,


 I want to add a dynamic panel to a column, which has many elements for each 
 row in the sheet,
 that means the content of the panel for each row is different (like sheet in 
 sheet).
 I could do it with programming of whole panel in java and binding it in the 
 jsp, but i am looking now for a different way.

 I've tried to use jstl, but it doesn`t work to render the right dynamic panel 
 for right row:


 tc:column sortable=false align=left

    tc:panel id=headPanel 
        c:forEach items=${myBean.list} var=x varStatus=status1
            tc:panel id=subPanel${x.nr} rendered=${status1.index} == 
 ${x.nr} 
                c:forEach items=${x.subList} var=w varStatus=status2 
                    tc:link image=${w.iconUrl} id=link_${x.nr}_${w.nr} /
                /c:forEach
            /tc:panel
        /c:forEach
    /tc:panel

 /tc:column

 I've used jstl 1.1.

 Thank you.

 -Ursprüngliche Nachricht-
 Von: Udo Schnurpfeil [mailto:u...@schnurpfeil.de]
 Gesendet: Dienstag, 25. Mai 2010 09:16
 An: users@myfaces.apache.org
 Betreff: Re: [Tobago] foreach in c:sheet

 Hello Hani,

 I've never tried to use c:set, so I have no experience with that tag.

 Your code will not work, because the content inside of the tc:sheet
 will be visited only one time.
 The JSTL Tag needs to be called in each row to make it work.

 Mixing JSTL and JSF and use of iterators have some drawbacks. This
 depends also on the version of the libraries. Which version you are using?

 You may try to make your data accessible via the var-attribute of the sheet:

 tc:sheet var=row ...
 ...
        tc:column
                tc:out  value=#{row.subListAsString} /
        /tc:column
 ...
 /tc:sheet


 Regards,

 Udo


 Am 20.05.10 16:39, schrieb Abushammala, Hani (EXTERN: FTP):
 Hello,

 We want to visualize some dynamic content within a column for each row
 of sheet with jstl.


 We tried to incrment a variable (defined outside of the tc:sheet
 element)  with:c:set var=counter value=${counter + 1} /  to get
 the row index, but it doesn't work.

 Jsp:

 tc:sheet ..

 ...
       tc:column

               c:set var=counter value=${counter + 1} /

               c:forEach  items=${bean.itmesList[counter].subList}
 var=w varStatus=status
                               tc:out  value=${w} /
               /c:forEach

       /tc:column
 ...

 /tc:sheet




 Is it possible and how?


 Thank you.






-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] TYPE ERROR: value NOT instanceof SelectItem

2010-05-10 Thread Volker Weber
Hi Michael,

the valueBinding of one of your selectItems tags returns a String !

Are there any other (tc|f):selectItems tags in your page?
The path to the relevant component is in the stacktrace:
/admin.jsp tc:page=page tc:tabgroup=Main tc:box=partnerDataBox
tc:tabgroup=PartnerDetailsTab tc:panel=partnerDataPanel2


Regards,
Volker

2010/5/9 Michael Kakuschky kakusc...@bergedorf.de:
 Hello,

 I have a problem with my application sinced I moved my eclipse environment
 from a Windows XP system to and Windows 7 system. Compiling works fine and
 also a lot of my jsf tobago pages.

 But if i run the app on my development system some pages using
 tx:selectOneChoice Elements are producing errors like this one:

 java.lang.IllegalArgumentException - TYPE ERROR: value NOT instanceof
 SelectItem, SelectItem[], Collection, Map. type=java.lang.String

 I'm using jre 1.6.0_20, MyFaces 1.2.8 and tobago 1.0.24 with Eclipse
 Galileo. These are the same components (except I Java which was version
 1.6.0_7) I used on the windows XP based system without problems.

 For me everything looks o.k. The data delivered from the getter is r should
 be of Type ListSelectItem which is implementing Collection.

 Would be great if somebody has an idea and can help me.

 Best regards Michael


 The source of the page:

 tx:selectOneChoice value=#{myController.country_id} label=country
 f:selectItems value=#{countryBean.country_list} /
 /tx:selectOneChoice

 The relevant part of the bean code:

    private ListSelectItem country_list = new ArrayListSelectItem();

    public CountryBean() {
        super();
        //fill List with some countries
        country_list.add(new SelectItem(820,Germany));
        country_list.add(new SelectItem(276,Germany));
    }

    public ListSelectItem getCountry_list() {
        return country_list;
    }

 The StackTrace

 Exception while calling encodeEnd on component : {Component-Path : [Class:
 org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
 org.apache.myfaces.tobago.component.UIPage,Id: page]}

 Caused by:
 java.lang.IllegalArgumentException - TYPE ERROR: value NOT instanceof
 SelectItem, SelectItem[], Collection, Map. type=java.lang.String

 |javax.faces.FacesException: Exception while calling encodeEnd on component
 : {Component-Path : [Class:
 org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
 org.apache.myfaces.tobago.component.UIPage,Id: page]}
        at
 javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:627)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:261)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:257)
        at
 org.apache.myfaces.application.jsp.JspViewHandlerImpl.actuallyRenderView(JspViewHandlerImpl.java:427)
        at
 org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:383)
        at
 org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:105)
        at
 org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:56)
        at
 org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecycle.java:140)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:182)
        at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
        at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
        at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
        at
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
        at
 org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:706)
        at
 org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:677)
        at org.apache.jsp.index_jsp._jspService(index_jsp.java:54)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
        at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at
 

Re: [TOBAGO] TYPE ERROR: value NOT instanceof SelectItem

2010-05-10 Thread Volker Weber
Hi Michael,

i never used jsf 1.2, tobago 1.0.x was developed for jsf 1.1,
but it 'should' be compatible to 1.2.

I don't think the windows version could be the problem, but i dont use windows
(exept a vm to test tobago in IE)

If you got a String instance as selectItems value in jsf1.2 there must
be a Problem in the tobago1.0/jsf1.2 combination.



Regards,
Volker


2010/5/10 Michael Kakuschky kakusc...@elbe-net.de:
 Hello Volker,

 for testing I produce a very cutted version of my page where is just one
 selectItem in it, this is the one where the logs came from. If I remove the
 only one existing selectItems Element the page will be rendered.

 Now I found out that if I use tobago 1.0.25 with myfaces 1.1.7 then the
 selectedItem works like expected. But know I got other problems like that
 some UI Elements not updated with bean attribute values.

 Before I was using tobago 10.0.24 with myfaces 1.2.8. This combination is
 running fine on my linux server and also on two development systems based on
 Windows XP.

 The problems began if I ported the development plattform to Windows 7.

 Which version combination of myfaces and tobago is the standard one? Can the
 reason somehow depend on the version of Windows?

 Best regards

 Michael

 Am 10.05.2010 09:34, schrieb Volker Weber:

 Hi Michael,

 the valueBinding of one of your selectItems tags returns a String !

 Are there any other (tc|f):selectItems tags in your page?
 The path to the relevant component is in the stacktrace:
 /admin.jsp tc:page=page tc:tabgroup=Main tc:box=partnerDataBox
 tc:tabgroup=PartnerDetailsTab tc:panel=partnerDataPanel2


 Regards,
     Volker

 2010/5/9 Michael Kakuschkykakusc...@bergedorf.de:


 Hello,

 I have a problem with my application sinced I moved my eclipse
 environment
 from a Windows XP system to and Windows 7 system. Compiling works fine
 and
 also a lot of my jsf tobago pages.

 But if i run the app on my development system some pages using
 tx:selectOneChoice Elements are producing errors like this one:

 java.lang.IllegalArgumentException - TYPE ERROR: value NOT instanceof
 SelectItem, SelectItem[], Collection, Map. type=java.lang.String

 I'm using jre 1.6.0_20, MyFaces 1.2.8 and tobago 1.0.24 with Eclipse
 Galileo. These are the same components (except I Java which was version
 1.6.0_7) I used on the windows XP based system without problems.

 For me everything looks o.k. The data delivered from the getter is r
 should
 be of Type ListSelectItem  which is implementing Collection.

 Would be great if somebody has an idea and can help me.

 Best regards Michael


 The source of the page:

 tx:selectOneChoice value=#{myController.country_id} label=country
 f:selectItems value=#{countryBean.country_list} /
 /tx:selectOneChoice

 The relevant part of the bean code:

    private ListSelectItem  country_list = new ArrayListSelectItem();

    public CountryBean() {
        super();
        //fill List with some countries
        country_list.add(new SelectItem(820,Germany));
        country_list.add(new SelectItem(276,Germany));
    }

    public ListSelectItem  getCountry_list() {
        return country_list;
    }

 The StackTrace

 Exception while calling encodeEnd on component : {Component-Path :
 [Class:
 org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
 org.apache.myfaces.tobago.component.UIPage,Id: page]}

 Caused by:
 java.lang.IllegalArgumentException - TYPE ERROR: value NOT instanceof
 SelectItem, SelectItem[], Collection, Map. type=java.lang.String

 |javax.faces.FacesException: Exception while calling encodeEnd on
 component
 : {Component-Path : [Class:
 org.apache.myfaces.tobago.component.UIViewRoot,ViewId: /admin.jsp][Class:
 org.apache.myfaces.tobago.component.UIPage,Id: page]}
        at
 javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:627)
        at
 javax.faces.component.UIComponent.encodeAll(UIComponent.java:261)
        at
 javax.faces.component.UIComponent.encodeAll(UIComponent.java:257)
        at

 org.apache.myfaces.application.jsp.JspViewHandlerImpl.actuallyRenderView(JspViewHandlerImpl.java:427)
        at

 org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:383)
        at

 org.apache.myfaces.tobago.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:105)
        at

 org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:56)
        at

 org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecycle.java:140)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:182)
        at

 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at

 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at

 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646

Re: Enums in selectItems

2010-05-03 Thread Volker Weber
Hi,

No need to implement this yourself, there is an EnumConverter in
myfaces-converters:
http://myfaces.apache.org/commons/index.html


Regards,
Volker

2010/5/1 Anton Gavazuk antongava...@gmail.com:
 Hi Jozef,

 see it:

 public class EnumConverter implements Converter {
    public Object getAsObject(FacesContext context, UIComponent comp, String
 value) throws ConverterException {
        Class enumType = comp.getValueBinding(value).getType(context);
        return Enum.valueOf(enumType, value);
    }

    public String getAsString(FacesContext context, UIComponent component,
 Object object) throws ConverterException {
        if (object == null) {
            return null;
        }

        if (object instanceof String) {
            return (String) object;
        }

        //ADD localization ability
        Enum type = (Enum) object;
        return type.name();
    }
 }


 2010/5/1 Jozef Dropco jozef.dro...@gmail.com

 Hi all,
 I have a little bit stupid question. I got this message: End of weekend:
 'Tuesday' must be convertible to an enum from the enum that contains the
 constant 'Tuesday'. Do I have to write my own converter or what should I do.

 public enum DayOfWeek {

   MONDAY(Monday),
   TUESDAY(Tuesday),
   WEDNESDAY(Wednesday),
   THURSDAY(Thursday),
   FRIDAY(Friday),
   SATURDAY(Saturday),
   SUNDAY(Sunday);
   private String name;
 }

 ***BEAN***
 for (DayOfWeek day :DayOfWeek.values()){
      days.add(new SelectItem(day, day.getName()));
      }
 ***XHTML***
 tr:selectOneChoice required=true label=End of weekend
 value=#{addWeekendDiscount.weekend.endWeekend}
 f:selectItems value=#{addWeekendDiscount.days}/
 /tr:selectOneChoice


 Thanks Jozef.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] How to add new css to Tobago

2010-04-27 Thread Volker Weber
Hi,

for panel you should use tobago-panel-markup-important.

The gridlayout is just the panel content.

Regards,
Volker

2010/4/27 tobagouser srikanthchowda...@yahoo.com:

 Hi Udo,

 I created a new markup for box and its worked.Thanks for that.I tried to
 create a markup for panel in the same way.

 I observed the selected styles through firebug ,for box its taking new
 tobago-box-markup-important style.

 but for panel its not picking the new tobago-gridLayout-markup-important
 style.

 please find the content of tobago-theme.xml

 tobago-theme
  namestandard/name
  display-nameStandard Theme/display-name

 deprecated-nameorg.apache.myfaces.tobago.context.StandardTheme/deprecated-name
  resource-pathorg/apache/myfaces/tobago/renderkit/resource-path
  renderers

     renderer
          nameBox/name
          supported-markup
            markupimportant/markup
          /supported-markup
    /renderer
     renderer
          nameGridLayout/name
          supported-markup
            markupimportant/markup
          /supported-markup
    /renderer


  /renderers
 /tobago-theme


 This is little bit surprising. Please let me know how to resolve this..

 KSK



 Udo Schnurpfeil wrote:

 Hi,

 there is no style class tobago-box-footer defined for any HTML tag. So
 the style will not be applied.

 When you want to give some panels a different style, you can assign a
 markup like:
 tc:panel markup=important ...
 this will result in HTML with the class tobago-panel-markup-important.
 Than you can define a style for that class.
 First, you have to register a markup for a renderer. See:
 http://myfaces.apache.org/tobago/faq.html#tobagocustommarkup

 If you want to see which styles from which files will be applied, you
 may use Firebug, or any other browser development tool, which are very
 helpful.

 Regards,

 Udo

 Am 26.04.10 20:06, schrieb tobagouser:
 Hi Udo,Helmut

 Thanks for the info.Its really useful.

 My requirements are

 1.I want to have a different background color and shade to some of the
 panels in the  pages.This color and shade should be different from the
 default panel  css ,so it should have a different css .

 2.As mentioned earlier I want to add a new  css to the border footer.I
 added
 it similar to the box header  css in the speyside style.css file ..like

 .tobago-box-footer {
 values here...
 }

 But this footer css never applied on the pages.

 please let me know whether tc:style tag  applies at the page level only
 or
 applies  at the child  tags like panel and box.

 also please let me know how to  add a new css to box footer and why the
 above css does not worked.

 Thanks,
 KSK

 Udo Schnurpfeil wrote:

 Hi,

 The simple way: You can also put a file style/style.css (exactly this
 name) in the webapp directory. The ResourceManager will find it and add
 it to the list of needed resources. The style will be effect all Tobago
 pages in one application.

 Helmut solution is also possible. The advantage is, you can decide,
 which pages need the style. It is also possible to make changes in more
 than one theme, if needed.

 If you want to make bigger changes to the design of the pages (specially
 for more than one application), you may want to write a Tobago theme,
 that contains your custom look and feel.

 Regards,

 Udo

 Am 22.04.10 15:55, schrieb Helmut Swaczinna:

 Hi,

 wich style.css do you mean exactly? Where is it located? You can add
 your own styles with the tc:style tag, e.g.tc:style
 style=style/mystyles.css /, under your resource path.

 Regards
 Helmut


 Am 22.04.2010 15:51, schrieb tobagouser:

 Any inputs on this please..


 tobagouser wrote:

 Hi All,

 I have tried to add tobago-box-footer to the style.css ,but it never
 affected the pages.Please could you let me know how to add a new css
 to
 tobago.

 Thanks,
 KSK












 --
 View this message in context: 
 http://old.nabble.com/How-to-add-new-css-to-Tobago-tp28288029p28378878.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] problem selecting current item in tx:selectOneChoice

2010-04-22 Thread Volker Weber
Hi Michael,

(btw yes i work together with Dirk Fangohr. sorry for the delay, was a
bit busy last Friday)

the problem is you has int as value in getActive() but String in select items.

Try
   tc:selectItem itemValue=#{2} itemLabel=active/
   tc:selectItem itemValue=#{1} itemLabel=suspended/
   tc:selectItem itemValue=#{0} itemLabel=inactice/

you don't need a converter!


Regards,
Volker

2010/4/21 Michael Kakuschky kakusc...@elbe-net.de:
 Hello,

 I have a strange problem selecting the correct item of tx:selectOneChoice
 boxes if the  itemValue of the tc:selectItem item is an Integer.

 Storing the selected values works fine as aspected. I will find the correct
 values in mybackend database

 What does not work is that after rerendering the correct value is selected.
 If in my example the MyController.active Integer attribute has a value of 1
 suspended should be selected. But it's always the first value of the
 tc:selectItem elements selected.

 I tried already to use a converter because  I guessed that  there is an
 conversion problem between Integer  and String but it does not help.

 If the selectItem bind to a String  it works fine (sure without the
 integerConverter). With the tomahawk h:selectOneMenu component it works also
 with Integers.

 Knows anybody how to solve this problem for tobago to use an Integer as
 value attribute?

 tc:cell
    tx:selectOneChoice value=#{myController.active} label=active
  converter=integerConverter
        tc:selectItem itemValue=2 itemLabel=active/
        tc:selectItem itemValue=1 itemLabel=suspended/
        tc:selectItem itemValue=0 itemLabel=inactice/
    /tx:selectOneChoice
 /tc:cell

 public class MyController{
   private Integer active = 1;

   public Integer getActive() {
       return active;
   }
   public void setActive(Integer active) {
       this.active = active;
   }
 }

 public class IntegerConverter  implements Converter {

  public Object getAsObject(FacesContext context, UIComponent component,
 String value) throws ConverterException {
   return Integer.getInteger(value);
  }

 public String getAsString(FacesContext context, UIComponent component,
 Object value) throws ConverterException {
   if (value instanceof Integer) {
     return ((Integer) value).toString();
   }
   return ;
  }
 }

 Thanks and best regards

 Michael




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: How to activate an tc:tab element to be on top in tobago

2010-04-14 Thread Volker Weber
Hi Michael,

yes, bind the tabIndex attribute of tc:tabgroup to an int in your
controller, than you can set the index in your action.


Regards,
Volker

2010/4/14 Michael Kakuschky kakusc...@elbe-net.de:
 Hello, is there a way to activate an tc:tab element within an action so that
 it comes to the top of a tc:tabGroup ?

 Thanks for your help Michael




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: tobago partial rendering question

2010-04-14 Thread Volker Weber
Hi Michael,

after a more closer view to your jsp i found the problem.

The tc:form arround the box is the probem, using subforms you are
reduce the validation and modelUpdate
only to the subform where the command is in, the other content is not
processed and therfore the submitted values are rerenderd.

did you really need the forms?


Regards,
Volker



2010/4/14 Michael Kakuschky kakusc...@elbe-net.de:
 Hello Volker, thanks for the response. Yes I target the panel. I use now
 actionListener and return null as return value. I also preset the value of
 string1 so that the value is always already initialized. But nervertheless
 the string2 is set to the new value (I debug that) but after rendering the
 tx:in box is still empty. Maybe you can take a look to the latest version of
 my test page and controller.

 Best regards Michael

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsf/core; prefix=f %
 %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc %
 %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx %
 f:view locale=de
   tc:page width=1280 id=page

   f:facet name=layout
       tc:gridLayout rows=1*;fixed columns=fixed/
   /f:facet

   tc:panel id=panel1
   f:facet name=layout
       tc:gridLayout rows=fixed;fixed;1* columns=fixed/
   /f:facet
     tc:form id=form1
   tc:box label=box1 id=box1
       f:facet name=layout
           tc:gridLayout rows=fixed;fixed;1* columns=fixed/
       /f:facet
       tc:cell
           tx:in value=#{myController.string1} label=string1 /
       /tc:cell
       tc:cell
           tc:button actionListener=#{myController.action1}
 label=submit1
               tc:attribute name=renderedPartially value=:page:panel1/
           /tc:button
       /tc:cell
       tc:cell/
   /tc:box
   /tc:form

   tc:form id=form2
   tc:box label=box2 id=box2
       f:facet name=layout
           tc:gridLayout rows=fixed;fixed;1* columns=fixed/
       /f:facet
       tc:cell id=cell2
           tx:in value=#{myController.string2} label=string2  /
       /tc:cell
       tc:cell/
   /tc:box
   /tc:form

   tc:cell/
     /tc:panel
     tc:cell
   /tc:cell
 /tc:page
 /f:view

 package test1;

 import javax.faces.event.ActionEvent;

 public class MyController {

   private String string1 = 99;
   private String string2;
     public String action1(ActionEvent actionEvent)
   {
       string2 = string1;
             return null;
   }
   public String getString1() {
       return string1;
   }
   public void setString1(String string1) {
       this.string1 = string1;
   }
   public String getString2() {
       return string2;
   }
   public void setString2(String string2) {
       this.string2 = string2;
   }
 }

 Volker Weber schrieb:

 Hi Michael,

 for actions used in partial rendering you should always return null!
 I the action returns a string than a full reload is made!
 I suggest using actionListener for partial actions.

 When rendering partially only the requested subview (plus the action
 component if outside) is processed on the server.

 In your example you request reload of box2, which means the content of
 box2 is processed and stored in the model.
 In the action string2 is set to string1 but string1 was not processed
 so it is still null here.

 Have you in helmuts example really changed the value of
 renderedPartially to the suggested panel arround both boxes?


 Regards,
    Volker




 2010/4/12  kakusc...@elbe-net.de:


 Hello,

 I'm trying to execute an action and partial rendering the result in an
 tx:in field. The tx:button which calls the action and the tx:in
 elements
 are in different forms. For some reasons after the new value is set to
 the
 underlaying value of the tx:in field the setter of this value is called
 from somewhere and overwrites the new value with an empty string.  But I
 want to have the value I set with my action1 method in the field instead
 an empty string. Can some one tell me what I'm doing wrong?

 Thanks a lot Michael

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsf/core; prefix=f %
 %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc
 %
 %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx
 %
 f:view locale=de
       tc:page width=1280 id=page

       f:facet name=layout
               tc:gridLayout rows=fixed;fixed;1* columns=fixed/
       /f:facet

   tc:form id=form1
       tc:box label=box1 id=box1
               f:facet name=layout
                       tc:gridLayout rows=fixed;fixed;1*
 columns=fixed/
               /f:facet
           tc:cell
               tx:in value=#{testController.string1} label=string1 /
           /tc:cell
           tc:cell
               tc:button action=#{testController.action1}
 label=submit1
                       tc:attribute name=renderedPartially
 value=:page:form2:box2/
               /tc:button
           /tc:cell
           tc:cell

Re: tobago partial rendering question

2010-04-14 Thread Volker Weber
Hi  Michael,

not a common way, but there is always something you can do :-)

But how exact depends on the concrete situation.

You can put a tc:command  with action 1 as facet eg. inside the box2
and use the onclick attribute of the button:

On the button in box 1 remove the actionListner and add
onClick=Tobago.reloadComponent('page:form2:box2', 'page:form2:action1');

in box2 add a tc:command as facet:

f:facet name=action1Facet
  tc:command id=action1 actionListener=#{controller.action1}
tc:attribute name=renderedPartially value=box2/
 /tc:command
/f:facet

but now is the box1 not processed, so you cant get the value of string1.

If you need this then you can put the action facet on the surrounding panel.


Regards,
Volker




2010/4/14 Michael Kakuschky kakusc...@elbe-net.de:
 Hello Volker, I think I need the forms.

 I have an application which use tabs with different formulars. If I don't
 use subforms and set the required attribute on some elements on one tab
 and I want to submit a fomular on another tab it does not work because the
 element on the other tab is not completely filled and the set require
 attribute does not allow to submit the main form..

 That the reason I subforms. Is there another common way to solve this kind
 of problem?

 Thanks and best regards Michael


 Volker Weber schrieb:

 Hi Michael,

 after a more closer view to your jsp i found the problem.

 The tc:form arround the box is the probem, using subforms you are
 reduce the validation and modelUpdate
 only to the subform where the command is in, the other content is not
 processed and therfore the submitted values are rerenderd.

 did you really need the forms?


 Regards,
    Volker



 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de:


 Hello Volker, thanks for the response. Yes I target the panel. I use now
 actionListener and return null as return value. I also preset the value
 of
 string1 so that the value is always already initialized. But
 nervertheless
 the string2 is set to the new value (I debug that) but after rendering
 the
 tx:in box is still empty. Maybe you can take a look to the latest version
 of
 my test page and controller.

 Best regards Michael

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsf/core; prefix=f %
 %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc
 %
 %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx
 %
 f:view locale=de
  tc:page width=1280 id=page

  f:facet name=layout
      tc:gridLayout rows=1*;fixed columns=fixed/
  /f:facet

  tc:panel id=panel1
  f:facet name=layout
      tc:gridLayout rows=fixed;fixed;1* columns=fixed/
  /f:facet
    tc:form id=form1
  tc:box label=box1 id=box1
      f:facet name=layout
          tc:gridLayout rows=fixed;fixed;1* columns=fixed/
      /f:facet
      tc:cell
          tx:in value=#{myController.string1} label=string1 /
      /tc:cell
      tc:cell
          tc:button actionListener=#{myController.action1}
 label=submit1
              tc:attribute name=renderedPartially
 value=:page:panel1/
          /tc:button
      /tc:cell
      tc:cell/
  /tc:box
  /tc:form

  tc:form id=form2
  tc:box label=box2 id=box2
      f:facet name=layout
          tc:gridLayout rows=fixed;fixed;1* columns=fixed/
      /f:facet
      tc:cell id=cell2
          tx:in value=#{myController.string2} label=string2  /
      /tc:cell
      tc:cell/
  /tc:box
  /tc:form

  tc:cell/
    /tc:panel
    tc:cell
  /tc:cell
 /tc:page
 /f:view

 package test1;

 import javax.faces.event.ActionEvent;

 public class MyController {

  private String string1 = 99;
  private String string2;
    public String action1(ActionEvent actionEvent)
  {
      string2 = string1;
            return null;
  }
  public String getString1() {
      return string1;
  }
  public void setString1(String string1) {
      this.string1 = string1;
  }
  public String getString2() {
      return string2;
  }
  public void setString2(String string2) {
      this.string2 = string2;
  }
 }

 Volker Weber schrieb:


 Hi Michael,

 for actions used in partial rendering you should always return null!
 I the action returns a string than a full reload is made!
 I suggest using actionListener for partial actions.

 When rendering partially only the requested subview (plus the action
 component if outside) is processed on the server.

 In your example you request reload of box2, which means the content of
 box2 is processed and stored in the model.
 In the action string2 is set to string1 but string1 was not processed
 so it is still null here.

 Have you in helmuts example really changed the value of
 renderedPartially to the suggested panel arround both boxes?


 Regards,
   Volker




 2010/4/12  kakusc...@elbe-net.de:



 Hello,

 I'm trying to execute an action and partial rendering the result in an
 tx:in field. The tx:button which calls the action and the tx:in
 elements
 are in different forms. For some reasons after

Re: [TOBAGO] tobago partial rendering question

2010-04-14 Thread Volker Weber
btw: please prefix the subject with [TOBAGO] for tobago related messages.



2010/4/14 Volker Weber v.we...@inexso.de:
 Hi  Michael,

 not a common way, but there is always something you can do :-)

 But how exact depends on the concrete situation.

 You can put a tc:command  with action 1 as facet eg. inside the box2
 and use the onclick attribute of the button:

 On the button in box 1 remove the actionListner and add
 onClick=Tobago.reloadComponent('page:form2:box2', 'page:form2:action1');

 in box2 add a tc:command as facet:

 f:facet name=action1Facet
  tc:command id=action1 actionListener=#{controller.action1}
    tc:attribute name=renderedPartially value=box2/
  /tc:command
 /f:facet

 but now is the box1 not processed, so you cant get the value of string1.

 If you need this then you can put the action facet on the surrounding panel.


 Regards,
    Volker




 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de:
 Hello Volker, I think I need the forms.

 I have an application which use tabs with different formulars. If I don't
 use subforms and set the required attribute on some elements on one tab
 and I want to submit a fomular on another tab it does not work because the
 element on the other tab is not completely filled and the set require
 attribute does not allow to submit the main form..

 That the reason I subforms. Is there another common way to solve this kind
 of problem?

 Thanks and best regards Michael


 Volker Weber schrieb:

 Hi Michael,

 after a more closer view to your jsp i found the problem.

 The tc:form arround the box is the probem, using subforms you are
 reduce the validation and modelUpdate
 only to the subform where the command is in, the other content is not
 processed and therfore the submitted values are rerenderd.

 did you really need the forms?


 Regards,
    Volker



 2010/4/14 Michael Kakuschky kakusc...@elbe-net.de:


 Hello Volker, thanks for the response. Yes I target the panel. I use now
 actionListener and return null as return value. I also preset the value
 of
 string1 so that the value is always already initialized. But
 nervertheless
 the string2 is set to the new value (I debug that) but after rendering
 the
 tx:in box is still empty. Maybe you can take a look to the latest version
 of
 my test page and controller.

 Best regards Michael

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsf/core; prefix=f %
 %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc
 %
 %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx
 %
 f:view locale=de
  tc:page width=1280 id=page

  f:facet name=layout
      tc:gridLayout rows=1*;fixed columns=fixed/
  /f:facet

  tc:panel id=panel1
  f:facet name=layout
      tc:gridLayout rows=fixed;fixed;1* columns=fixed/
  /f:facet
    tc:form id=form1
  tc:box label=box1 id=box1
      f:facet name=layout
          tc:gridLayout rows=fixed;fixed;1* columns=fixed/
      /f:facet
      tc:cell
          tx:in value=#{myController.string1} label=string1 /
      /tc:cell
      tc:cell
          tc:button actionListener=#{myController.action1}
 label=submit1
              tc:attribute name=renderedPartially
 value=:page:panel1/
          /tc:button
      /tc:cell
      tc:cell/
  /tc:box
  /tc:form

  tc:form id=form2
  tc:box label=box2 id=box2
      f:facet name=layout
          tc:gridLayout rows=fixed;fixed;1* columns=fixed/
      /f:facet
      tc:cell id=cell2
          tx:in value=#{myController.string2} label=string2  /
      /tc:cell
      tc:cell/
  /tc:box
  /tc:form

  tc:cell/
    /tc:panel
    tc:cell
  /tc:cell
 /tc:page
 /f:view

 package test1;

 import javax.faces.event.ActionEvent;

 public class MyController {

  private String string1 = 99;
  private String string2;
    public String action1(ActionEvent actionEvent)
  {
      string2 = string1;
            return null;
  }
  public String getString1() {
      return string1;
  }
  public void setString1(String string1) {
      this.string1 = string1;
  }
  public String getString2() {
      return string2;
  }
  public void setString2(String string2) {
      this.string2 = string2;
  }
 }

 Volker Weber schrieb:


 Hi Michael,

 for actions used in partial rendering you should always return null!
 I the action returns a string than a full reload is made!
 I suggest using actionListener for partial actions.

 When rendering partially only the requested subview (plus the action
 component if outside) is processed on the server.

 In your example you request reload of box2, which means the content of
 box2 is processed and stored in the model.
 In the action string2 is set to string1 but string1 was not processed
 so it is still null here.

 Have you in helmuts example really changed the value of
 renderedPartially to the suggested panel arround both boxes?


 Regards,
   Volker




 2010/4/12  kakusc...@elbe-net.de:



 Hello,

 I'm trying to execute an action and partial rendering

Re: tobago partial rendering question

2010-04-13 Thread Volker Weber
Hi Michael,

for actions used in partial rendering you should always return null!
I the action returns a string than a full reload is made!
I suggest using actionListener for partial actions.

When rendering partially only the requested subview (plus the action
component if outside) is processed on the server.

In your example you request reload of box2, which means the content of
box2 is processed and stored in the model.
In the action string2 is set to string1 but string1 was not processed
so it is still null here.

Have you in helmuts example really changed the value of
renderedPartially to the suggested panel arround both boxes?


Regards,
Volker




2010/4/12  kakusc...@elbe-net.de:
 Hello,

 I'm trying to execute an action and partial rendering the result in an
 tx:in field. The tx:button which calls the action and the tx:in elements
 are in different forms. For some reasons after the new value is set to the
 underlaying value of the tx:in field the setter of this value is called
 from somewhere and overwrites the new value with an empty string.  But I
 want to have the value I set with my action1 method in the field instead
 an empty string. Can some one tell me what I'm doing wrong?

 Thanks a lot Michael

 %@ page contentType=text/html;charset=UTF-8 language=java %
 %@ taglib uri=http://java.sun.com/jsf/core; prefix=f %
 %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc %
 %@ taglib uri=http://myfaces.apache.org/tobago/extension; prefix=tx %
 f:view locale=de
        tc:page width=1280 id=page

        f:facet name=layout
                tc:gridLayout rows=fixed;fixed;1* columns=fixed/
        /f:facet

    tc:form id=form1
        tc:box label=box1 id=box1
                f:facet name=layout
                        tc:gridLayout rows=fixed;fixed;1* columns=fixed/
                /f:facet
            tc:cell
                tx:in value=#{testController.string1} label=string1 /
            /tc:cell
            tc:cell
                tc:button action=#{testController.action1} label=submit1
                        tc:attribute name=renderedPartially 
 value=:page:form2:box2/
                /tc:button
            /tc:cell
            tc:cell/
        /tc:box
        /tc:form

    tc:form id=form2
        tc:box label=box2 id=box2
                f:facet name=layout
                        tc:gridLayout rows=fixed;fixed;1* columns=fixed/
                /f:facet
            tc:cell id=cell2
                tx:in value=#{testController.string2} label=string2  /
            /tc:cell
            tc:cell/
        /tc:box
        /tc:form
        tc:cell
        /tc:cell
 /tc:page
 /f:view


 package test;

 import java.io.File;
 import java.util.Date;

 import javax.faces.event.ValueChangeEvent;

 import org.apache.commons.fileupload.FileItem;
 import org.apache.myfaces.tobago.model.SelectItem;


 public class TestController {

        private String string1;
        private String string2;

        // access methods
        public String action1()  {

                string2 = string1;

                return success;
        }

        // Getters and Setters
        public String getString1() {
                return string1;
        }
        public void setString1(String string1) {
                this.string1 = string1;
        }
        public String getString2() {
                return string2;
        }
        public void setString2(String string2) {
                this.string2 = string2;
        }
 }





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: FacesMessage with severity ERROR do not prevent calling an action method

2010-01-20 Thread Volker Weber
Hi Madhav,

the livecycle did not depend on messages in the context. To prevent
executing actions and direct skip to renderPhase you need to call

FacesContext.getCurrentInstance().renderResponse();

e.g. in your putMessage() method.


Regards,
Volker

2010/1/20 Madhav Bhargava madhav_bharg...@infosys.com:
 Hi,

 I am using myfaces 1.1, icefaces 1.8.1 on WAS 6.0

 The controller (backing bean) action methods handle RuntimeException from the 
 service layer. Depending on the exception an exception handler will put an 
 appropriate message into FacesContext.
 For that I have created a utility method:

 public static void putMessage(String key, Severity severity,
                                String summary, String detail) {
                FacesContext.getCurrentInstance().addMessage(key,
                                                new FacesMessage(severity, 
 summary, detail));
 }

 In the controller this method is used to put messages. When the page is 
 displayed the messages appear properly. However when a user clicks on a 
 commandButton then the control goes to the action method bound to the 
 commandButton. This should not happen because there are FacesMessages with 
 FacesMessage.SEVERITY_ERROR. I checked immediate=true has not been set on 
 the commandButton component.

 Is my understanding not correct that if there are FacesMessages with Severity 
 = SEVERITY_ERROR in the FacesContext then the invoke application phase will 
 not happen and the control would come back to the current page in error?

 Regards,
 Madhav

  CAUTION - Disclaimer *
 This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely
 for the use of the addressee(s). If you are not the intended recipient, please
 notify the sender by e-mail and delete the original message. Further, you are 
 not
 to copy, disclose, or distribute this e-mail or its contents to any other 
 person and
 any such actions are unlawful. This e-mail may contain viruses. Infosys has 
 taken
 every reasonable precaution to minimize this risk, but is not liable for any 
 damage
 you may sustain as a result of any virus in this e-mail. You should carry out 
 your
 own virus checks before opening the e-mail or attachment. Infosys reserves the
 right to monitor and review the content of all messages sent to or from this 
 e-mail
 address. Messages sent to or from this e-mail address may be stored on the
 Infosys e-mail system.
 ***INFOSYS End of Disclaimer INFOSYS***




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: onkeydown and javascript with tobago

2009-10-30 Thread Volker Weber
Hi Douglas,

yes this is easy in tobago:

tc:textarea ...
  f:facet name=keyup
 tc:command onclick=validateText()/
  /f:facet
/tc:textarea

this add a eventlistener for the keyup event to the textarea.


Regards,
Volker


2009/10/28 Douglas R. Haase doug@gmail.com:
 hi everyone,

 i wanna know if there's something like this:

 html
 ...

 body onload=validateText()
 

 h:inputTextarea id=textArea value=#{textBean.text}

                        onkeyup=validateText()

 ... for tobago..

 I need to validate some field (or even apply a mask for tc:date) when
 I'm pressing the keys on the specified input, so I was looking for
 some way to call a java script and do that the same way I would do
 using the html core, using the onkeyup method...

 thanks :)




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] dynamic panels in tc:sheet

2009-10-17 Thread Volker Weber
Hi Hani,

you can't have different UIComponents in the rows.

There is only one set of components which is rendered multiple times
for the rows, if you need different row contents you need to add all
components and hide some of them via rendered attribute.


Regards,
Volker



2009/10/16 Abushammala, Hani (EXTERN: FTP)
extern.hani.abushamma...@volkswagen.de:
 Thank you Volker,



 The updating of the panel must be dependent on the row object of the sheet,
 that means the content of the panel for each row is different.
 How can i tell the set-method for the panel the row object.

 How can i reach that?

 Regards,

 Hani

 -Ursprüngliche Nachricht-
 Von: weber.vol...@googlemail.com [mailto:weber.vol...@googlemail.com] Im 
 Auftrag von Volker Weber
 Gesendet: Freitag, 16. Oktober 2009 09:38
 An: MyFaces Discussion
 Betreff: Re: [Tobago] dynamic panels in tc:sheet

 Hi Hani,

 2009/10/15 Abushammala, Hani (EXTERN: FTP)
 extern.hani.abushamma...@volkswagen.de:
 Hi all.

 I would like to create a tc:sheet as follows:

 In want add a panel to a Colmun, which has many command elements for each
 row in the sheet.
 I have written a method to create a panel for the row object of the sheet,
 but
 i need help to bind the method with jstl or java to the panel.

 JSP:

    tc:sheet value=#{controller.objects} id=objectSheet var=object 
    tc:column id=col1 sortable=false
   tc:out value=#{object.attribut} id=t_out /
    /tc:column
     tc:column id=col2 sortable=false
   tc:panel binding=#{.}  id=t_panel /

 tc:panel binding=#{controller.cmdPanel}  id=t_panel /

    /tc:column
    /tc:sheet

 Controller:


 public UIComponent getCmdPanel() {
  // important return null here and create content in setCmdPanel()
  return null;
 }


 // create the content of dynamic panel in the bindinsg setter
 // let jsf create the panel and just add content
 public void setCmdPanel(UIComponent panel) {

    // skip if this panel has already children
    if (!panel.getChildren().isEmpty()) {
      return;
    }

    FacesContext facesContext = FacesContext.getCurrentInstance();

        for (int i = 0; i  ob.getImgObjects.size(); i++) {
            ImgObj img = ob.getImgObjects.get(i);
            UILinkCommand linkCommand = (UILinkCommand)
 ComponentUtil.createComponent(facesContext,

               UILinkCommand.COMPONENT_TYPE,

               TobagoConstants.RENDERER_TYPE_LINK,

               link + i);
            ComponentUtil.setStringProperty(linkCommand,
 TobagoConstants.ATTR_IMAGE, img.getIconUrl());
            panel.getChildren().add(linkCommand);
        }

    }



 In jsf the getter of the binding of a component is called once at
 component creation at the first rendering of the view.
 The setter is called if the getter returns null (with a UIComponent
 instance created by the framework) and at every restoreView.


 Your sould never store the component given by the setter somewhere, at
 least not longer than request scope.


 Hope this helps,

 Regards,
    Volker



 Any suggestions?

 Regards

 Hani



 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13      | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX:  +49 441 4082 355 | www.inexso.de




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] dynamic panels in tc:sheet

2009-10-16 Thread Volker Weber
Hi Hani,

2009/10/15 Abushammala, Hani (EXTERN: FTP)
extern.hani.abushamma...@volkswagen.de:
 Hi all.

 I would like to create a tc:sheet as follows:

 In want add a panel to a Colmun, which has many command elements for each
 row in the sheet.
 I have written a method to create a panel for the row object of the sheet,
 but
 i need help to bind the method with jstl or java to the panel.

 JSP:

    tc:sheet value=#{controller.objects} id=objectSheet var=object 
    tc:column id=col1 sortable=false
   tc:out value=#{object.attribut} id=t_out /
    /tc:column
     tc:column id=col2 sortable=false
   tc:panel binding=#{.}  id=t_panel /

tc:panel binding=#{controller.cmdPanel}  id=t_panel /

    /tc:column
    /tc:sheet

 Controller:


public UIComponent getCmdPanel() {
  // important return null here and create content in setCmdPanel()
  return null;
}


// create the content of dynamic panel in the bindinsg setter
// let jsf create the panel and just add content
public void setCmdPanel(UIComponent panel) {

// skip if this panel has already children
if (!panel.getChildren().isEmpty()) {
  return;
}

FacesContext facesContext = FacesContext.getCurrentInstance();

for (int i = 0; i  ob.getImgObjects.size(); i++) {
ImgObj img = ob.getImgObjects.get(i);
UILinkCommand linkCommand = (UILinkCommand)
ComponentUtil.createComponent(facesContext,

   UILinkCommand.COMPONENT_TYPE,

   TobagoConstants.RENDERER_TYPE_LINK,

   link + i);
ComponentUtil.setStringProperty(linkCommand,
TobagoConstants.ATTR_IMAGE, img.getIconUrl());
panel.getChildren().add(linkCommand);
}

}



In jsf the getter of the binding of a component is called once at
component creation at the first rendering of the view.
The setter is called if the getter returns null (with a UIComponent
instance created by the framework) and at every restoreView.


Your sould never store the component given by the setter somewhere, at
least not longer than request scope.


Hope this helps,

Regards,
Volker



 Any suggestions?

 Regards

 Hani



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] Error using paging (tc:sheet) in IE

2009-09-10 Thread Volker Weber
Hi Alf,

I think this is the above bug, or a similar one.

The IE submits a request on enter in the only one textfield and
executes the onKeydown code which makes an ajax request.

If there are more textfields the IE did not submit on enter and the
only submit is from the onKeydown code.

I checked a solution with return false in the eventHandler (also on
keyup and keypress) but this did not solve this Problem.


Maybe a tc:in somewhere out of sight ( in a layout cell with 0px ? )
could solve this.


Regards,
Volker


2009/9/10 Alf Felis alf.fe...@gmx.de:
 Hi Marcus,

 I'm not sure if this is the problem. Maybe I'm wrong, but I noticed that IE 
 sends two requests to the server if I start paging... FF only sends one 
 request. See below.

 The problem is not, that submitting the page doesn't post the parameter at 
 all. Or I have misunderstood the IE bug description :)

 I think the second request overwrites the first one.
 Because the second request has an empty value for parameter 
 _idJsp0::form-action it seems to be a simple reload without changing the 
 displayed row.

 First:  _idJsp0::form-action: _idJsp0:_idJsp1:ToRow
 Second: _idJsp0::form-action: 

 Hope that helps :)

 Regards

 Alf


 The examples below show the requested URIs with the parameters set (if any).

 Here the example (IE go from row 1 to row 50):
 --
 URI: /Tobago/org/apache/myfaces/tobago/renderkit/html/standard/blank.html
 URI: /Tobago/faces/TobagoTest.jsp
 Parameters:
 _idJsp0:_idJsp1::scrollPosition:
 _idJsp0::form-action: _idJsp0:_idJsp1:ToRow
 _idJsp0:_idJsp1::widths: ,381,
 jsf_tree: 1
 _idJsp0::context-path: /Tobago
 _idJsp0::action-position: 33px,286px,25px,14px
 jsf_viewid: /TobagoTest.jsp
 _idJsp0:_idJsp1::selected: ,
 affectedAjaxComponent: _idJsp0:_idJsp1
 _idJsp0:_idJsp1:ToRow::value: 50
 _:
 URI: /Tobago/faces/TobagoTest.jsp
 Parameters:
 _idJsp0:_idJsp1::scrollPosition:
 _idJsp0::form-action:
 _idJsp0:_idJsp1::widths: ,381,
 _idJsp0::context-path: /Tobago
 jsf_tree: 1
 _idJsp0::action-position: 33px,286px,25px,14px
 jsf_viewid: /TobagoTest.jsp
 _idJsp0:_idJsp1::selected: ,
 _idJsp0:_idJsp1:ToRow::value: 50
 _idJsp0::form-clientDimension: 1074;893
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/style/style.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/msie/style/style.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/tobago-sheet.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/scarborough/msie/style/tobago-sheet.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/tobago-sheet.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/msie/style/tobago-sheet.css
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/prototype.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/standard/msie/script/tobago.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/theme-config.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/theme-config.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/standard/script/theme-config.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago-sheet.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tobago-sheet.js
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/sheetFirstDisabled.gif
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/sheetPrevDisabled.gif
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/sheetNext.gif
 URI: 
 /Tobago/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/sheetLast.gif

 *
 The same with FF:
 -

 URI: /Tobago/faces/TobagoTest.jsp
 Parameters:
 _idJsp0:_idJsp1::scrollPosition:
 _idJsp0::form-action: _idJsp0:_idJsp1:ToRow
 _idJsp0:_idJsp1::widths: ,379,
 jsf_tree: 9
 _idJsp0::context-path: /Tobago
 _idJsp0::action-position: 0px,0px,0px,0px
 jsf_viewid: /TobagoTest.jsp
 _idJsp0:_idJsp1::selected: ,
 affectedAjaxComponent: _idJsp0:_idJsp1
 _idJsp0:_idJsp1:ToRow::value: 50
 _:



 -Ursprüngliche Nachricht-
 Von: Marcus Kröger marcus.kroe...@googlemail.com
 Gesendet: 10.09.09 12:00:29
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: [Tobago] Error using paging (tc:sheet) in IE

 Hi Alf,

 This is a known bug/feature within IE, look herehttps://connect.
 microsoft.com/IE/feedback/ViewFeedback.aspx?FeedbackID=389736

 So, as 

Re: [Tobago] Error using paging (tc:sheet) in IE

2009-09-09 Thread Volker Weber
Hi Alf,

can you try if it works when you put a tc:in somewhere outside the
sheet and only tc:out in the column?

I have no IE to test this myself.


Regards,
Volker

2009/9/9 Alf Felis alf.fe...@gmx.de:
 Hello,

 I found the problem :)

 If I change the column content from

 tc:out value=#{var} /
    ^^^
 to

 tc:in value=#{var} /
    ^^
 everything works fine!!!

 But I don't know why a tc:in instead of a tc:out solves the problem.

 If I use multiple tc:out, the error exist... as soon as I add one tc:in, the 
 paging works fine. Possibly a bug?

 I will update the bug entry in JIRA.

 Regards

 Alf

 -Ursprüngliche Nachricht-
 Von: Alf Felis alf.fe...@gmx.de
 Gesendet: 09.09.09 09:47:09
 An: MyFaces Discussion users@myfaces.apache.org
 Betreff: Re: [Tobago] Error using paging (tc:sheet) in IE


 Hello Bernd,

 thanks for your fast reply :)

 Yes, I tried the demo and it works in my IE... but I don't know why?!?
 My simple example still doesn't work :(

 I saw that many attributes are used in the demo... I will try to find out 
 which attribute is required to work for my IE.

 If someone has an idea, please give me a hint ;)

 Regards

 Alf


  -Ursprüngliche Nachricht-
  Von: Bernd Bohmann bernd.bohm...@atanion.com
  Gesendet: 08.09.09 19:05:28
  An: MyFaces Discussion users@myfaces.apache.org
  Betreff: Re: [Tobago] Error using paging (tc:sheet) in IE


  Hello Alf,
 
  just tested with http://myfaces.apache.org/tobago/demo.html in IE6 but
  Linux. Found no issue.
 
  Can you test the sheet with the online demo, please.
 
  Please clear all caches in IE.
 
  Regards
 
  Bernd
 
  On Tue, Sep 8, 2009 at 5:58 PM, Alf Felisalf.fe...@gmx.de wrote:
   Hello,
  
   I'm new to Tobago and I have a problem with sheet paging in IE (FF 
   works!). I think its a bug... possibly its my fault (IE settings?).
  
   Tabago Version: 1.0.22
   MyFaces: 1.1.6
   IE Version: 6
  
   When I type a row number to jump to and press enter, I notice, that the 
   server gets multiple requests.
  
   One of the requests from IE seems to be wrong... the parameter 
   _idJsp0::form-action, which contains the _idJsp0:_idJsp3:ToRow entry 
   in the first request, is empty! This request seems to be the problem.
  
   It seems that first the browser shows the correct result (jump to the 
   row; only visible for short) and than reloads the page and jumps back to 
   the old view.
  
   I already opened a Bug report in JIRA: TOBAGO-788
   But no answer so far :(
  
  
   Thanks for your help :)
  
   Alf
  
  
   My simple testpage:
  
   %@ taglib uri=http://myfaces.apache.org/tobago/component; prefix=tc%
   %@ taglib uri=http://java.sun.com/jsf/core; prefix=f%
  
   f:view
   tc:page width=400 height=300
   tc:sheet var=var
   value=#{tobagoTestBean.data}
   showPageRange=right
   showRowRange=left
   rows=25
   tc:column label=Col
   tc:out value=#{var} /
   /tc:column
   /tc:sheet
   /tc:page
   /f:view
  
   The test bean only provides a list of 100 strings.
  

 --
 Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3 -
 sicherer, schneller und einfacher! http://portal.gmx.net/de/go/atbrowser




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: t:selectOneMenu: value is not a valid option

2009-07-22 Thread Volker Weber
Hi Mike,

didn't this mean changing the getter/setter from Integer to Number, as
suggested,  should help?


Regards,
Volker

2009/7/21 Mike Kienenberger mkien...@gmail.com:
 Rather than String, try using Long for your accessors.

 By default, accessors for literals must either be String or Long or Double.

 #{1} is a new Long(1), not a new Integer(1).

 Yes, a converter will work automatically, so if you were to provide
 #{something that evaluates to an integer}, then everything would work
 as you expect.   But the problem is that you're not generating
 Integers.

 But, again, El returns Longs #{1}, Strings 1, and Doubles #{1.1}
 for literals, not Integers or any other type.

 So if you had a facelets toInt() method, you could do:
 #{myFunction:toInteger(1)}

 Your other option is to do what Rene suggests and provide a method
 that returns SelectItemLabel:String,Value:Integer select items from
 your java code

 On Tue, Jul 21, 2009 at 1:04 PM, SANTINI, Rafaelraf...@santini.eti.br wrote:
 Hi Volker,

 The problem also occurrs with itemValue=#{1}.

 The solution was change the getter e setter to accept and return Strings:

 public String getOpcao() {
   return (opcao != null ? opcao.toString() : null);
 }

 public void setOpcao(String opcao) {
   this.opcao = Integer.valueOf(opcao);
 }

 But, is not there a converter for this case?

 Thank you,

 Rafael Santini

 - Original Message - From: Volker Weber v.we...@inexso.de
 To: MyFaces Discussion users@myfaces.apache.org
 Sent: Tuesday, July 21, 2009 12:59 PM
 Subject: Re: t:selectOneMenu: value is not a valid option


 Hi Rafael,

 your itemValues are Strings, your bean expect Integer.

 you can change the getter and setter to accept and return Strings
 or try itemValue=#{1}, you may need to change from Integer to Number than.


 Regards,
   Volker

 2009/7/21 SANTINI, Rafael raf...@santini.eti.br:

 Hi,

 I can't figure out why the following code results in value is not a valid
 option:

 h:messages/
 h:form
 t:selectOneMenu value=#{bean.opcao} id=opcao
 f:selectItem itemLabel=Opção 1 itemValue=1/
 f:selectItem itemLabel=Opção 2 itemValue=2/
 f:selectItem itemLabel=Opção 3 itemValue=3/
 /t:selectOneMenu
 h:message for=opcao/
 h:commandButton value=OK/
 /h:form

 public class Bean {

 private Integer opcao;

 public Integer getOpcao() {
 return opcao;
 }

 public void setOpcao(Integer opcao) {
 this.opcao = opcao;
 }

 }

 Thanks,

 Rafael Santini







 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13      | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX:  +49 441 4082 355 | www.inexso.de






-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: t:selectOneMenu: value is not a valid option

2009-07-21 Thread Volker Weber
Hi Rafael,

your itemValues are Strings, your bean expect Integer.

you can change the getter and setter to accept and return Strings
or try itemValue=#{1}, you may need to change from Integer to Number than.


Regards,
Volker

2009/7/21 SANTINI, Rafael raf...@santini.eti.br:
 Hi,

 I can't figure out why the following code results in value is not a valid
 option:

 h:messages/
 h:form
  t:selectOneMenu value=#{bean.opcao} id=opcao
   f:selectItem itemLabel=Opção 1 itemValue=1/
   f:selectItem itemLabel=Opção 2 itemValue=2/
   f:selectItem itemLabel=Opção 3 itemValue=3/
  /t:selectOneMenu
  h:message for=opcao/
  h:commandButton value=OK/
 /h:form

 public class Bean {

   private Integer opcao;

   public Integer getOpcao() {
       return opcao;
   }

   public void setOpcao(Integer opcao) {
       this.opcao = opcao;
   }

 }

 Thanks,

 Rafael Santini







-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] Binding selected item from tx:selectOneChoice

2009-06-09 Thread Volker Weber
Hi Jarle,



2009/6/8 Jarle Halvorsen j...@multiplus.as:
 Thank you for the replies folks.

 I'm not that experienced with neither JSF nor Tobago, but I find it a bit 
 strange that I have to tie in a converter in this case.

Its plain jsf issue all value types except String need a Converter.
Some converters are bundled with jsf-api.

 Could you explain why I need one? The selectOneChoice is able to initially 
 set the correct selected object based on getSelectedServiceReportType(), if I 
 modify my test code to set the private selectedServiceReportType, without a 
 converter.

Let me explain how it works:

At render time while rendering the html option tags the current
selectItems value are compared with the selectOnes value to decide
setting the option selected.
The value of the html option is generated by invoke asString on the
converter, or if no converter just by toString() on the select items
value.
This is why the initially rendering works correct.

At submit time the submitted value is the same String which was
rendered as the option tags value attribute. If there is no converter
jsf can't convert this to a Object.
But ony if the result of converting is in the list of select Items the
selection is valid, otherwise you get the validation error.


 The converter interface defines methods for converting from String to Object 
 and from Object to String. In my case ServiceReportType is a complex type and 
 a conversion to it from a String would not be possible. In theory all my 
 ServiceReportTypes could have the same description/label. I'm confused as you 
 might have noticed.. :)

If it is not possible to vconvert from String, what it is in html, to
the object back, than it is not possible to use it as the items value.

One possiblity is to implement a converter which has internaly a List
of the items and make a conversion from list index  as String and from
String to index to return the correct value.


Regards,
Volker


 My focus has been on the SelectItem class. As far as I can see these objects 
 should be enough. Shouldn't the framework be able to forward the value of the 
 SelectItem(Object) to my bound controller property when selected, via a set 
 method?? At least this is the behaviour I'm used to other frameworks.

 Thanks again

 Jarle Halvorsen

 -Opprinnelig melding-
 Fra: weber.vol...@googlemail.com på vegne av Volker Weber
 Sendt: ma 08.06.2009 19:47
 Til: MyFaces Discussion
 Emne: Re: [Tobago] Binding selected item from tx:selectOneChoice

 Hi Jarle,

 you need a converter for ServiceReportType.


 Regards,
    Volker

 2009/6/8 Jarle Halvorsen j...@multiplus.as:
 Hi.



 Im on tobago 1.0.20



 I'm think I've missed something here. I just can't find out what is wrong
 with my code. I'm trying to bind the selected item of a selectOneChoice to a
 property on a controller.

 The selectOneChoice is initially rendered correctly with data from my
 database. But when I try to select from the list, I get a validation error,
 and the setSelectedServiceReportType to set the value back to the controller
 is never called. If I set the test up with an int og even a Long as values
 for the selectItems it all works fine..



 What am I doing wrong??



 I have this test code:



 jsp:

     tc:box label=Register New Report

   tc:panel

  f:facet name=layout

           tc:gridLayout columns=*;*; rows=fixed;
 border=0 /

       /f:facet

       tx:selectOneChoice label=Select One
 value=#{testController.selectedServiceReportType}

       f:selectItems
 value=#{testController.serviceReportTypes}/

      f:facet name=change

    tc:command
 action=#{testController.selectedServiceReportTypeAction}/

      /f:facet

       /tx:selectOneChoice



         tx:label value=TEsting/

   /tc:panel

     /tc:box





 controller:



 public class TestController {



   private ArrayListServiceReportType serviceReportTypes;

   private ServiceReportType selectedServiceReportType;



   public void setSelectedServiceReportType(ServiceReportType
 selectedServiceReportType) {

     this.selectedServiceReportType = selectedServiceReportType;

   }



   public ServiceReportType getSelectedServiceReportType() {

   return selectedServiceReportType;

   }



   public ArrayListSelectItem getServiceReportTypes() {

     if (serviceReportTypes == null) {

   serviceReportTypes = new ArrayListServiceReportType();

   for (int i = 0; i  3; i++) {

     ServiceReportType serviceReportType = new ServiceReportType();

     serviceReportType.setDescription(Decription  + i);

     serviceReportTypes.add(serviceReportType);

   }

     }



     ArrayListSelectItem selectItems = new

Re: [Tobago] Binding selected item from tx:selectOneChoice

2009-06-08 Thread Volker Weber
Hi Jarle,

you need a converter for ServiceReportType.


Regards,
Volker

2009/6/8 Jarle Halvorsen j...@multiplus.as:
 Hi.



 Im on tobago 1.0.20



 I'm think I've missed something here. I just can't find out what is wrong
 with my code. I'm trying to bind the selected item of a selectOneChoice to a
 property on a controller.

 The selectOneChoice is initially rendered correctly with data from my
 database. But when I try to select from the list, I get a validation error,
 and the setSelectedServiceReportType to set the value back to the controller
 is never called. If I set the test up with an int og even a Long as values
 for the selectItems it all works fine..



 What am I doing wrong??



 I have this test code:



 jsp:

     tc:box label=Register New Report

   tc:panel

  f:facet name=layout

           tc:gridLayout columns=*;*; rows=fixed;
 border=0 /

       /f:facet

       tx:selectOneChoice label=Select One
 value=#{testController.selectedServiceReportType}

       f:selectItems
 value=#{testController.serviceReportTypes}/

      f:facet name=change

    tc:command
 action=#{testController.selectedServiceReportTypeAction}/

      /f:facet

       /tx:selectOneChoice



         tx:label value=TEsting/

   /tc:panel

     /tc:box





 controller:



 public class TestController {



   private ArrayListServiceReportType serviceReportTypes;

   private ServiceReportType selectedServiceReportType;



   public void setSelectedServiceReportType(ServiceReportType
 selectedServiceReportType) {

     this.selectedServiceReportType = selectedServiceReportType;

   }



   public ServiceReportType getSelectedServiceReportType() {

   return selectedServiceReportType;

   }



   public ArrayListSelectItem getServiceReportTypes() {

     if (serviceReportTypes == null) {

   serviceReportTypes = new ArrayListServiceReportType();

   for (int i = 0; i  3; i++) {

     ServiceReportType serviceReportType = new ServiceReportType();

     serviceReportType.setDescription(Decription  + i);

     serviceReportTypes.add(serviceReportType);

   }

     }



     ArrayListSelectItem selectItems = new ArrayListSelectItem();

     for (ServiceReportType serviceReportType : serviceReportTypes) {

   selectItems.add(new SelectItem(serviceReportType,
 serviceReportType.getDescription()));

     }

     return selectItems;

   }



   public String selectedServiceReportTypeAction() {

     return OK;

   }



 }



 ServiceReportType entity (which is Hibernate mapped):



 public class ServiceReportType implements Serializable {



   private static final long serialVersionUID = 2869236275653791385L;



   private Long id;

   private String typeCode;

   private String description;



   public Long getId() {

     return id;

   }



   public void setId(Long id) {

     this.id = id;

   }



   public String getTypeCode() {

     return typeCode;

   }



   public void setTypeCode(String typeCode) {

     this.typeCode = typeCode;

   }



   public String getDescription() {

     return description;

   }



   public void setDescription(String description) {

     this.description = description;

   }



 }





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [MyFaces][Core] TimeZone problem

2009-05-27 Thread Volker Weber
Hi Guy,

the valuebinding should return a TimeZone object not a String.


Regards,
Volker

2009/5/27 Guy Bashan guy.bas...@gmail.com:
 Hi all,

 I am trying to use f:convertDateTime with String value:
   h:outputText
 value=#{cmp_summary.cmpCampaign.cmpDeliveryLimits.startDate}
     f:convertDateTime locale=#{appBean.userLanguageLocale}
 timeZone=#{cmp_summary.cmpCampaign.timeZone} type=both /
   /h:outputText

 but I am getting this exception:
 java.lang.IllegalArgumentException: Cannot convert Asia/Tokyo of type class
 java.lang.String to class java.util.TimeZone
     at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:380)
     at
 org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)
     at
 org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:101)
     at
 org.apache.myfaces.shared_impl.taglib.UIComponentELTagUtils.evaluateValueExpression(UIComponentELTagUtils.java:378)
     at
 org.apache.myfaces.taglib.core.ConvertDateTimeTag.setConverterTimeZone(ConvertDateTimeTag.java:213)
     at
 org.apache.myfaces.taglib.core.ConvertDateTimeTag.createConverter(ConvertDateTimeTag.java:137)
     at javax.faces.webapp.ConverterELTag.doStartTag(ConverterELTag.java:62)
     at
 org.apache.myfaces.taglib.core.ConvertDateTimeTag.doStartTag(ConvertDateTimeTag.java:125)
     at
 org.apache.jsp.cmp_005fsummary_jsp._jspx_meth_f_005fconvertDateTime_005f1(cmp_005fsummary_jsp.java:11871)
     at
 org.apache.jsp.cmp_005fsummary_jsp._jspx_meth_h_005foutputText_005f149(cmp_005fsummary_jsp.java:11836)
     at
 org.apache.jsp.cmp_005fsummary_jsp._jspService(cmp_005fsummary_jsp.java:892)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
     at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
     at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630)
     at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
     at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
     at
 org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
     at
 org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341)
     at
 org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
     at
 org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
     at
 org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
     at
 org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
     at
 org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
     at
 org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155)
     at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
     at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
     at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
     at
 org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
     at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
     at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at
 org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:301)
     at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at
 com.todacell.ui.view.filter.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:97)
     at
 com.todacell.ui.view.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:61)
     at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
     at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
     at
 

Re: [Tobago] How to use markup-attribute on columns

2009-03-24 Thread Volker Weber
Hi Roland,

is this a typo or did you have different spellings in the jsp, css and
the tobago-theme.xml?

hierarchiebezeichner2 vs hierarchie_bezeichner_2

markup on column should work on 1.0.12 afaik.

Regards,
Volker

2009/3/24 Roland Asmann roland.asm...@cfc.at:
 Hi all,

 I'm trying to get the markup-attribute on the column to work, but it keeps on
 ignoring everything I do... Could someone please give me some pointers?

 I currently have the following in my JSP:
 tc:column markup=hierarchiebezeichner2 label= align=left

 I'm using a seperate JAR with the theme, so I have defined the
 tobago-theme.xml file like this:
 ?xml version=1.0 encoding=UTF-8?
 tobago-theme
  nameplaco/name
  resource-pathorg/apache/myfaces/tobago/renderkit/resource-path
  fallbackcfc/fallback
  renderers
    renderer
      nameColumn/name
      supported-markup
        markuphierarchie_bezeichner_2/markup
      /supported-markup
    /renderer
  /renderers
 /tobago-theme

 With the theme.xml there's a CSS:
 .tobago-column-markup-hierarchiebezeichner2 {
        background-color: red;
 }

 However, Tobago keeps on insisting that it doesn't know this definition:
 Calling isMarkupSupported column hierarchiebezeichner2 but no configuration
 found

 I think it doesn't load the markups because the column doesn't seem to have a
 renderer associated...

 I'm using Tobago 1.0.12 and currently am unable to upgrade... Any thoughts on
 how I can solve this problem?

 Thanks.

 --
 Roland Asmann

 CFC Informationssysteme Entwicklungsgesellschaft m.b.H
 Bäckerstrasse 1/2/7
 A-1010 Wien
 FN 266155f, Handelsgericht Wien

 Tel.: +43/1/513 88 77 - 27
 Fax.: +43/1/513 88 62
 Email: roland.asm...@cfc.at
 Web: www.cfc.at




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: Dynamic DataTables

2009-03-04 Thread Volker Weber
Hi Vinaya,

you can use the binding attribute and populate and setup the datatable
in the bindings setter.
This is how we create dynamic panel content, put this works for every
UIComponent.

http://wiki.apache.org/myfaces/Programmatic

I suggest to return null in the getter and setup the Component (if
needed, you should  check this by comparing the children) in the
setter.


Regards,
Volker


2009/3/3 Vinaya Tirikkovalluru vinaya.tirikkovall...@converge.com:
 Hi,

 I am looking to generate t:datatables dynamically.
 Each table will have a different datasource and different columns

 Thanks
 Vinaya

 -Original Message-
 From: Simon Kitching [mailto:skitch...@apache.org]
 Sent: Saturday, February 28, 2009 2:55 AM
 To: MyFaces Discussion
 Subject: Re: Dynamic DataTables

 On Fri, 2009-02-27 at 16:17 -0500, Vinaya Tirikkovalluru wrote:
 Hi,



 I hope some of you might have already got the code to generate the
 Dynamic DataTables.

 If you want help on emailing lists, you really need to write more
 descriptive emails than this. Dynamic DataTables could mean many
 different things...

 Perhaps the tomahawk t:columns component is what you are looking for?
 http://myfaces.apache.org/tomahawk-project/tomahawk12/tagdoc/t_columns.h
 tml

 Regards, Simon



 This electronic message is intended only for the use of the individual(s) or 
 entity(ies) named above and may contain information which is privileged 
 and/or confidential.  If you are not the intended recipient, be aware that 
 any disclosure, copying, distribution, dissemination or use of the contents 
 of this message is prohibited.  If you received this message in error, please 
 notify the sender immediately.




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] JMS Listener

2009-03-03 Thread Volker Weber
Hi,

The facesContext is available only on a http request mapped to FacesServlet.

Outside of such request you can create a FacesContext yourself if you
really need it
(see NonFacesRequestServlet)  but you need a ServletContext at least.


Regards,
Volker

2009/3/3 Bravo Villegas Salvador Francisco sbr...@sigmatao.com:
 Hi All,



 I have the following class:

     “public class JMSListener implements MessageListener {“



 And on the onMessage() method I put this:

 “Map map =
 FacesContext.getCurrentInstance().getExternalContext().getApplicationMap();”



 But it cannot access the current instance of Faces, any idea why I can’t
 access???



 Regards

 SB



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: Duplicate Id problem with panelNavigation2

2009-01-04 Thread Volker Weber
Hi Kai,

please try without forceId!

I don't know if it could help, but forceId is very evil. And as log as
forceId is used you should always expect dublicateId exceptions.

see:
http://wiki.apache.org/myfaces/forceId#head-801527c2f31f404d73f943966595e2d0dd200d76

Regards,
Volker

2009/1/2 Kai Wiemer k_ae...@web.de:
 Hello together,
 I've got a problem concerning duplicated ids with tomahawks's
 panelNavigation2. My current configuration is tomahawk-1.1.8 and
 myfaces-1.2.5. Ok, here's the jsp:

 %...@taglib uri=http://java.sun.com/jsf/core; prefix=f%
 %...@taglib uri=http://java.sun.com/jsf/html; prefix=h%
 %...@taglib uri=http://java.sun.com/jsp/jstl/core; prefix=c%
 %...@taglib uri=http://myfaces.apache.org/tomahawk; prefix=t%
 !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN
   http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd;
 f:view
   html xmlns=http://www.w3.org/1999/xhtml;
   head
   /head
   body
   t:div id=navigation forceId=true
   t:div id=navigation-inside forceId=true
   h:form
   t:panelNavigation2 layout=list itemClass=navigationItem
   activeItemClass=selectedNavigationItem
 openItemClass=openNavigationItem
   t:navigationMenuItem value=Navigation Item 1
 action=welcome /
   t:navigationMenuItem value=Navigation Item 2
 action=welcome /
   t:navigationMenuItem value=Navigation Item 3
   t:navigationMenuItem value=Navigation Item 3.1
   t:navigationMenuItem value=Navigation Item 3.1.1
   action=noActionForThisExample /
   /t:navigationMenuItem
   /t:navigationMenuItem
   /t:panelNavigation2
   /h:form
   /t:div
   /t:div
   t:div id=main forceId=true
   t:div id=main-inside forceId=true
   h:form
   h:panelGrid border=0 columns=2
   h:outputText value=You are logged in as:/h:outputText
   h:outputText value=name (role: myRole)/h:outputText
   h:outputText value=old password/h:outputText
   h:inputSecret id=is1 required=true /
   h:outputText value=new password/h:outputText
   h:inputSecret id=is2 required=true /
   h:outputText value=repeat new password/h:outputText
   h:inputSecret id=is3 required=true /
   h:outputText /
   h:commandButton styleClass=dialogButton value=save
   action=noActionForThisExample/h:commandButton
   /h:panelGrid
   h:message for=is1 /
   h:message for=is2 /
   h:message for=is3 /
   /h:form
   /t:div
   /t:div
   /body
   /html
 /f:view

 Now the web.xml:

 ?xml version=1.0 encoding=UTF-8?
 web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:web=http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 id=WebApp_ID version=2.5
 display-nameKeineahnung/display-name
 welcome-file-list
 welcome-fileindex.html/welcome-file
 welcome-fileindex.htm/welcome-file
 welcome-fileindex.jsp/welcome-file
 welcome-filedefault.html/welcome-file
 welcome-filedefault.htm/welcome-file
 welcome-filedefault.jsp/welcome-file
 /welcome-file-list
 servlet
 servlet-nameFaces Servlet/servlet-name
 servlet-classjavax.faces.webapp.FacesServlet/servlet-class
 load-on-startup1/load-on-startup
 /servlet
 servlet-mapping
 servlet-nameFaces Servlet/servlet-name
 url-pattern*.jsf/url-pattern
 /servlet-mapping
 context-param
 param-namejavax.faces.STATE_SAVING_METHOD/param-name
 param-valueclient/param-value
 /context-param

  !-- TOMAHAWK --
 filter
 filter-nameMyFacesExtensionsFilter/filter-name
 filter-classorg.apache.myfaces.webapp.filter.ExtensionsFilter/filter-class
 !--
 filter-classorg.apache.myfaces.component.html.util.ExtensionsFilter/filter-class
 --
 init-param
 param-nameuploadMaxFileSize/param-name
 param-value10m/param-value
 /init-param
 init-param
 param-nameuploadThresholdSize/param-name
 param-value50k/param-value
 /init-param
 init-param
 param-nameuploadRepositoryPath/param-name
 param-value/tmp/param-value
 /init-param
 /filter
 filter-mapping
 filter-nameMyFacesExtensionsFilter/filter-name
 url-pattern*.jsf/url-pattern
 /filter-mapping
 filter-mapping
 filter-nameMyFacesExtensionsFilter/filter-name
 url-pattern/faces/myFacesExtensionResource/*/url-pattern
 /filter-mapping
   !-- TOMAHAWK --
 /web-app

 faces-config.xml is empty and finally the errormessage i receive when
 clicking on save button (maybe html is more comfprtable?
 http://www.grafik-und-text.de/files/error.html):

 Client-id : j_id_jsp_1037428323_3_j_id_jsp_1037428323_4_item0 is
 duplicated in the faces tree. Component :
 

Re: [myfaces] How do i prevent, that an unautherized user side enters the jsf-statemachine

2008-12-02 Thread Volker Weber
Try a (google) search for web.xml security

this is not myfaces nor jsf specific so you can use any solution you
found for javax.servlet technology


Regards,
Volker

2008/12/2 GroovieMan [EMAIL PROTECTED]:

 It would be a better help. if you will tell us, WHAT
 RAD had changed in the web.xml and stop telling
 us, what proprietary software you are using.

 Ya not sent this message via iPod device ?


 Nutulapati, Krishna wrote:

  You can add securrity constraints using security editor tool of RAD, in
 web.xml. Later you can define the groups in the deployment descriptor of


 --
 View this message in context: 
 http://www.nabble.com/-myfaces--How-do-i-prevent%2C-that-an-unautherized-user-side-enters-the-jsf-statemachine-tp20766520p20789100.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] How to escape from a validation error with an escape button

2008-11-28 Thread Volker Weber
Hi Groovy,

http://wiki.apache.org/myfaces/How_The_Immediate_Attribute_Works


Regards,
Volker

2008/11/28 Groovie [EMAIL PROTECTED]:

 Salut M'cs,

 i build a dialog with some tx:textarea and tx:in
 and a required=true attribute to these tag.
 Below that input field i add a [save] and a [cancel]
 button. When the user wants to save an forgot
 to enter some data into a required input field,
 the TOBAGO/Myfaces frameworks sends an error
 by marking the inputfield with a red frame and
 displays lower a error message.

 This is wonderful!!!

 But iff the user wants to leave an is pressing the
 cancel button, the same validation mechanism starts
 to block any further operation and the user remains
 in a error loop while he really wants to escape from
 this dialog.

 I also add a self implemented validation methode,
 but unfortunately this one is not beeing called.

 What can i do to disable the validation (like required=true)
 for any cancel operation ?

 Thank you
 Groovie

 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--How-to-escape-from-a-validation-error-with-an-escape-button-tp20730532p20730532.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] bug?? wrong order of processing incoming pages

2008-11-28 Thread Volker Weber
Hi Groovy,

the order of processing is the same as in the uiComponentTree.

A tab change is internally handled as an actionEvent, and your toolbar
action is in the tree before the tabgroup.
So the action is executed before the tabChangeAction updates the index.

You can try to fetch the actual index from the requestParameterMap.

regards,
  Volker

2008/11/28 Groovie [EMAIL PROTECTED]:

 Salut m'cs,

 this is now a little bit tricky, but i think theres a bug in Tobago.
 I implemented a page, that consists of the following:

 page
 --box
 client-side-tabs #1
 --sheet#1
 client-side-tabs #2
 --sheet#2
 panel
 --button-ok
 --button-canel


 This works perfectly. Both getter of a sheet list
 gets called, when the page is loaded. Both
 actions for the buttons can access a beans
 attribute, that represents the currently
 selected tab and perform the operation on the
 visible sheet items. Excellent!

 Now somebody decided to add two actions at
 the box border via f:facet name=toolBar
 and a tc:toolBar.
 The problem now is, that whenever i do change
 the tab and press a toolbars button, the action
 callback only see the old tab-setting and is performing
 the action on the wrong tab-side.

 I know, this would not be a problem, if i would
 use a server-side-tab, cause each tab change would
 update the beans register, before the toolbar
 action will fire an event.

 Ok, i have seen this under 1.0.19. Maybe you have
 to read in the entire page, befor you start to run the
 actions.
 Maybe i am wrong, cause the endtag of f:facet name=toolBar
 ends behind the /tc:toolbar.

 Somebody has a idea, what went wrong ?

 Thank you
 Groovie




 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--bug---wrong-order-of-processing-incoming-pages-tp20730799p20730799.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] How to show multiple lines with tx:textarea

2008-11-28 Thread Volker Weber
Hi Groovy,

tobago did not support client side font changes. The layout
calculation is done on the server
in px. The themes font size is defined in the themes, and the font
scaling on client is not known on the server side.

I could imagine a rows attribute on tc:textarea to give the
layoutManager a hint how many rows a fixed layout token should
calculate.
The default fixed for textarea is afaik not defined and so is the
themes default fixed (20px in speyside theme) used.

If you need such a hint feel free to create a feature request in jira.

Regards,
  Volker

2008/11/28 Groovie [EMAIL PROTECTED]:

 Salve Volker,

 thank you for your hint, its is working.
 But how does the 40px behave, when
 the user enlarges the font size.
 Does the textarea recalibrate himself,
 or do i run into the problem, that the
 text is gonna be cut away.

 For this reason, a rows or visible rows
 attribute would be a real help, cause
 the tag still know how many rows have
 to be shown!

 Groovy



 Volker Weber-5 wrote:

 Hi Groovy,

 2008/11/26 GroovieMan [EMAIL PROTECTED]:

 Salut Volker,

 thanks for your reply. Ah, that was a real delightment.
 It should looks like this:

 f:facet name=layout
tc:gridLayout rows=fixed;2;*/
 /f:facet

 where the secound gui element (in this case a tx:textfield)
 has 2 rows ?


 No 2 is not a valid token for the layout. You should e.g. use pixel:
 tc:gridLayout rows=fixed;40px;*/

 to get a textarea with 40px height. there is no possibility to specify the
 rows.

 Regards,

 Volker

 Groovie


 Volker Weber-5 wrote:

 Hi Groovy,

 set a height via the surrounding layout.


 Regards,
 Volker

 2008/11/26 Groovie [EMAIL PROTECTED]:

 Salut M'cs

 i would like to know, how to tell the tx:textarea tag, to
 show a box with i.e. 3 lines. I do miss a row(s) attribute,
 to show a textbox with a couple of viewable textline,
 quite similar to the tc:textarea rows=3 

 Any help is welcomed!

 Thanks in advance,
 Groovy


 --
 View this message in context:
 http://www.nabble.com/-TOBAGO--How-to-show-multiple-lines-with-%3Ctx%3Atextarea%3E-tp20699493p20699493.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13  | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX:  +49 441 4082 355 | www.inexso.de



 --
 View this message in context:
 http://www.nabble.com/-TOBAGO--How-to-show-multiple-lines-with-%3Ctx%3Atextarea%3E-tp20699493p20708446.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13  | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX:  +49 441 4082 355 | www.inexso.de



 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--How-to-show-multiple-lines-with-%3Ctx%3Atextarea%3E-tp20699493p20731961.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] How to show multiple lines with tx:textarea

2008-11-26 Thread Volker Weber
Hi Groovy,

set a height via the surrounding layout.


Regards,
Volker

2008/11/26 Groovie [EMAIL PROTECTED]:

 Salut M'cs

 i would like to know, how to tell the tx:textarea tag, to
 show a box with i.e. 3 lines. I do miss a row(s) attribute,
 to show a textbox with a couple of viewable textline,
 quite similar to the tc:textarea rows=3 

 Any help is welcomed!

 Thanks in advance,
 Groovy


 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--How-to-show-multiple-lines-with-%3Ctx%3Atextarea%3E-tp20699493p20699493.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] How to show multiple lines with tx:textarea

2008-11-26 Thread Volker Weber
Hi Groovy,

2008/11/26 GroovieMan [EMAIL PROTECTED]:

 Salut Volker,

 thanks for your reply. Ah, that was a real delightment.
 It should looks like this:

 f:facet name=layout
tc:gridLayout rows=fixed;2;*/
 /f:facet

 where the secound gui element (in this case a tx:textfield)
 has 2 rows ?


No 2 is not a valid token for the layout. You should e.g. use pixel:
tc:gridLayout rows=fixed;40px;*/

to get a textarea with 40px height. there is no possibility to specify the rows.

Regards,

Volker

 Groovie


 Volker Weber-5 wrote:

 Hi Groovy,

 set a height via the surrounding layout.


 Regards,
 Volker

 2008/11/26 Groovie [EMAIL PROTECTED]:

 Salut M'cs

 i would like to know, how to tell the tx:textarea tag, to
 show a box with i.e. 3 lines. I do miss a row(s) attribute,
 to show a textbox with a couple of viewable textline,
 quite similar to the tc:textarea rows=3 

 Any help is welcomed!

 Thanks in advance,
 Groovy


 --
 View this message in context:
 http://www.nabble.com/-TOBAGO--How-to-show-multiple-lines-with-%3Ctx%3Atextarea%3E-tp20699493p20699493.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13  | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX:  +49 441 4082 355 | www.inexso.de



 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--How-to-show-multiple-lines-with-%3Ctx%3Atextarea%3E-tp20699493p20708446.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: PhaseListener RESTORE_VIEW and RENDER_RESPONSE are called again

2008-11-25 Thread Volker Weber
Hi Stefan,

are you using redirect in navigation rules?


Regards,
Volker

2008/11/19 Stefan Kogler [EMAIL PROTECTED]:

 Hello everybody,

 I have a PhaseListener registered in the FacesConfig. And yes, I am sure
 that is registered once:

 javax.faces.event.PhaseListener[] listeners=
 ((LifecycleFactory)
 FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY))

 .getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE).getPhaseListeners();

 System.out.println(Registered PhaseListeners:);
 for(javax.faces.event.PhaseListener listener: listeners) {
 System.out.println(\t+ listener.getClass().getName());
 }
 == CONSOLE ==
 Registered PhaseListeners:
 org.apache.myfaces.trinidadinternal.context.TrinidadPhaseListener
 de.kathrein.webSessionHandler.PhaseListener


 Most requests run well but sometimes the Listener is called again with the
 phases RESTORE_VIEW and RENDER_RESPONSE only.
 Then the Lifecycle looks like this (within one request):

 RESTORE_VIEW(1)
 APPLY_REQUEST_VALUES(2)
 PROCESS_VALIDATIONS(3)
 UPDATE_MODEL_VALUES(4)
 INVOKE_APPLICATION(5)
 RENDER_RESPONSE(6)
 RESTORE_VIEW(1)
 RENDER_RESPONSE(6)

 How can i avoid the second call of these two phases? Has this something to
 do with the TrinidadPhaseListener?

 I am using MyFaces 1.1.5, Trinidad 1.0.5 on the IBM WASCE - Geronimo
 implementation.

 --
 Stefan Kogler
 Informationstechnik Organisation, ITO

 KATHREIN-Werke KG
 Anton-Kathrein-Straße 1-3
 P.O. Box 100 444
 83004 Rosenheim, Germany

 Tel.: +49 8031 184-5837
 Fax: +49 8031 184-525837

 E-Mail: [EMAIL PROTECTED]
 Internet: http://www.kathrein.de
 --
 Registergericht / Register court: Amtsgericht Traunstein, HRA 460 / local
 court Traunstein, certificate of registration no. 460
 Geschäftsführender persönlich haftender Gesellschafter / Personally liable
 managing partner: Prof. Dr. Dr. h.c. Anton Kathrein, Dipl.-Betriebswirt
 (MBA-equivalent)
 Erfüllungsort und Gerichtsstand / Place of performance and place of
 jurisdiction: Rosenheim

 This e-mail is confidential and may contain privileged information. If you
 have received this communication in error, please notify us immediately by
 responding to this email and then delete it from your system. The sender
 therefore does not accept liability for any errors or omissions in the
 contents of this message which arise as a result of e-mail transmission. We
 believe but do not warrant that this e-mail and any attachments are virus
 free. You must therefore take full responsibility for virus checking.




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO,BUG] better description what went wrong

2008-11-04 Thread Volker Weber
Hi Groovie,

2008/11/4 GroovieMan [EMAIL PROTECTED]:

 Salut Volker,

 (1) sorry to say this, but i need exactly an altering rendering
 of different controls. My job is to bring an Excel-Sheet
 into a web application, so -hello- the source (was) excel.

This should be possible with tc:sheet.


 Finally, it is not a true table that needs to be transfered.
 It is called a sheet, with a head, some groups of multiple-choice
 questions, that may consist of radio or check boxes and/or
 text fields, separated by some (sub) sections, that
 last not least will span over some colums.
 The layout of that sheet is data driven, somewhere in
 two database tables (the definition) and some other
 the values. The contents of questions may vary from
 associated  context.

 So what we did, we defined a couple (~~6) template
 viewer, that define some viewer, that i have to switch-on/off
 in dependency of the viewer-type, that is availiable for each row.



 (2) Now to your argumentation:


 Volker Weber-5 wrote:

Or how would you expect e.g. exel to render a column in one row but
not in the next?


 From the technical point of view, your comment is
 not absolutly correct, cause each row does contain
 exactly the same content as the other rows. By using the
 rendered attribute i only tell the presentation layer not to
 show theses elements on screen, but -in fact- they exist!!!

Each tc:column contains a pattern how to render the content for each
row, setting rendered=false depending on the row
is not possible even in excel (afaik).
What should excel show at cell C5 if you set rendered coumn C in row 5
to false, but to true in rows 1-4 and 6-...?
You must render something, maybe just an empty panel, or you have to
cut a hole into your display.


 -finally this is my view, but not yours and you coded it!! -


 (3) So maybe the tc:sheet is not the appropriate way for a viewer,
 but ok, i am flexible. I decided to use a tc:sheet, cause it
 give me a common layout for indentation, but maybe a facelet
 could do this too.

 The question is now, which kind of tag (or combination
 of tags) could be useful, to implement the viewer.

You can use the tc:sheet as in my last example:
tc:sheet ...
  tc:column label=...
   tc:panel
 tc:panel rendered=#{currentLine.booleanBeanAttrib1} 
   %-- content of cell when currentLine.booleanBeanAttrib1 is true --%
 /tc:panel
 tc:panel rendered=#{!currentLine.booleanBeanAttrib1 
currentLine.booleanBeanAttrib2} 
   %-- content of cell when currentLine.booleanBeanAttrib2 is true --%
 /tc:panel
 tc:panel rendered=#{! (currentLine.booleanBeanAttrib1 ||
currentLine.booleanBeanAttrib2)} 
   %-- content of cell otherwise --%
 /tc:panel
   /tc:panel
  /tc:column
...
/tc:sheet


This is an example of a c:choose with two c:when and a c:otherwise,
exact what you request in your first post.



 If do remeber of a tc:forEach tag, but i also noticed,
 that this tag is deprecated.

There is a foreach example, using c:foreach, somewhere in the tobagos
examples (i never looked into).

 As a consequence of this, if need somewhat like a for loop,
 that enrolls my ListofLines in the same way as your
 sheet you have done it. So coming back to the origin question,
 can i combine JSTL with Tobago, and what would be a good
 solution.

You can combine jstl with tobago, but not inside the sheet.
jstl is evaluated during build component tree phase of Simons
description. Once the component tree is created
the jstl is never evaluated again, but a component tree could be
rendered multiple times.
The rendering of sheets content is a rendering of each row multiple
times, this is after the (subview) was created,
and so changes in jstl are never evaluated again.


 Would it be possible to enroll a list in a tc:box and use a
 chosen over all of my possible views, containing tobago tags.
 What would i need to do, in order to make this viewer
 robust enough ?

I thing it is possible using a c:foreach to enroll your list if you
have no input elements in your cells,
because the row var of c:foreach did only exist on first rendering,
and only in jsf1.1 phases (afaik).
But i would prefer using tc:sheet.

Regards,

Volker



 Thank you
 Groovie





 Volker Weber-5 wrote:

 Hi Groovie,

 rendered works fine on tc:column.

 but you can't use the row variable for this, because the rendering of
 a column can't depend on the row.
 Or how would you expect e.g. exel to render a column in one row but
 not in the next?

 I thing what  you want is to render different content, row dependent,
 in the same column? Than you should use the rendered not on the
 column but on the out.

 tc:column label=...
   tc:panel
 tc:out rendered=#{currentLine.booleanBeanAttrib1} value=.../
 tc:out rendered=#{currentLine.booleanBeanAttrib2} value=.../
 tc:out rendered=#{currentLine.booleanBeanAttrib3} value=.../
   /tc:panel
 /tc:column

 The panel surrounding the tc:out is not needed, but without you will
 get

Re: [TOBAGO,BUG] better description what went wrong

2008-11-04 Thread Volker Weber
Hi Groovie,

rendered works fine on tc:column.

but you can't use the row variable for this, because the rendering of
a column can't depend on the row.
Or how would you expect e.g. exel to render a column in one row but
not in the next?

I thing what  you want is to render different content, row dependent,
in the same column? Than you should use the rendered not on the
column but on the out.

tc:column label=...
  tc:panel
tc:out rendered=#{currentLine.booleanBeanAttrib1} value=.../
tc:out rendered=#{currentLine.booleanBeanAttrib2} value=.../
tc:out rendered=#{currentLine.booleanBeanAttrib3} value=.../
  /tc:panel
/tc:column

The panel surrounding the tc:out is not needed, but without you will
get a warning about layout problems in the log file.

Regards,

Volker




2008/11/4 GroovieMan [EMAIL PROTECTED]:

 Hy Volker,

 the use of rendered will fail with tc:sheet variables, for (maybe
 the same reason as the JSTL problem).
 tc:columns rendered= ... runs perfectly with variables,
 that have been defined as beans on inside faces-config.xml.
 For any reason, the use of variable-declaration inside the tc:sheet
 (here currentLine) fails barely.
 The variable instance seems to exist, cause JSF can locate
 somewhat by using the expression currentLine.booleanBeanAttrib1,
 but the result is strange. Iff you use the debugger and place a
 breakpoint into the isBooleanBeanAttrib1 methode of your data-bean,
 then you may find out, that the method is never been called.
 Anyway the varibale #{currentLine.booleanBeanAttrib1} returns
 a true, ughh where did it come from ??? that's weired!!!

 In order to circumscribe the bug, i defined a listviewer boolean attribute
 and received the expected result.

 As a consequence of this, i assume that there is a bug in tobago,
 with the internal sheet-tag handling of the var(iable).

 Anyway any workaround is welcomed, cause this is a blocking-point
 for my work.

 Thank you all
 Groovie

 I opened a bug in Tobago for further discussing:

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




 Volker Weber-5 wrote:


 you can't use jstl inside a tc:sheet, because it evaluates not at
 rendering time.

 you can use the rendered attribute of tc:column :

 tc:sheet value=#{listviewer.showLines} id=sheet
columns=1*;1*;1*;1*;1*;1*
var=currentLine
[... deleted...]
selectable=single 

  tc:column rendered=#{currentLine.booleanBeanAttrib1}
label=#{overviewBundle.selsyslst_lst_nameId}


 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--Usging-jstl-tags-inside-a-tobago-sheet-tag-tp20297480p20318017.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] Usging jstl tags inside a tobago sheet-tag

2008-11-03 Thread Volker Weber
Hi GroovieMan,

you can't use jstl inside a tc:sheet, because it evaluates not at
rendering time.


you can use the rendered attribute of tc:column :

tc:sheet value=#{listviewer.showLines} id=sheet
   columns=1*;1*;1*;1*;1*;1*
   var=currentLine
   [... deleted...]
   selectable=single 

 tc:column rendered=#{currentLine.booleanBeanAttrib1}
   label=#{overviewBundle.selsyslst_lst_nameId}
   id=t_sysId
   sortable=true
 tc:out value=#{currentLine.prName} id=v_sysId/
 /tc:column
 []

Regards,

Volker


2008/11/3 GroovieMan [EMAIL PROTECTED]:

 Salut,

 i need a conditional operation inside tobago's sheet-tag(table),
 allows me to enable a specific line layout, that in turn driven
 by a bean attribute in a list.

 It looks like this:

 The data is read out of a ListshowLineTO, where showLineTO has
 an atrrtibute, that will determine the layout of the shown line in the
 table. The sheet value is feeded with the ListshowLineTO, that
 works without any problem.

 Ok here's the jsp-code:

 tc:sheet value=#{listviewer.showLines} id=sheet
columns=1*;1*;1*;1*;1*;1*
var=currentLine
[... deleted...]
selectable=single 

  c:choose
c:when test=#{currentLine.booleanBeanAttrib1}

  tc:column label=#{overviewBundle.selsyslst_lst_nameId}
id=t_sysId
sortable=true
tc:out value=#{currentLine.prName} id=v_sysId/
  /tc:column
  []
/c:when
c:when test=#{currentLine.booleanBeanAttrib2}
/c:when
c:otherwise
/c:otherwise

 ... and so on.

 The problem here is, that the jstl expression inside

c:when test=#{currentLine.booleanBeanAttrib1}

 does not work. I also tried something with ${currentLine.booleanBeanAttrib1
 ..}
 but this failed too. I simply want to access the currentLine attribute, in
 order
 implement some variable table lookout.
 Also, the

  c:out value=${viewerTo.currentLine.booleanBeanAttrib1}/

 showd notging, regardless iff viewerTo has a request or a session scope.

 Does somebody has an idea, what i did wrong ?
 Thanks in advance, Groovy
 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--Usging-jstl-tags-inside-a-tobago-sheet-tag-tp20297480p20297480.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] How to debug debug transitions in navigation-rule's

2008-10-03 Thread Volker Weber
Hi,

this is logged at info level, set debug to level trace and you get
timing for every phase.

Regards,

Volker

2008/10/3 Groovie [EMAIL PROTECTED]:

 Hy,

 i get this:

   INFO DebugPhaseListener:65 - Total response time : 16815 milliseconds

 Did i miss something ?
 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--How-to-debug-debug-transitions-in-%3Cnavigation-rule%3E%27s-tp19772680p19792211.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [TOBAGO] How to debug debug transitions in navigation-rule's

2008-10-02 Thread Volker Weber
Hi Groovie,

add the DebugPhaseListener and set debuglevel to trace, to see how the
app goes through the  lifecycle.

You should also add a tc:messages tag to see if any error occurs,
which would result in the described behavior.


Regards,
Volker

2008/10/2 Groovie [EMAIL PROTECTED]:

 Dear sirs,

 regardless of any return my controllers send, i stay
 inside my first jsp-side. There are navigation rules,
 that would permit a transition to another page, but
 my FACES/TOBAGO server does not want to go.

 Reading/Writing from Beans does work, so there
 may be not a fundamental big.

 How can i debug or log the current code ?
 --
 View this message in context: 
 http://www.nabble.com/-TOBAGO--How-to-debug-debug-transitions-in-%3Cnavigation-rule%3E%27s-tp19772680p19772680.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Trinidad] Strange subform behavior

2008-09-20 Thread Volker Weber
return a outcome != null in your action.

This will create a new view, so there are no submitted values in the components.

Regards,
  Volker

2008/9/19 Walter Mourão [EMAIL PROTECTED]:
 Hi Andrew,
 Is there a way to force all components (editable or not) to be refreshed
 from the bean values ?

 Thanks in advance,

 Walter Mourão
 http://waltermourao.com.br
 http://arcadian.com.br
 http://oriens.com.br



 On Wed, Sep 10, 2008 at 4:04 PM, Andrew Robinson
 [EMAIL PROTECTED] wrote:

 I wonder if a better idea is to address this from JSF or from the
 Input behavior. This is not restricted to the subform. The problem is
 that a component with a submitted value will not display a model value
 if the model value changes.

 This could be addressed by something like:

 tr:inputText value=#{bean.value}
  trs:modelChangeBehavior /
 /tr:inputText

 The modelChangeBehavior would be a component that would clear the
 submitted value  local value when the value of the
 EditableValueHolder parent (requirement) changes between the end of
 the APPLY_REQUEST_VALUES phase and the end of the INVOKE_APPLICATION
 phase.

 Note that this can be done in JSF 1.2 without a custom component by
 using the f:phaseListener / tag. This may be the best solution.

 How to implement:
 1) Add f:phaseListener /
 2) Have that bound to a managed bean (request scope)
 3) Have that managed bean implement PhaseListener
 4) Use ANY_PHASE for the PhaseId
 5) on APPLY_REQUEST_VALUES get the component (use component binding is
 the best solution I guess)
 6) get the value attribute  store it somewhere (in the bean probably
 best)
 7) in INVOKE_APPLICATION, check the value and see if it changed. If
 so, then clear the component

 -Andrew


 On Wed, Sep 10, 2008 at 12:25 PM, Walter Mourão [EMAIL PROTECTED]
 wrote:
  I will try the Andrew's workaround and/or try another way to accomplish
  what
  I want.
 
  I will defend my point of view because:
  1 - PPR already allows perfectly one to avoid refresh some of the view,
  so
  it is possible to have control when it is not desired to refresh a
  subform;
  2 - tr:outputText and tr:inputText should have a similar behavior when
  showing the property value.
 
  Thank you very much, guys.
 
  Walter Mourão
  http://waltermourao.com.br
  http://arcadian.com.br
  http://oriens.com.br
 
 
 
  On Wed, Sep 10, 2008 at 3:12 PM, Andrew Robinson
  [EMAIL PROTECTED] wrote:
 
  IMO, the user is submitting the subform, not the entire page,
  therefore only the subform values should be sent  everything else
  lost right? Perhaps a toggle option would be desired. I can see the
  value of both approaches.
 
  Using two different tr:forms would theoretically work, but that is not
  always easy to visually use. I would think that this would be
  discussed before any thought of a fix could be made. It just seems
  that there is no support for Walter's use case. I would think that it
  would be possible to come up with both use cases of (1) preserving
  current input components values that the client entered and (2) losing
  the values to reflect changes to the model.
 
  Right now, JSF treats use case #2 very poorly and the standard
  work-around is to clear the submitted value and local values from
  EditableValueHolders when it is desired to reset their rendered state
  to their model values.
 
  Maybe the subform is not the best place to fix this, I am not sure.
 
  -Andrew
 
  On Wed, Sep 10, 2008 at 11:58 AM, Walter Mourão
  [EMAIL PROTECTED]
  wrote:
   Hi Volker,
  
   I think the question is not if it was submitted or not but if all the
   visible references (inputText, outputText or everything else) of a
   property
   instance show its current value when the view is rendered.
  
   Regards,
  
   Walter Mourão
   http://waltermourao.com.br
   http://arcadian.com.br
   http://oriens.com.br
  
  
  
   On Wed, Sep 10, 2008 at 2:12 PM, Volker Weber [EMAIL PROTECTED]
   wrote:
  
   Hi,
  
   why would you expect a not submited subform should loose changes
   made
   on the client (the submitted value)?
  
   This is exact the behavior i would expect. And BTW how the tobago
   subform
   works.
  
  
   Regards,
  Volker
  
   2008/9/10 Andrew Robinson [EMAIL PROTECTED]:
Okay, I know the problem:
   
The Subform allows the decode phase of all the children,
regardless
of
what was clicked on. If an event was queued inside of the subform,
but
not during the apply phase, the form is considered submitted.
Only
the submitted form will be validated  updated.
   
Now, UIXInput (and UIInput) render the submitted value as the
current
value if it is set. Therefore:
   
1) subform 1 is submitted
2) subform 1  2 are decoded, storing the submitted value ( for
the
inputText in the 2nd subform)
3) subform 1 is validated
4) subform 1 is updated
5) render subform 1, inputText renders the value attribute
6) render subform 2, inputText renders

Re: [tobago] actionListener on tab selection

2008-09-11 Thread Volker Weber
Hi Zied,


2008/9/11 Zied Hamdi [EMAIL PROTECTED]:
 Hi all,

 I need to load data on a tab click (having the switchMode=reloadTab or
 reloadPage), I notice there is no action, actionListener attributes is
 there a way to be notified on the server about a tab change. The other
 solution I see is to check on every page load the state of the tabGroup, but
 this is not an event approach...

 I've found tabChangeListener but it doesn't respond to my need as I need to
 do a method binding on my current controller (wich is passsed as an include
 parameter)...

You can create and invoke a methodBinding in the tabChangeListener:
  Application.createMethodBinding(#{controller.method},
ParameterClasses[]).invoke(facesContext, parmeters[])

In tobago-1.1 the tabChangeListener is an actionListener.

Regards,
Volker



 Regrads,
 Zied

 --
 Zied Hamdi
 www.into-i.fr
 (previously in 2003)
 zatreex.sf.net




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Trinidad] Strange subform behavior

2008-09-10 Thread Volker Weber
Hi,

why would you expect a not submited subform should loose changes made
on the client (the submitted value)?

This is exact the behavior i would expect. And BTW how the tobago subform works.


Regards,
Volker

2008/9/10 Andrew Robinson [EMAIL PROTECTED]:
 Okay, I know the problem:

 The Subform allows the decode phase of all the children, regardless of
 what was clicked on. If an event was queued inside of the subform, but
 not during the apply phase, the form is considered submitted. Only
 the submitted form will be validated  updated.

 Now, UIXInput (and UIInput) render the submitted value as the current
 value if it is set. Therefore:

 1) subform 1 is submitted
 2) subform 1  2 are decoded, storing the submitted value ( for the
 inputText in the 2nd subform)
 3) subform 1 is validated
 4) subform 1 is updated
 5) render subform 1, inputText renders the value attribute
 6) render subform 2, inputText renders the submittedValue attribute
 (blank string  - )

 So to me this looks like a design flaw of the subform component. IMO,
 I would file a bug. Fixing it based on looking at the current design
 could be a pain in the rear. I wonder how the Tomahawk subform handles
 the same situation?

 As a workaround, you would have to find all components under
 non-submitted subforms that implement EditableValueHolder and set
 their submitted value to null.

 -Andrew

 On Wed, Sep 10, 2008 at 8:03 AM, Walter Mourão [EMAIL PROTECTED] wrote:
 Actually it looks like the issue isn't related with PPR. I just tested
 without PPR (see code below)  and had the same result:

 ?xml version=1.0 encoding=iso-8859-1 standalone=yes ?
 jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=2.0
   xmlns:f=http://java.sun.com/jsf/core;
   xmlns:tr=http://myfaces.apache.org/trinidad; 
   jsp:directive.page contentType=text/html;charset=utf-8/
   f:view
 tr:document title=Apache Trinidad Blank Demo
tr:form
 tr:subform id=sub1
 tr:panelPage
   tr:outputText value=#{helloWorldBacking.name} /
   tr:inputText label=Your name id=input1
 value=#{helloWorldBacking.name} required=true/
   tr:commandButton id=button1 text=press me
 action=#{helloWorldBacking.send}/
 /tr:panelPage
 /tr:subform
 tr:subform id=sub2
 tr:panelPage
   tr:outputText value=#{helloWorldBacking.name} /
   tr:inputText label=Your name id=input1
 value=#{helloWorldBacking.name} required=true/
   tr:commandButton id=button1 text=press me
 action=#{helloWorldBacking.send}/
 /tr:panelPage
/tr:subform
/tr:form
 /tr:document
   /f:view
 /jsp:root


 Walter Mourão
 http://waltermourao.com.br
 http://arcadian.com.br
 http://oriens.com.br



 On Wed, Sep 10, 2008 at 10:13 AM, Andrew Robinson
 [EMAIL PROTECTED] wrote:

 Looks like you need to add partialTriggers to the components you want
 to update / refresh

 -A

 On Wed, Sep 10, 2008 at 4:50 AM, Walter Mourão [EMAIL PROTECTED]
 wrote:
  Sorry the bump, but I'm in a dead end... Does anybody know a workaround
  ?
 
 
  Walter Mourão
  http://waltermourao.com.br
  http://arcadian.com.br
  http://oriens.com.br
 
 
 
  On Sun, Sep 7, 2008 at 8:22 AM, Walter Mourão [EMAIL PROTECTED]
  wrote:
 
  Hi folks,
  I'm dealing with a strange behavior when using subforms and I
  reproduced
  it using the trinidad-blank example (from 1.0.9, but I found the
  problem
  first with 1.0.5).
  When executing an action from subform 1, only the inputs of the subform
  1
  are refreshed and show the new value. Besides that, when I added a
  tr:outputText to the subform, pointing to the same backing bean
  property, it
  shows the new value, so the tr:inputText and tr:outputText (of the
  subform
  2) shows differente values...
 
  To reproduce using the trinidad-blank example:
  1 - change HelloWorldBacking.send to:
public String send()
{
  _name = _name.toUpperCase();
 
  return null;
}
 
  2 - add the file two_subforms.jspx with the content:
  ?xml version=1.0 encoding=iso-8859-1 standalone=yes ?
  jsp:root xmlns:jsp=http://java.sun.com/JSP/Page; version=2.0
xmlns:f=http://java.sun.com/jsf/core;
xmlns:tr=http://myfaces.apache.org/trinidad; 
jsp:directive.page contentType=text/html;charset=utf-8/
f:view
  tr:document title=Apache Trinidad Blank Demo
 tr:form partialTriggers=sub1:button1 sub2:button1
  tr:subform id=sub1
  tr:panelPage
tr:outputText value=#{helloWorldBacking.name} /
tr:inputText label=Your name id=input1
  value=#{helloWorldBacking.name} required=true/
tr:commandButton id=button1 text=press me
  action=#{helloWorldBacking.send} partialSubmit=true/
  /tr:panelPage
  /tr:subform
  tr:subform id=sub2
  tr:panelPage
tr:outputText value=#{helloWorldBacking.name} /
tr:inputText label=Your name id=input1
  

Re: [tobago] is chrome in the plans

2008-09-05 Thread Volker Weber
Hi Zied,

2008/9/5 Zied Hamdi [EMAIL PROTECTED]:
 Hi,

 I was very excited to test the google browser Chrome and see how fast it
 is, the only problem is a layout space allocation with tobago (see image).

 I know this is a new product, the question is only: is there a work being
 done on Chrome integration?

Afaik not, and as long as there is no linux version of chrome i can't
even take a look on it.

Is the menubar working? When developing this component i wasn't able
to make it work on opera and therefor
we decided to concentrate on FF and IE.

If you, or someone else, is willing to jump in i could give startup
support pointing where to look and what to do.
Supporting a additional Browser should not be a problem as long as
just the layout has errors like in your screenshot.

Regards,
  Volker


 Thanks and regards,
 Zied

 --
 Zied Hamdi
 www.into-i.fr
 (previously in 2003)
 zatreex.sf.net




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [tobago] parsing warning by org.apache.myfaces.renderkit.html.util.ReducedHTMLParser

2008-09-04 Thread Volker Weber
Hi Zied,

2008/9/4 Zied Hamdi [EMAIL PROTECTED]:
 Hi,

 I have the following warning many times in logs:

 12:43:45,671 INFO [STDOUT] 2008-09-04 12:43:45,671 [http-127.0.0.1-8080-1]
 WARN org.apache.myfaces.renderkit.html.util.ReducedHTMLParser.parse(569) -
 Invalid tag found: unexpected input while looking for attr name or '/' at
 line 208. Surroundings: '\ href=\#\ onfocus=\tobago'.

 and he's right: here is a snippet of the output page:
 a class=\tobago-menuBar-item-span tobago-menuBar-item-span-enabled
 tobago-menuBar-item-span-top\ href=\#\ onfocus=\tobagoMenuFocus(event)\
 onblur=\tobagoMenuBlur(event)\ ...

this looks like a part of the javascript output to define a menu item.


 Is there a way to remove the java escape characters before double quotes
 from the output (if that is the problem).

no!

Seems there is a problem in the  ReducedHTMLParser: javascript should
not be parsed.


Regards,
Volker


 Regards,
 Zied
 --
 Zied Hamdi
 www.into-i.fr
 (previously in 2003)
 zatreex.sf.net




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] Tree add colums

2008-09-04 Thread Volker Weber
Hi Salvador,

2008/9/4 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi all,



 I have the following component



 tc:tree id=onLineResult

   value=#{sdpTreeBacker.newTree}

   state=#{sdpTreeBacker.treeState}

   idReference=userObject.id

 nameReference=userObject.name

   showIcons=true

   showJunctions=true

   showRoot=true

   showRootJunction=true

   tipReference=userObject.colorImageSemaforo

   mutable=false

   tc:column

 tc:out value=userObject.colorImageSemaforo /tc:out

   /tc:column

 /tc:tree



 And I need to add some columns to the tree nodes, with some extra
 information



 Is this possible?

 What I need to modify in order to add the columns that the one I added to
 the tc:tree

You need at least to modify Tree(Old)NodeRenderer.java and tree.js.
Both in scarborough theme.


Regards,
Volker




 Thanks in advance

 Regards,

 Salvador B.



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: commandbutton action not being invoked if form contains programatically-defined selectitems

2008-08-24 Thread Volker Weber
Hi Cedric,

2008/8/24 Cedric Hurst [EMAIL PROTECTED]:

 I have an h:form which contains two h:selectOneMenu elements.  These
 elements are being populated programatically with a f:selectItems tied to
 a JSF managed bean which returns ListSelectItem.  Unfortunately, when I
 attempt to click the h:commandButton to invoke an action, the action does
 not get processed.  I receive no error message, it just fails silently.  If

i can't find any h:messages tag to show the error messages in you jsf sources.
How could yo be sure there is no conversion/validation error?

Try adding a h:messages tag somewhere.

Regards,
Volker

 I remove the h:selectOneMenu elements from the code, the action is
 processed fine.  Here are some code snippets:

 JSP Code for the Form:

 h:form id=status
pToday, I'm working at
h:selectOneMenu value=#{event.placeId}
f:selectItem itemLabel=-- Select a location -- /
f:selectItems value=#{place.placeOptions}/
/h:selectOneMenu
 from

 h:selectOneMenu id=startTime value=#{event.start}
f:selectItems value=#{event.possibleStartTimes}/
 /h:selectOneMenu
 to
  h:selectOneMenu id=endTime value=#{event.finish}
f:selectItems value=#{event.possibleFinishTimes}/
 /h:selectOneMenu

h:commandButton action=#{event.createEventAction} 
 value=Mowork/
/p
 /h:form

 Managed Bean methods to Populate Menu Items:

 private ListSelectItem selectItemsFromTimeRange(Calendar begin, Calendar
 end)
 {
ListSelectItem items = new ArrayListSelectItem();

while(begin.compareTo(end)  0)
{
items.add(new SelectItem(
new Long(begin.getTimeInMillis()).toString(),
timeFormat.format(begin.getTime())
));

begin.add(Calendar.MINUTE, 15);
}

return items;
 }

 public ListSelectItem getPossibleStartTimes()
 {
Calendar time =
 Calendar.getInstance(TimeZone.getTimeZone(America/Chicago));

ListSelectItem items = new ArrayListSelectItem();

items.add(new SelectItem(
timeFormat.format(time.getTime()),
Right Now
));

Calendar begin = (Calendar)time.clone();
begin.add(Calendar.MINUTE, 1);
if(begin.get(Calendar.MINUTE)%15 != 0)
begin.add(Calendar.MINUTE, 15-(begin.get(Calendar.MINUTE)%15));

Calendar end = (Calendar)begin.clone();
end.add(Calendar.HOUR, 24);

items.addAll(selectItemsFromTimeRange(begin, end));

return items;
 }

 public ListSelectItem getPossibleFinishTimes()
 {
Calendar begin =
 Calendar.getInstance(TimeZone.getTimeZone(America/Chicago));
begin.add(Calendar.MINUTE, 15);
if(begin.get(Calendar.MINUTE)%15 != 0)
begin.add(Calendar.MINUTE, 15-(begin.get(Calendar.MINUTE)%15));

Calendar end = (Calendar)begin.clone();
end.add(Calendar.HOUR, 24);

return selectItemsFromTimeRange(begin, end);
 }

 Managed Bean method to Process Action:

 public String createEventAction()
 {
System.out.println(create event action is running);
return createEventSuccess;
 }

 The full codebase for working and non-working versions can also be found
 here:

 http://trac.assembla.com/moworking/browser/branches/CreateEventActionWorkingWithNoSelectItems?rev=63

 http://trac.assembla.com/moworking/browser/branches/CreateEventActionNotWorkingWithSelectItems?rev=65

 Please let me know if you have any suggestions.

 Environment
 ===
 MyFaces Core 1.2.3
 MyFaces Tomahawk 1.1.6
 Apache Geronimo 2.1.2 (Tomcat)
 Java HotSpot 1.5.0 64-bit Server VM
 Apple Mac OS X 10.5 (Leopard)
 Thanks,
 - C
 --
 View this message in context: 
 http://www.nabble.com/commandbutton-action-not-being-invoked-if-form-contains-programatically-defined-selectitems-tp19131952p19131952.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [MyFaces][Core] Command Link in a datatable

2008-08-04 Thread Volker Weber
Is the checkbox checked when you click the save link?

2008/8/3 Guy Bashan [EMAIL PROTECTED]:
 The value of #{editableVideo.edit} is connected to a selectBooleanCheckbox. 
 When pressing this checkbox, you can enter row to editable mode.
 The code of the checkbox is:

 h:selectBooleanCheckbox value=#{editableVideo.edit} onclick=submit(); /

 Thanks,
 Guy.

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Volker Weber
 Sent: Sunday, August 03, 2008 6:34 PM
 To: MyFaces Discussion
 Subject: Re: [MyFaces][Core] Command Link in a datatable

 Hi Guy,

 2008/8/3 Guy Bashan [EMAIL PROTECTED]:
 Hi,

 I am having a weird behavior with commandLink in a datatable:

 I want that the command link will be rendered only if a select box of that
 row is checked (it is a select box used for editing the row).

 This is the code of the command link:

   h:column

 f:facet name=header

   h:outputText value=Action/

 /f:facet

h:commandLink value=Save action=#{videoList.save}
 rendered=#{editableVideo.edit}

  f:param name=videoId value=#{editableVideo.video.videoId} /

/h:commandLink

  /h:column



 When I am pressing the save link, the page is posted but no action on the
 server is being activated.

 When I remove: rendered=#{editableVideo.edit}, save method is being
 called properly.



 Any ideas?

 Am I doing something wrong?

 What is the value of  #{editableVideo.edit} when you press the link?
 Your problem looks like the value of
 #{editableVideo.edit} changes between rendering and next request (the
 save click) from true to false.
 Maybe because you uncheck the selectbox before clicking the link?
 A action is not executed if the rendered evaluates to false at request
 processing time.




 Thanks,

 Guy.

 Regards,

   Volker Weber

 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13 | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX: +49 441 4082 355 | www.inexso.de





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [MyFaces][Core] Command Link in a datatable

2008-08-03 Thread Volker Weber
Hi Guy,

2008/8/3 Guy Bashan [EMAIL PROTECTED]:
 Hi,

 I am having a weird behavior with commandLink in a datatable:

 I want that the command link will be rendered only if a select box of that
 row is checked (it is a select box used for editing the row).

 This is the code of the command link:

   h:column

 f:facet name=header

   h:outputText value=Action/

 /f:facet

h:commandLink value=Save action=#{videoList.save}
 rendered=#{editableVideo.edit}

  f:param name=videoId value=#{editableVideo.video.videoId} /

/h:commandLink

  /h:column



 When I am pressing the save link, the page is posted but no action on the
 server is being activated.

 When I remove: rendered=#{editableVideo.edit}, save method is being
 called properly.



 Any ideas?

 Am I doing something wrong?

What is the value of  #{editableVideo.edit} when you press the link?
Your problem looks like the value of
#{editableVideo.edit} changes between rendering and next request (the
save click) from true to false.
Maybe because you uncheck the selectbox before clicking the link?
A action is not executed if the rendered evaluates to false at request
processing time.




 Thanks,

 Guy.

Regards,

   Volker Weber

-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: ReRendering of ComponentBindings fails

2008-07-30 Thread Volker Weber
Hi,

the  getter for a binding component is only invoked if the framework
need the component to create the
view. In case of rerendering the view is restored and not new created.

In case of restoring (and if the binding getter returns null) the
setter is invoked. If you want to populate the panelGrid you should do
this in the setter, and let the getter return null to let the
framework create the panelgrid component.

In the setter you should check the components children to decide if
you need to do something.


Regards,
Volker



2008/7/29 Eivind Ronnevik [EMAIL PROTECTED]:
 Hi!



 I have tried to post this question on the RichFaces user list, but I didn't
 get any replies there so I try here instead in case someone has some
 knowledge about my problem .



 I have a question when it comes to reRendering.



 If I have a h:outputText with a valuebinding pointing to a backing-beans
 property (session scoped), I can reRender this outputText if I my value in
 bb change.



 But If I have a h:panelGrid with componentBinding, and in the getter of the
 HtmlPanelGrid I add an OutputText-component programmatically, I can't
 reRender the HtmlPanelgrid with its children. The getter for the
 componentBinding is never asked.



 I've also tried to put my panelGrid inside an a4j:panel with
 ajaxRendered=true, but this didn't help me either.



 Am I missing something obvious here or shouldn't this work? :)



 So, this works:

 h:inputText id=myinput value=#{userBean.name}



 a4j:support event=onkeyup reRender=outtext /



 /h:inputText



 h:outputText id=outtext value=#{userBean.name} /



 But this doesnt:





 h:inputText id=myinput value=#{userBean.name}



 a4j:support event=onkeyup reRender=outPanel /



 /h:inputText



h:panelGrid id=outPanel binding=#{userBean.panelGrid}

   /h:panelGrid



 //- JAVA code for componentBinding
 ---



 public HtmlPanelGrid getPanelgrid()

 {

   HtmlOutpuText out = new HtmlOutputText();

   out.setValueExpression(FacesContext.
 getCurrent...#{userBean.name}..);



panelGrid.getChildren().add(out);



return panelGrid;



 }



 Any responses are greatly appreciated.



 Regards,



 Eivind Rønnevik



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] tc:sheet problems

2008-07-18 Thread Volker Weber
Hi Salvador,

sorry i still found no time to look into your sources.

Could you reproduce your problem in the 1.0.17 demo?
If so please describe at detail the steps to reproduce this and what
you expect to happen instead.


Regards,
Volker

2008/7/16 Volker Weber [EMAIL PROTECTED]:
 Hi Salvador,

 its the 1.0.17, you can see it in the menu: Help/About.


 Regards,
Volker

 2008/7/16 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi Volker,

 Do you know which version of the Tobago r u using in the link that u send 2 
 me.

 Regards,
 Salvador

 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Volker Weber
 Enviado el: Miércoles, 16 de Julio de 2008 02:42 a.m.
 Para: MyFaces Discussion
 Asunto: Re: [Tobago] tc:sheet problems

 Hi Salvador,

 i had no time to check your files yesterday, execept for a first quick
 look where i can't see any problems,
 i will try today evening (german time) again.

 I just took a look at the tobago demo at [1] and can't reproduce your 
 problem.
 Even on multiselect or single select mode i can select rows, page ,
 select more/other,
 page, page back an the rows are still selected, which means the
 selection was stored
  on server while  displaying a page without selection.
 No difference on which page start the test.

 Regards,
Volker


 [1]: http://tobago.atanion.net/tobago-example-demo/faces/overview/sheet.jsp


 2008/7/16 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 I also checked the tobago-example-demo-1.0.16
 And it also have the same Error that I have.
 You can't select any record of the page 2 and forwards, only all the 
 records of the 1st page.

 Any idea what could happens?


 Regards
 Salvador.
 -Mensaje original-
 De: Bravo Villegas Salvador Francisco [mailto:[EMAIL PROTECTED]
 Enviado el: Martes, 15 de Julio de 2008 09:56 a.m.
 Para: MyFaces Discussion
 Asunto: RE: [Tobago] tc:sheet problems

 Hi Volker,

 Sorry. I send the jsf and the beans related.

 Regards
 Salvador


 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Volker Weber
 Enviado el: Martes, 15 de Julio de 2008 02:01 a.m.
 Para: MyFaces Discussion
 Asunto: Re: [Tobago] tc:sheet problems

 Hi Salvador,

 please post the source of the jsf pages and the relevant beans.


 Regards,
Volker

 2008/7/15 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi all.



 I'm having a problem with tc:sheet.

 In the first page I can select all the records show in the table, but when 
 I
 change to a new page, I can only select the first record that show the 
 list,
 any idea what can be the problem?





 Regards

 Salvador B.



 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13 | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX: +49 441 4082 355 | www.inexso.de




 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13 | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX: +49 441 4082 355 | www.inexso.de




 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13 | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX: +49 441 4082 355 | www.inexso.de




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] tc:sheet problems

2008-07-16 Thread Volker Weber
Hi Salvador,

i had no time to check your files yesterday, execept for a first quick
look where i can't see any problems,
i will try today evening (german time) again.

I just took a look at the tobago demo at [1] and can't reproduce your problem.
Even on multiselect or single select mode i can select rows, page ,
select more/other,
page, page back an the rows are still selected, which means the
selection was stored
 on server while  displaying a page without selection.
No difference on which page start the test.

Regards,
Volker


[1]: http://tobago.atanion.net/tobago-example-demo/faces/overview/sheet.jsp


2008/7/16 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 I also checked the tobago-example-demo-1.0.16
 And it also have the same Error that I have.
 You can't select any record of the page 2 and forwards, only all the records 
 of the 1st page.

 Any idea what could happens?


 Regards
 Salvador.
 -Mensaje original-
 De: Bravo Villegas Salvador Francisco [mailto:[EMAIL PROTECTED]
 Enviado el: Martes, 15 de Julio de 2008 09:56 a.m.
 Para: MyFaces Discussion
 Asunto: RE: [Tobago] tc:sheet problems

 Hi Volker,

 Sorry. I send the jsf and the beans related.

 Regards
 Salvador


 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Volker Weber
 Enviado el: Martes, 15 de Julio de 2008 02:01 a.m.
 Para: MyFaces Discussion
 Asunto: Re: [Tobago] tc:sheet problems

 Hi Salvador,

 please post the source of the jsf pages and the relevant beans.


 Regards,
Volker

 2008/7/15 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi all.



 I'm having a problem with tc:sheet.

 In the first page I can select all the records show in the table, but when I
 change to a new page, I can only select the first record that show the list,
 any idea what can be the problem?





 Regards

 Salvador B.



 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13 | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX: +49 441 4082 355 | www.inexso.de




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] tc:sheet problems

2008-07-16 Thread Volker Weber
Hi Salvador,

its the 1.0.17, you can see it in the menu: Help/About.


Regards,
Volker

2008/7/16 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi Volker,

 Do you know which version of the Tobago r u using in the link that u send 2 
 me.

 Regards,
 Salvador

 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Volker Weber
 Enviado el: Miércoles, 16 de Julio de 2008 02:42 a.m.
 Para: MyFaces Discussion
 Asunto: Re: [Tobago] tc:sheet problems

 Hi Salvador,

 i had no time to check your files yesterday, execept for a first quick
 look where i can't see any problems,
 i will try today evening (german time) again.

 I just took a look at the tobago demo at [1] and can't reproduce your problem.
 Even on multiselect or single select mode i can select rows, page ,
 select more/other,
 page, page back an the rows are still selected, which means the
 selection was stored
  on server while  displaying a page without selection.
 No difference on which page start the test.

 Regards,
Volker


 [1]: http://tobago.atanion.net/tobago-example-demo/faces/overview/sheet.jsp


 2008/7/16 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 I also checked the tobago-example-demo-1.0.16
 And it also have the same Error that I have.
 You can't select any record of the page 2 and forwards, only all the records 
 of the 1st page.

 Any idea what could happens?


 Regards
 Salvador.
 -Mensaje original-
 De: Bravo Villegas Salvador Francisco [mailto:[EMAIL PROTECTED]
 Enviado el: Martes, 15 de Julio de 2008 09:56 a.m.
 Para: MyFaces Discussion
 Asunto: RE: [Tobago] tc:sheet problems

 Hi Volker,

 Sorry. I send the jsf and the beans related.

 Regards
 Salvador


 -Mensaje original-
 De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Volker Weber
 Enviado el: Martes, 15 de Julio de 2008 02:01 a.m.
 Para: MyFaces Discussion
 Asunto: Re: [Tobago] tc:sheet problems

 Hi Salvador,

 please post the source of the jsf pages and the relevant beans.


 Regards,
Volker

 2008/7/15 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi all.



 I'm having a problem with tc:sheet.

 In the first page I can select all the records show in the table, but when I
 change to a new page, I can only select the first record that show the list,
 any idea what can be the problem?





 Regards

 Salvador B.



 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13 | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX: +49 441 4082 355 | www.inexso.de




 --
 inexso - information exchange solutions GmbH
 Bismarckstraße 13 | 26122 Oldenburg
 Tel.: +49 441 4082 356 |
 FAX: +49 441 4082 355 | www.inexso.de




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] tc:sheet problems

2008-07-15 Thread Volker Weber
Hi Salvador,

please post the source of the jsf pages and the relevant beans.


Regards,
Volker

2008/7/15 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi all.



 I'm having a problem with tc:sheet.

 In the first page I can select all the records show in the table, but when I
 change to a new page, I can only select the first record that show the list,
 any idea what can be the problem?





 Regards

 Salvador B.



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] Retrieve sheet selected row value

2008-07-11 Thread Volker Weber
Hi Salvador,

you need to add the state attribute to the sheet, which points to a
SheetState[1] object.

then you can do :

 ListInteger indexes = sheetState.getSelectedRows();

which returns the list of selected row indexes, in case of
selectable=single just one.


Regards,
Volker


[1]: 
http://myfaces.apache.org/tobago/apidocs-1.0.17/org/apache/myfaces/tobago/model/SheetState.html

2008/7/11 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi  all,



 I have the sheet tc:sheet selectable=single in my .jsp

 How can I retrieve in my code the row selected?



 Thanks in advance.

 Regards,

 Salvador B.



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: How to set a converter default property?

2008-07-10 Thread Volker Weber
Hi,

don't you get ParseExceptions on deploy?

I don't  know if this is the problem, i never used property on validator,
but my idea complains about:

2008/7/10 [EMAIL PROTECTED] [EMAIL PROTECTED]:
 Hi, i try to set a default property for a converter in this way:
 validator
   validator-idxyValidtor/validator-name
^^ ^

   validator-classcom.xy.XyValidator/validator-class
   property
  property-namelength/property-name
  property-classjava.lang.Integer/property
   ^^^

  default-value40/default-value
   /property
 /validator

 I expected that setter-Methode of my Member length in the XyValidator-Class
 will called, but only the
 default Constructor is called, so why fails my setting of a
 Default-Property?

 Can someone help me please!?

 -Jörg




Regards,
   Volker

-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: How to set a converter default property?

2008-07-10 Thread Volker Weber
Hi simon,

2008/7/10 [EMAIL PROTECTED] [EMAIL PROTECTED]:

[...]
 The JSF standard does not support this. When defining a validator in a
 faces-config.xml file, the only supported xml elements are validator-id and
 validator-class.
[...]

The http://java.sun.com/dtd/web-facesconfig_1_1.dtd support property
on validator:

!--
The validator element represents a concrete Validator implementation
class that should be registered under the specified validator identifier.
Validator identifiers must be unique within the entire web application.

Nested attribute elements identify generic attributes that may be
configured on the corresponding UIComponent in order to affect the
operation of the Validator.  Nested property elements identify JavaBeans
properties of the Validator implementation class that may be configured
to affect the operation of the Validator.
--
!ELEMENT validator   (description*, display-name*, icon*,
validator-id, validator-class, attribute*, property*)


 Regards, Simon



Regards,
  Volker

-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [TRINIDAD] Unable to use Converter with tr:inputDate

2008-07-03 Thread Volker Weber
Hi!

IMO
  You should not use binding if you can avoid it !
  If you need the component in the bean it is better to do a lookup
via clientId.
/IMO

2008/7/3 dushyant agarwal [EMAIL PROTECTED]:
 Hi,
 I have JSF page which contains a tr:inputDate component as given below:-

 tr:inputDate binding=#{BB.inputDate1}/

have you tried:

tr:inputDate converter=#{BB.dateConverter} /

public Converter getDateConverter() {
  DateTimeConverter converter = new DateTimeConverter();//the Trinidad
DateTime Converter
  converter.setPattern(dd/MM/);
  return converter;
}


 As well as there is a commandButton
 tr:commandButton action=#{BB.action}

 In the Backing bean the action method is as follows:-
 public String action(){

 DateTimeConverter converter = new DateTimeConverter();//the Trinidad
 DateTime Converter
 converter.setPattern(dd/MM/);
 inputDate1.setConverter(converter);
 return null;

 }

 While running the JSF page, on clicking the button the converter does get
 applied, But after the Page gets rendered if the user again clicks on the
 calendar button to select a new date then a javascript error appears
 (/**incomprehensible**/). How else can I set the above mentioned converter
 on the inputDate cpmponent from the backing bean.

 pl. consider that I strictly need to set the converter from  the backing
 bean.

in the action? why?


Regards,
Volker


 Thanks,
 Dushyant




 
 Bollywood, fun, friendship, sports and more. You name it, we have it.



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: date conversion in tooltip ?

2008-07-01 Thread Volker Weber
Hi Michael,


2008/6/30 Michael Heinen [EMAIL PROTECTED]:
 I have to format a date inside a tooltip (or title attribute).

 Is there any way to apply a converter for a tooltip ?

afaik no.


 Or is it possible to call a converter via EL ?

afaik no.




 I fear that converters are always used with the value attribute of the outer
 tag.

 Any ideas ?

just one:

You can do many things using a managedBean implementing a java.util.Map.

class MyDateConverter extends AbstractMap {

  private SimpleDateFormat format = new SimpleDateFormat(dd.MM. hh:mm);

public Object get(Object key) {
   if (key instanceof Date) {
  return format.format((Date)key);
   }

  return null;
}

public Set entrySet() {}

}


tip=The date is #{myDateConverter[userBean.date]}








 Michael



Regards,
Volker


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: Value of ValueBinding in action

2008-06-17 Thread Volker Weber
Hi Mario,

i think your problem is the bundle. if this is a
f:loadBundle / var then it is not accessible before tag creation in
renderPhase.

you can try the s:loadBundle from sandbox.


Regards,
Volker



2008/6/17  [EMAIL PROTECTED]:
 Hi, I need to know, in my action, the value of a specific HtmlOutputText. In
 the action I have the HtmlOutputText component and I have its ValueBinding.
 The getExpressionString() of the ValueBinding return the string setted in my
 jsp page, for example #{bundle.surname} (setted in a bundle). How can I
 have the value returned from the bundle surname key?



 Thanks in advance

 Mario



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



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: collection within collection -- h:dataTable/

2008-06-10 Thread Volker Weber
Hi,

you may take a look at tomahawks columns tag [1]. I think you need to
convert the Set to List, but t:columns should work than.


Regards,
Volker

[1] : http://myfaces.apache.org/tomahawk/tlddoc/t/columns.html

2008/6/9 Wholesale Accuracy - Brennan O'Shea
[EMAIL PROTECTED]:
 I'm using h:dataTable to iterate over a List that contains Strings and a
 HashSet.  I've not been able how to figure out how to iterate over the Set
 within the List.  What I want to do is for each row in the List (of
 ItemMaster objects) show the data items at the root (stockNumber, model,
 description) in their respective columns.  Then iterate over the HashSet (of
 ItemDetail objects) continuing on the same row.  So on each row of the
 table, there would be columns for stockNumber, model, and description, and
 ALSO columns for the pertinent data fields within the details Set (e.g.,
 catalogNumber, retailPrice).  The JSP code below is working fine – I can see
 the Strings just fine in my table.  My question is, how do I loop through
 the Set within the List, showing those items on the same row?  If the answer
 is don't use a Set, use a List, that's fine too, however, I still have the
 same question.  Would I use a h:dataTable within a h:dataTable?  I've tried
 this without any success.  Is dataTable the correct control to use here?
 I've used Struts for years, and I know how I'd do this with the Struts
 logic:iterate tags… I'm just not sure how to do this using MyFaces.



 Thanks in advance,

 Brennan





 ItemBean.java:

 ListItemMaster items;

 (with getter method for items, of course)





 ItemMaster.java:

 String stockNumber;

 String model;

 String description;

 SetItemDetail details = new HashSetItemDetail;

 (with getter methods)





 ItemDetail.java:

 String catalogNumber;

 BigDecimal retailPrice = BigDecimal.ZERO;

 (with getter methods)





 itemList.jsp: (works fine with what is shown.  How do I show the data fields
 in the 'details' Set here?)

 h:dataTable value=#{itemBean.items} var=item

  h:column

f:facet name=header

 h:outputText value=Stock Number/

/f:facet

h:outputText value=#{item.stockNumber}/

  /h:column

  h:column

f:facet name=header

 h:outputText value=Model/

/f:facet

h:outputText value=#{item.model}/

  /h:column

  h:column

f:facet name=header

 h:outputText value=Description/

/f:facet

h:outputText value=#{item.description}/

  /h:column

  %-- Would like columns here with data items in the 'details' Set --%

 h:dataTable











-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: Datatable binding problem

2008-06-08 Thread Volker Weber
Hi Guy,


 One more thing: it seems that this code: htmlDataTableDayParts.getRowCount(); 
 always returns zero.
 Is it a proper behavior?

not if your datatable contains data.

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


Regards,
Volker



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: Datatable binding problem

2008-06-07 Thread Volker Weber
Hi Guy,

could you post your loop code?


Regards,
Volker



2008/6/7 Guy Bashan [EMAIL PROTECTED]:
 Hi again,



 In order to validate set of dropdowns in a datatable, I wrote a method to
 extract all components with a specific id (under that datatable), then  scan
 the returned values in a loop an and make sure values are properly set.

 The method is activated in the save action.

 It seems like the drop down component properties: value and
 submittedValue are  null.

 (The data is passed to the bean objects properly and saved to database, but
 when getting it directly from the component it returns a null value).



 Am I missing something?



 Thanks,

 Guy.





 From: Andrew Robinson [mailto:[EMAIL PROTECTED]
 Sent: Saturday, June 07, 2008 4:50 PM
 To: MyFaces Discussion
 Subject: Re: Datatable binding problem



 You are not understanding how JSF databinding works. I'll give you a brief
 overview, but I would strongly recommend that you stop development and read
 some articles on control binding before continuing.



 The binding happens at component construction time, not render time. If this
 does not click, then read my blog at http://andrewfacelets.blogspot.com.



 In your case, the binding happens when the component tree is built. Which
 means that the data table has no data, no var that is set, etc. A data table
 has only one set of components that are re-rendered for each value. There
 are not new components for each value. Think of it as a swing tree that has
 a node rendered that is called to render every node - there is only one.

 Sent from my iPod

 On Jun 7, 2008, at 2:53 AM, Guy Bashan [EMAIL PROTECTED] wrote:

 Hi All,



 I am having a little problem with datatable and binding.



 Here is the code:

 t:dataTable id=dayParts
 value=#{targetingParam.cmpTargetDayParts}

  var=dayPart cellpadding=0 cellspacing=0
 rowIndexVar=rowIndex

   t:column style=height:30px rendered=#{!dayPart.deleted}

 h:selectOneMenu value=#{dayPart.startHour}
 onchange=updateTargetingActivity(#{rowIndexParam});

  id=hourFrom styleClass=mform
 style=width:75px; converter=ByteConverter

   f:selectItems value=#{cmp_targeting.dayPartHoursFrom}/

 /h:selectOneMenu

 div

   h:message for=dayParts errorClass=error_message /

 /div

   /t:column

   /t:dataTable



 It works all fine, and I see a table with values on the screen. Now, when I
 add binding to the dropdown:

 binding=#{dayPart.htmlSelectOneMenuDaypartFrom}



 I get the following exception:

 org.apache.jasper.el.JspPropertyNotFoundException:
 /cmp_targeting.jsp(593,12) '#{dayPart.htmlSelectOneMenuDaypartFrom}' Target
 Unreachable, identifier 'dayPart' resolved to null

 at
 org.apache.jasper.el.JspValueExpression.setValue(JspValueExpression.java:91)

 at
 org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:315)

 at
 javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:91)

 at
 javax.faces.webapp.UIComponentClassicTagBase.findComponent(UIComponentClassicTagBase.java:1101)

 at
 javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:431)

 at
 org.apache.jsp.cmp_005ftargeting_jsp._jspx_meth_h_005fselectOneMenu_005f1(cmp_005ftargeting_jsp.java:5394)

 at
 org.apache.jsp.cmp_005ftargeting_jsp._jspx_meth_t_005fcolumn_005f4(cmp_005ftargeting_jsp.java:5343)

 at
 org.apache.jsp.cmp_005ftargeting_jsp._jspx_meth_t_005fdataTable_005f3(cmp_005ftargeting_jsp.java:5290)

 at
 org.apache.jsp.cmp_005ftargeting_jsp._jspService(cmp_005ftargeting_jsp.java:1042)

 at
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

 at
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)

 at
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)

 at
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)

 at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

 at
 org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)

 at
 org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)

 at
 org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:379)

 at
 

Re: Datatable binding problem

2008-06-07 Thread Volker Weber
Hi Guy,

seems like you also don't know how UIData works. I can't believe you
getComponents ever return more than one component in the list?


guessing the htmlDataTableDayParts is the UIData, try this:


private boolean validateDayParts()
 {
   boolean isOk = true;
   HtmlSelectOneMenu htmlSelectOneMenuFrom =
htmlDataTableDayParts.findComponent(''hourFrom);
   HtmlSelectOneMenu htmlSelectOneMenuTo =
htmlDataTableDayParts.findComponent(''hourTo);

   for (int i = 0; i  htmlDataTableDayParts.getRowCount(); i++) {
 htmlDataTableDayParts.setRowIndex(i);
 if (htmlSelectOneMenuFrom.getValue().equals(-1) ||
htmlSelectOneMenuTo.getValue().equals(-1))
 {
   isOk = false;
   htmlSelectOneMenuFrom.setValid(false);
   
FacesUtil.addErrorMessage(htmlSelectOneMenuFrom.getClientId(FacesUtil.getFacesContext()),
   #{bundle['cmp_targeting.time.fromTo.required']});
 }

  }
  htmlDataTableDayParts.setRowIndex(-1); //  this is important
  return isOk;
}


But i still dont understand why you need this having the values in the model.


Regards,
Volker



2008/6/7 Guy Bashan [EMAIL PROTECTED]:
 Hi Volker,

 Here are both methods I am using:
  private ListUIComponent getComponents(UIComponent rootComponent, String id)
  {
ListUIComponent components = rootComponent.getChildren();
ListUIComponent result = new ArrayListUIComponent();
for (UIComponent component : components)
{
  if (component.getId().equals(id))
  {
result.add(component);
  }

  result.addAll(getComponents(component, id));
}

return result;
  }

  private boolean validateDayParts()
  {
ListUIComponent hoursFrom = getComponents(htmlDataTableDayParts, 
 hourFrom);
ListUIComponent hoursTo = getComponents(htmlDataTableDayParts, hourTo);

boolean isOk = true;
for (int i = 0; i  hoursFrom.size(); i++)
{
  HtmlSelectOneMenu htmlSelectOneMenuFrom = 
 (HtmlSelectOneMenu)hoursFrom.get(i);
  HtmlSelectOneMenu htmlSelectOneMenuTo = 
 (HtmlSelectOneMenu)hoursTo.get(i);

  if (htmlSelectOneMenuFrom.getValue().equals(-1) || 
 htmlSelectOneMenuTo.getValue().equals(-1))
  {
isOk = false;
htmlSelectOneMenuFrom.setValid(false);

 FacesUtil.addErrorMessage(htmlSelectOneMenuFrom.getClientId(FacesUtil.getFacesContext()),
#{bundle['cmp_targeting.time.fromTo.required']});
  }
}

return isOk;
  }

 I call the method validateDayParts from a saveAction method that is 
 activated when pressing a command link.

 Thanks,
 Guy.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Volker Weber
 Sent: Saturday, June 07, 2008 9:41 PM
 To: MyFaces Discussion
 Subject: Re: Datatable binding problem

 Hi Guy,

 could you post your loop code?


 Regards,
Volker



 2008/6/7 Guy Bashan [EMAIL PROTECTED]:
 Hi again,



 In order to validate set of dropdowns in a datatable, I wrote a method to
 extract all components with a specific id (under that datatable), then  scan
 the returned values in a loop an and make sure values are properly set.

 The method is activated in the save action.

 It seems like the drop down component properties: value and
 submittedValue are  null.

 (The data is passed to the bean objects properly and saved to database, but
 when getting it directly from the component it returns a null value).



 Am I missing something?



 Thanks,

 Guy.





 From: Andrew Robinson [mailto:[EMAIL PROTECTED]
 Sent: Saturday, June 07, 2008 4:50 PM
 To: MyFaces Discussion
 Subject: Re: Datatable binding problem



 You are not understanding how JSF databinding works. I'll give you a brief
 overview, but I would strongly recommend that you stop development and read
 some articles on control binding before continuing.



 The binding happens at component construction time, not render time. If this
 does not click, then read my blog at http://andrewfacelets.blogspot.com.



 In your case, the binding happens when the component tree is built. Which
 means that the data table has no data, no var that is set, etc. A data table
 has only one set of components that are re-rendered for each value. There
 are not new components for each value. Think of it as a swing tree that has
 a node rendered that is called to render every node - there is only one.

 Sent from my iPod

 On Jun 7, 2008, at 2:53 AM, Guy Bashan [EMAIL PROTECTED] wrote:

 Hi All,



 I am having a little problem with datatable and binding.



 Here is the code:

 t:dataTable id=dayParts
 value=#{targetingParam.cmpTargetDayParts}

  var=dayPart cellpadding=0 cellspacing=0
 rowIndexVar=rowIndex

   t:column style=height:30px rendered=#{!dayPart.deleted}

 h:selectOneMenu value=#{dayPart.startHour}
 onchange=updateTargetingActivity(#{rowIndexParam});

  id=hourFrom styleClass=mform
 style=width:75px; converter=ByteConverter

   f:selectItems

Re: [Faces][Core]

2008-06-03 Thread Volker Weber
Hi Guy,

you can configure a bean with a getter which returns a appropriate
TimeZone.

f:dateTimeConverter timeZone=#{bean.timeZone} /

see this thread
http://www.mail-archive.com/users%40myfaces.apache.org/msg21412.html


Regards,
Volker

2008/6/3 Guy Bashan [EMAIL PROTECTED]:
 Thanks for your answer,
 Actually I was trying using GMT (UTC), but it still does the time
 shifting...

 I think I will simply fall back to simple java to show this specific date.

 Thanks,
 Guy.

 -Original Message-
 From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, June 03, 2008 1:30 AM
 To: MyFaces Discussion
 Subject: Re: [Faces][Core]

 Some ideas:

 1) Use GMT (or is it UTC?) and don't show the timezone in the output
 2) subclass convertDateTime to have a null timezone
 3) write your own converter

 I'd probably go with 1)

 On 6/2/08, Scott Belnap [EMAIL PROTECTED] wrote:
 Guy,

  If you want to just display what is in the database then don't use the
  convertDateTime tag.  The convertDateTime tag is used to convert the
  Date into a desired format or time zone.


  Scott


  On Mon, 2008-06-02 at 15:44 -0600, Guy Bashan wrote:
   Thanks for your replay,
   That is exactly my problem, I don't want to use timeZone, and I don't
 want
   java to do any shifting on the time using a default timeZone.
   For example, I have a date in db: 1/1/2008 00:00.
   I want the date to be shown exactly like that, without any timeZone
   shifting.
   I do want that the date will be formatted according to the given
 locale.
  
   Something like this:
   f:convertDateTime locale=#{appBean.userLanguageLocale} type=both
   timeZone=NONE /
  
   Is it possible? Or will I have to use java code for that?
  
   Thanks,
   Guy.
  
   -Original Message-
   From: Christopher Cudennec [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, June 03, 2008 12:05 AM
   To: MyFaces Discussion
   Subject: Re: [Faces][Core]
  
   Hi Guy,
  
   did you have look at Sun's documentation? You can pass a time zone to
   the converter. See
  
 http://java.sun.com/javaee/javaserverfaces/1.1_01/docs/tlddocs/f/convertDate
   Time.html
   for more information.
  
   Cheers,
  
   Christopher
  
   Guy Bashan schrieb:
Hi,
   
   
   
Is it possible not to make any time zone shifting in
 f:convertDateTime.
   
For example:
   
h:outputText
value=#{cmp_summary.cmpCampaign.cmpDeliveryLimits.startDate}
   
f:convertDateTime locale=#{appBean.userLanguageLocale}
type=both /
   
/h:outputText
   
   
   
I want to format the date according to the locale, but that no time
   shifting
will take place, since the exact value in db should be shown on
 screen.
   
   
   
Thanks,
   
Guy.
   
   
   
   
 
   
   
No virus found in this incoming message.
Checked by AVG.
Version: 8.0.100 / Virus Database: 269.24.4/1478 - Release Date:
   02.06.2008 07:12
   
  







-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] Sorting problems

2008-06-01 Thread Volker Weber
Hi Slavador,

what is the implementation of sheets value valuebinding ?

in the sorter you do a sheet.getValue() wich invokes the valueBinding method,
and at rendering the sheet did again a getValue() and therefore
reinvoke this method.


Regards,
Volker




2008/5/30 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 HI again



 I checked, and the problema is not the sorting method, it Works fine

 But the problems Is in the view, It doesn't refresh the list

 Ideas?



 

 De: Bravo Villegas Salvador Francisco [mailto:[EMAIL PROTECTED]
 Enviado el: Viernes, 30 de Mayo de 2008 12:54 p.m.
 Para: MyFaces Discussion
 Asunto: [Tobago] Sorting problems



 Hi All,



 I'm having troubles with the sort of a sheet in Tobago.

 But the info in the sheet doesn't get sorted by the column selected.



 What can be the problem?

 Any suggestion?



 In my JSP:

 tc:sheet ……….. . . . . .

   . . . . . . . .

   sortActionListener=#{accessBean.sheetSorter}

 tc:column label=#{overviewBundle.userLoginUser}

 id=userName sortable=true align=center



 In my Class:

 public void sheetSorter(ActionEvent event) {

 if (event instanceof SortActionEvent) {

   SortActionEvent sortEvent = (SortActionEvent) event;

   UIData sheet = sortEvent.getSheet();

   SheetState sheetState

 =
 sheet.getSheetState(FacesContext.getCurrentInstance());

   String columnId = sheetState.getSortedColumnId();

   ListUserLogin list = (ListUserLogin) sheet.getValue();

   ComparatorUserLogin comparator = null;

   if (userName.equals(columnId)) {

 comparator = new ComparatorUserLogin() {

  public int compare(UserLogin o1, UserLogin o2)
 {

return
 o1.getUserName().compareTo(o2.getUserName());

  }

 };

   }

   Collections.sort(list, comparator);

   for (Iterator iter = list.iterator(); iter.hasNext();) {


 System.out.println(iter.getClass().getName().toString());

   }

   if (!sheetState.isAscending()) {

 Collections.reverse(list);

   }

 }





 Regards



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] sheet language

2008-05-23 Thread Volker Weber
Hi Slavador,

you can put a spanish properties file int your applications
tobago-resource path.

the relevant file is html/scarborough/standard/property/tobago_[es].xml

look at  
org/apache/myfaces/tobago/renderkit/html/scarborough/standard/property/tobago.properties.xml
in tobago-scarborough.jar for used properties.

We are happy to accept translated properties to include into the distribution.


Regards,
Volker


2008/5/22 Bravo Villegas Salvador Francisco [EMAIL PROTECTED]:
 Hi All,



 I'm have a doubt, i'm using the tc:sheet but I put the showRowRange and
 showDirectLinks, the page show the the following legends, Rows 1 to 10 of
 88 and Page 1 of  9, but I need them in Spanish. Also I need to change
 the tooltip for the headers.



 Somebody know where I can change the language of this properties



 Thanks in advance

 Regards

 Salvador B.



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] a listbox in a popup

2008-05-22 Thread Volker Weber
Hi Tobias,

you need a converter to convert the selected value (which is a string
at postback time) back into a Autor object.
Also the selectedAuthor should be type Author, not SelectItem.

As an alternative you can make the selectedAuthor of type String and
create the selectItems from author.toString().
Then you don't need a converter, but got loose of the Author object as value.


Regards,
Volker

2008/5/21 Tobias Reifenstuel [EMAIL PROTECTED]:
 Hi Volker,

 thanks for the fast reply. I don't have any Author-Converter. I didn't know
 that I have to use them. I just added to my author a method whitch is called
 toString and is what the listbox is showing me.

 Regards,
 Tobi

 Volker Weber schrieb:

 Hi Tobias,

 i think this error message is because of a conversionError in the
 selectOneListbox.

 Could you post the code for the Author-Converter?


 Regards,
Volker

 2008/5/19 Tobias Reifenstuel [EMAIL PROTECTED]:


 Hi Helmut, hi All,

 thanks a lot for your help, but it still doesn't work. The syntax for the
 action listener method was right. I changed the binding to action, as you
 suggested, and now I get the following log message:

 2008-05-19 15:29:19 ERROR -
 org.apache.myfaces.tobago.context.ResourceManagerImpl:265 - Path not
 found,
 and no fallback. Using empty string.
 resourceDirs = '[tobago-resource, org/apache/myfaces/tobago/renderkit]'
 contentType = 'html' theme = 'speyside' browser = 'mozilla_5_0' subDir =
 'property' name = 'tobago' suffix = '' key =
 'javax.faces.component.UISelectOne.INVALID

 But i don't know why. Maybe there is something wrong with my backing
 bean:

  private ArrayListSelectItem authors;
private SelectItem selectedAuthor;
  ...
  public void onNew() {
  LOG.info(authors size:  + authors.size());
  Author author = new Author();
  author.setForename(Forename);
  author.setMiddleName(MiddleName);
  author.setSurname(Surename);
  authors.add(new SelectItem(author));
  LOG.info(authors size:  + authors.size());
  }

 ...

 all getter and setter methods are set.

 Thanks for any help.
 Tobi

 Helmut Swaczinna schrieb:


 Hi Tobi,

 I think it should work with an ActionListener but I prefer to use
 Actions
 for buttons. In this case returning
 null or void. One reason for not calling the ActionListener may be a
 wrong
 method signature. Must be
 public void onNew(ActionEvent e).

 Case 4: The id in the renderedPartially attribute is wrong. First, the
 box
 is not a naming container, so it is not
 part of the id, and second, the listbox is not an Ajax component
 (afaik),
 so it must be enclosed in a panel or just
 the box you already have.

 Hope that helps
 Helmut

 - Original Message - From: Tobias Reifenstuel [EMAIL PROTECTED]
 To: MyFaces Discussion users@myfaces.apache.org
 Sent: Sunday, May 18, 2008 12:55 PM
 Subject: Re: [Tobago] a listbox in a popup




 Hi Helmut,

 thanks for the fast answer. I tried your suggestion, but it still
 doesn't
 work. Here are my further tries:

 Case 3 (see code from the first mail except the part wiht the Add
 button)
 I changed this part of the code:

 tc:attribute name=renderedPartially value=:page:popup:box /

 The box seems to be reloaded (for a second I can see the scrollbar),
 but
 without the new value should be added over the onNew method
 (ActionListener).
 If I look into my logs the method is never called, but why? It is only
 called if I drop the renderedPartially attribute.


 Case 4
 tc:attribute name=renderedPartially value=:page:popup:box:listbox
 /
 Here the popup doesn't even show up.

 By the way I am using Tobago 1.0.16


 Thanks for any help.
 Tobi


 Helmut Swaczinna schrieb:


 Hi,

 you should render partially the box or panel inside the popup not the
 popup itself when the App button is clicked.

 Helmut

 - Original Message - From: Tobias Reifenstuel
 [EMAIL PROTECTED]
 To: users@myfaces.apache.org
 Sent: Friday, May 16, 2008 5:03 PM
 Subject: [Tobago] a listbox in a popup




 Hi All,

 I have a problem with building a popup with a listbox.

 Case 1 (see code below):
 If  I click on the Add button the popup will be partially rendered,
 but without the new entry inside the listbox. The new entry should be
 added
 by the actionListener.

 Case 2 (also code below, but without the attribute tag inside the
 Add
 button tags):
 If I drop the tag tc:attribute name=renderedPartially
 value=:page:popup / within the Add button tags, the popup
 disappears
 after clicking on the button Add. I can open it again and the new
 entry is
 available, but this is not very user-friendly.

 For me it seems that the combination of actionListener and
 renderedPartially doesn't work.

 tc:popup id=popup width=300px height=200px 
  tc:box id=box label=Author input
  f:facet name=layout
  tc:gridLayout rows=*;50px/
  /f:facet

  tc:selectOneListbox id=listbox
  value

Re: [Tobago] choosing popup to display

2008-05-20 Thread Volker Weber
Hi ben,

you don't need multiple popups, just alternate content in on popup. e.g.:


 f:facet name=popup
tc:popup width=150 height=100 id=popup
rendered=#{InputScreenBean.showPopup1 ||
InputScreenBean.showPopup2}
  tc:panel
f:facet name=layout
  tc:gridlayout rows=1*;1*/
 /f:facet
tc:panel rendered=#{InputScreenBean.showPopup1}
  !-- content of first option --
/tc:panel
tc:panel rendered=#{InputScreenBean.showPopup2}
  !-- content of second option --
/tc:panel
  /tc:panel
/tc:popup
/f:facet



Regards,
Volker




2008/5/20 ben_p [EMAIL PROTECTED]:

 Hi All,
 I am again struggling with popups. I have a submit button which when clicked
 does an initial pass of a database and calculates the number of results that
 would be returned. If this number is (e.g)  50 but  100 I want a warning
 popup with the option of continuing or cancelling. if the number  100 I
 want a popup that informs the user to selection is too large. This last
 popup would have a single OK button and would cancel the transaction.

 My problem is I can get a single popup to work. But I cannot get two popups
 to be associated with my submit button. I have been playing around with the
 facet name and the popup rendered attribute but without success. I cannot
 get popup2 to be displayed. Only the first popup is displayed.

 Note the facet names in the below code. There is popup and popup2. If they
 are both 'popup 'then JSF throws an exception. Only the one with the name
 'popup' will be displayed, but I have seen sample code on this forum where
 the facet name is set to 'popup1' and 'popup2'.

 tc:button label=Open Popup action=#{InputScreenBean.submit}
id=myButtonId

f:facet name=popup
 tc:popup width=150 height=100 id=popup1
  rendered=#{InputScreenBean.showPopup1}
  tc:box label=Popup Title 1
   tc:panel
f:facet name=layout
 tc:gridLayout rows=1*;fixed; columns=1*;1* /
/f:facet
tc:cell spanX=2
 tc:out value=Over 100 results returned/tc:out
/tc:cell
tc:button label=OK action=#{InputScreenBean.popupAction1}
 tc:attribute name=popupClose value=afterSubmit /
/tc:button
tc:button label=Cancel
 tc:attribute name=popupClose value=immediate /
/tc:button
   /tc:panel
  /tc:box
 /tc:popup
/f:facet

f:facet name=popup2
 tc:popup width=150 height=100 id=popupId_2
  rendered=#{InputScreenBean.showPopup2}
  tc:box label=Popup Title 2
   tc:panel
f:facet name=layout
 tc:gridLayout rows=1*;fixed; columns=1*;1* /
/f:facet
tc:cell spanX=2
 tc:out value=Hooray 2nd popup shown/tc:out
/tc:cell
tc:button label=OK action=#{InputScreenBean.popupAction2}
 tc:attribute name=popupClose value=afterSubmit /
/tc:button
tc:button label=Cancel
 tc:attribute name=popupClose value=immediate /
/tc:button
   /tc:panel
  /tc:box
 /tc:popup
/f:facet
   /tc:button

 Relevant InputScreenBean.java code:

 public String popupAction1() {
  System.out.println(in popupAction1);
  showPopup1 = false;
  return success;
  }

  public String popupAction2() {
  System.out.println(in popupAction);
  return success;
  }

  public String submit() {
  try {
   int maxAllowed = 100;
   int maxWarnings = 50;
   showPopup1 = false;
   showPopup2 = false;

   System.out.println(numResults is  + numResults);
   //if numResults  maxAllowed the popup
   //is show, if it is only   maxWarnings no
   //popup is shown

   int iNumRes = Integer.parseInt(numResults);
   if (iNumRes  maxAllowed) {
showPopup1 = true;
return null;
   } else if (iNumRes  maxWarnings) {
showPopup2 = true;
return null;
   }
  } catch (Exception e) {
   System.out.println(Error in submit());
   e.printStackTrace();
   return failure;
  }

  return success;
  }








 --
 View this message in context: 
 http://www.nabble.com/-Tobago--choosing-popup-to-display-tp17338603p17338603.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13 | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX: +49 441 4082 355 | www.inexso.de


Re: [Tobago] a listbox in a popup

2008-05-19 Thread Volker Weber
Hi Tobias,

i think this error message is because of a conversionError in the
selectOneListbox.

Could you post the code for the Author-Converter?


Regards,
Volker

2008/5/19 Tobias Reifenstuel [EMAIL PROTECTED]:
 Hi Helmut, hi All,

 thanks a lot for your help, but it still doesn't work. The syntax for the
 action listener method was right. I changed the binding to action, as you
 suggested, and now I get the following log message:

 2008-05-19 15:29:19 ERROR -
 org.apache.myfaces.tobago.context.ResourceManagerImpl:265 - Path not found,
 and no fallback. Using empty string.
 resourceDirs = '[tobago-resource, org/apache/myfaces/tobago/renderkit]'
 contentType = 'html' theme = 'speyside' browser = 'mozilla_5_0' subDir =
 'property' name = 'tobago' suffix = '' key =
 'javax.faces.component.UISelectOne.INVALID

 But i don't know why. Maybe there is something wrong with my backing bean:

   private ArrayListSelectItem authors;
 private SelectItem selectedAuthor;
  ...
   public void onNew() {
   LOG.info(authors size:  + authors.size());
   Author author = new Author();
   author.setForename(Forename);
   author.setMiddleName(MiddleName);
   author.setSurname(Surename);
   authors.add(new SelectItem(author));
   LOG.info(authors size:  + authors.size());
   }

 ...

 all getter and setter methods are set.

 Thanks for any help.
 Tobi

 Helmut Swaczinna schrieb:

 Hi Tobi,

 I think it should work with an ActionListener but I prefer to use Actions
 for buttons. In this case returning
 null or void. One reason for not calling the ActionListener may be a wrong
 method signature. Must be
 public void onNew(ActionEvent e).

 Case 4: The id in the renderedPartially attribute is wrong. First, the box
 is not a naming container, so it is not
 part of the id, and second, the listbox is not an Ajax component (afaik),
 so it must be enclosed in a panel or just
 the box you already have.

 Hope that helps
 Helmut

 - Original Message - From: Tobias Reifenstuel [EMAIL PROTECTED]
 To: MyFaces Discussion users@myfaces.apache.org
 Sent: Sunday, May 18, 2008 12:55 PM
 Subject: Re: [Tobago] a listbox in a popup


 Hi Helmut,

 thanks for the fast answer. I tried your suggestion, but it still doesn't
 work. Here are my further tries:

 Case 3 (see code from the first mail except the part wiht the Add
 button)
 I changed this part of the code:

 tc:attribute name=renderedPartially value=:page:popup:box /

 The box seems to be reloaded (for a second I can see the scrollbar), but
 without the new value should be added over the onNew method
 (ActionListener).
 If I look into my logs the method is never called, but why? It is only
 called if I drop the renderedPartially attribute.


 Case 4
 tc:attribute name=renderedPartially value=:page:popup:box:listbox /
 Here the popup doesn't even show up.

 By the way I am using Tobago 1.0.16


 Thanks for any help.
 Tobi


 Helmut Swaczinna schrieb:

 Hi,

 you should render partially the box or panel inside the popup not the
 popup itself when the App button is clicked.

 Helmut

 - Original Message - From: Tobias Reifenstuel [EMAIL PROTECTED]
 To: users@myfaces.apache.org
 Sent: Friday, May 16, 2008 5:03 PM
 Subject: [Tobago] a listbox in a popup


 Hi All,

 I have a problem with building a popup with a listbox.

 Case 1 (see code below):
 If  I click on the Add button the popup will be partially rendered,
 but without the new entry inside the listbox. The new entry should be 
 added
 by the actionListener.

 Case 2 (also code below, but without the attribute tag inside the Add
 button tags):
 If I drop the tag tc:attribute name=renderedPartially
 value=:page:popup / within the Add button tags, the popup disappears
 after clicking on the button Add. I can open it again and the new entry 
 is
 available, but this is not very user-friendly.

 For me it seems that the combination of actionListener and
 renderedPartially doesn't work.

 tc:popup id=popup width=300px height=200px 
   tc:box id=box label=Author input
   f:facet name=layout
   tc:gridLayout rows=*;50px/
   /f:facet

   tc:selectOneListbox id=listbox
   value=#{author.selectedAuthor}
   f:selectItems value=#{author.authors} /
   /tc:selectOneListbox

  tc:panel id=buttons
   f:facet name=layout
   tc:gridLayout columns=*;*;* /
   /f:facet
  tc:button actionListener=#{author.onNew}
 label=Add
   tc:attribute name=renderedPartially
 value=:page:popup /
   /tc:button


   tc:button label=Ok
   tc:attribute name=popupClose
 value=afterSubmit /
   tc:attribute name=renderedPartially
 value=:page:popup /
   /tc:button


Re: My Faces - SelectOneRadio Problem

2008-04-16 Thread Volker Weber
Hi,

see layout=spread and t:radio

http://myfaces.apache.org/tomahawk/tlddoc/t/radio.html


Regards,
Volker



2008/4/16, Rajnikant [EMAIL PROTECTED]:

  Hello All,

  I am working on My Faces 1.2.2 version to implement SelectOneRadio.
  Its working fine with both (Horizontal and vertical) layout. Also reflecting
  submitted value on backing bean.
  I have implement this as under.

  h:selectOneRadio value=#{bean.aValue} required=yes
   f:selectItem itemLabel=Option1 itemValue=1/
   f:selectItem itemLabel=Option1 itemValue=2/
   f:selectItem itemLabel=Option1 itemValue=3/
  /h:selectOneRadio


  Now I want to implement, Group of Radio buttons with some other code.
  Let me describe in detail by demo code.

  h:selectOneRadio value=#{bean.aValue} required=yes
   f:selectItem itemLabel=Option1 itemValue=1/
  Some DIV tags, CSS and other JSF tags
  also..
   f:selectItem itemLabel=Option1 itemValue=2/
  Some DIV tags, CSS and other JSF tags
  also..
   f:selectItem itemLabel=Option1 itemValue=3/
 Some DIV tags, CSS and other JSF tags also..
  /h:selectOneRadio

  According to my current implementation, I concluded that In between tag of
  h:selectOneRadio,
  It want allow tags other then h:selectItem,
  Its not showing any error, but also not displaying any component (Written in
  between tag of h:selectOneRadio)


  Any advice, comment or suggestion are welcome.

  Rajnikant.

 --
  View this message in context: 
 http://www.nabble.com/My-Faces---SelectOneRadio-Problem-tp16716809p16716809.html
  Sent from the MyFaces - Users mailing list archive at Nabble.com.




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: navigation/form: wrong url displayed in browser

2008-04-02 Thread Volker Weber
Hi,

you can made the welcome-file a frameset, to hide the real inner urls.


Regards,
Volker

2008/4/2, arne anka [EMAIL PROTECTED]:
  See here:
   http://wiki.apache.org/myfaces/FAQ#StaleLink
 

  ah, thanks a lot.
  but, alas, it is more like a better description of the problem with two
 proposals to work around but no real solution.
  i would think a lot of people is bothered by this ...

  not real myfaces: but is there a way to configure an apache+tomcat+jk2 so
 the url is _always_ http://localhost/foo/?



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Trinidad] Browser memory consumption

2008-03-27 Thread Volker Weber
Hi Davide,

did you use own javascript in your app?

If you assign htmlNode objects to javascript object properties and/or
vice versa the IE (at least IE6) did not correct free them on page
unload. You need to remove this yourself by assigning undefined to
those properties in the unload handler.

We had a similar problem in tobago which we solved this way.


Regards,
Volker

2008/3/27, Davide Bonicelli [EMAIL PROTECTED]:
 Hi Max,
thanks for your help.

 I ran sIEve and pointed it the homepage of my application.
 It didn't detect any leak, but three cycle dependencies and an orphan. I
 cannot post the output of the scan because it's humongous!
 However, if I run Auto-refresh on my app for few seconds, I can see the
 memory usage increasing linearly with increments between 380Kb and 1500Kb
 per refresh. Meanwhile, the number of nodes used in the DOM never exceed 92.

 At this point I suppose Trnidad is not leaking any memory, but somehow IE is
 not releasing memory while navigating through the pages of my app. I don't
 see this behaviour in IE if I Auto-refresh other websites (ex.
 google.com), where the memory used by IE is stable.

 I also have to correct my previous post: a deeper analysis shows me that
 Firefox is deallocating the memory correctly while using my app (too bad my
 client wants to use IE7).

 I don't know if this problem is worthed a deeper investigation.

 Thanks
 Bye
 Davide



 On Thu, Mar 27, 2008 at 9:53 AM, Max Starets [EMAIL PROTECTED] wrote:

  Hi Davide,
 
  If Trinidad's Javascipt library  leaks memory when user navigates from
  page to page, it is not normal
  or acceptable. There are tools, such as drip and sIEve that van help
  us diagnose the problem.
 
  Regards,
  Max Starets
 
 
 
 
  Davide Bonicelli wrote:
   Hi everybody,
   I'm developing an application based on Trinidad 1.0.7,
   JSF-Facelets 1.1.14, Spring 2.5.2 and Hibernate 3.2.3ga running on
   Tomcat 5.5.
   I noticed that while navigating through the pages of the application,
   the browser keep consuming more and more memory (both IE7 and Firefox
   2). Every time I visit a page (even one I already visited in the same
   session), the memory used by the browser increases by about 1.5MB (I
   monitored it with Sysinternal).
   If I disable javascript in IE7 and load different pages of my
   application, this behavior stops and the memory used by the browser is
   stable, but logically the application doesn't work anymore.
  
   Is it normal that the browser consumes all this memory when using
   Trinidad? Did anybody else experienced this problem?
   I suppose the problem is connected with Common1_0_7.js.
   My concern is that I had the browser eating up to 350MB of memory in a
   session of less than an hour and I don't want to have problems related
   with memory consumption when the application goes into production and
   is used for 8 hours a day by a user.
  
   Thanks for your help
   Bye
   Davide
  
 
 




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: JSF Lifecycle Question

2008-03-26 Thread Volker Weber
Hi, see inline

2008/3/25, simon [EMAIL PROTECTED]:
 Hmm.interesting.

  In this case, I think your radio-button has absolutely no effect on your
  program (although that still doesn't explain why the textbox is empty).

  I believe the process is like this:

  on postback:
  (restore view phase)
   * the view (component tree) is restored
  (update values phase)
   * the radio button component pulls its settings from the posted data
   * the textbox component pulls its settings from the posted data
   * the commandButton sees it has been activated and queues an event
  (convert and validate phases apply)
  (update model phase)
   * the radio button updates the backing bean, and clears its
submitted state
   * the textbox updates the backing bean and clears its
submitted state

Here is the problem: the textbox did NOT update the backingBean and
did NOT clear the submitted state because the value of the rendered
attribute evaluates to false after the radioButton has updated the
bean!

if you switch the order of textbox and radio button it should work as expected.


  (invoke application phase)
   * the queued events are run, causing the backing bean to be deleted
  (render phase)
   * some EL expression causes a new backing bean instance to be
created
   * the textbox calls the backing bean to check its rendered state [1]
   * assuming the textbox is rendered, it calls the backing bean to get
the value to render
   * etc for all other components

  [1] At this point, the backing bean has completely thrown away the data
  the radio-button set, so the rendered state for the textbox is reset to
  whatever is the default for the backing bean.

  Although [1] above is probably not what you wanted, it still does not
  explain the textbox problem.

  Questions:
  (1) are you returning a string from the button action listener method,
  or null? Returning a string can cause a fresh view tree to be created.
  You *probably* want to return null here, but in either case I cannot see
  it causing the problem you see.

  (2) are you using component bindings anywhere? Bindings can have all
  sorts of odd side-effects, and are better avoided where possible.

  (3) is the value setter method for the textbox being called (during the
  apply-values phase)? If it is, then the textbox will definitely be
  clearing its cached submitted value. If it is not, then that would
  explain the problem - although I cannot see why it would *not* be
  called...

  (4) is the method for the textbox rendered property being called *during
  the render phase*? I presume it is, but it might be nice to check..

  Hmm..it just occurred to me that during the apply-values phase, a
  component only pulls data from the submitted form *if it is rendered*.
  Otherwise, it is just a waste of time; the component was never in the
  form so there will of course be no data to fetch from the posted form.
  And it figures out whether it was rendered by evaluating its rendered
  expression. Now there *should* be no conflict with the fact that the
  radio button changes this status, because the radio button only pushes
  its state into the backing bean later (in update-model) but it's
  something to think about. I certainly hope that components do not check
  their rendered state during the update model phase...

  You might also try to create a very simple webapp that demonstrates the
  problem, then try a more recent myfaces/tomahawk release.

  Otherwise, I'm puzzled. Sorry.


  And by the way, when someone replies to an email with bottom-posting
  style, it is a bit rude to then add your comments in top-posting
  style. It also makes the thread hard to read.

  Regards, Simon




  On Tue, 2008-03-25 at 11:48 -0700, mjovanov wrote:
   Hi Simon, thanks for your response. As I mentioned in my original posting,
   the Reset button is a command button and is bound to an action listener
   method;  as I understand, this method is invoked during the
   invoke-application phase and it deletes the backing bean, so I don't think 
 I
   am bypassing the apply-values phase. I don't have the immediate attribute 
 on
   the Reset button.
  
   You pose a very good question in the last paragraph: as I understand, what
   takes place then is that, in the render-response, JSF is forced to
   re-instantiate the backing bean (so that it can provide the state back to
   all the components) and this is when a constructor is invoked.  This works
   for all the other components, which then get their values from the database
   except for the text box (the getter is never called!). The only thing 
 unique
   about the text box is that is was not rendered in the previous request
   (because the radio button had a different value than what's in the
   database).
  
  
   [EMAIL PROTECTED] wrote:
   
   
On Tue, 2008-03-25 at 08:32 -0700, mjovanov wrote:
There is a radio button and a text box on a page. The radio button
controls whether the text box is 

Re: [MyFaces] multiple components binding to same backing bean property

2008-03-25 Thread Volker Weber
Hi,

could you explain the reason for having the same binding at two components?

As Andrew wrote you can't have the same component instance twice in
one page, so your bindings getters MUST return null or a new instance
for every call.

To my experience you should avoid to use binding.


Regards,
Volker


2008/3/25, Andrew Robinson [EMAIL PROTECTED]:
 Binding two components to the same property is a definite no no. A
  component can only be used once in a page and your binding would
  attempt to put it twice in the same page.  Use a different binding for
  every component.


  On 3/25/08, Varun Shingal [EMAIL PROTECTED] wrote:
   Hi
  
   First a little background.I had developed a few of my own components and
   was using the myFaces-1.1.3 jars till now. Everything worked fine for
   this but I frequently got the problem of the duplicate id issue which
   has been discussed in the forum before. I therefore moved to the
   myFace-1.1.5 version and that is when the problem came up.
  
   I have developed a tag, say a:myTag which supports the binding
   attribute so Il have a:myTag binding=#{bbean.prop} value=One/. Now
   suppose I want to have another tag in the same jspa:myTag
   binding=#{bbean.prop} value=Two/. Thus my jsp would have
  
   a:myTag binding=#{bbean.prop} value=One/
   a:myTag binding=#{bbean.prop} value=Two/
  
   This leads to a JasperException in the page. It worked fine with 1.1.3
   but gives the exception on moving to 1.1.5. If I remove any one of the
   lines it works fine and if i change the property prop to which it is
   bound then also it works fine. So something like this works:
  
   a:myTag binding=#{bbean.prop} value=One/
   a:myTag binding=#{bbean.prop2} value=Two/
  
   Any idea where I could be going wrong? Any help is appreciated.
  
   Thanks
   Varun
  
  



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] How to substitute into the Tobago resource bundle messages?

2008-03-11 Thread Volker Weber
Hi Tim,

tobago resourceBundle did not support argument formating.

in your case you can concatenate the two values into a single valueBinding:

  tc:out value=#{bundle.title} #{bean.name} /


Regards,
Volker


2008/3/10, Tim Stephenson [EMAIL PROTECTED]:
 Hi,

  I have loaded a resource bundle using
tc:loadBundle basename=messages var=bundle /
  and can output messages from the bundle like this:
tc:out value=#{bundle.title} /
  where the relevant line of the resource bundle props file is
title = Welcome
  which is all fine. But how can i substitute values into the resource
  bundle message?

  I tried putting this in the props file
title = Welcome {0}
  and this into the jsp:
tc:out value=#{bundle.title}
f:param value=#{bean.name}/f:param
/tc:out
  following the examples of JSF core, but apparently the tc control does
  not understand the param as I just see Welcome {0} output without any
  substitution.

  Is there some other way to achieve this for Tobago resource bundles?

  thanks in advance


  --
  Tim Stephenson
  e: [EMAIL PROTECTED]



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] How to substitute into the Tobago resource bundle messages?

2008-03-11 Thread Volker Weber
Hi Tim,

2008/3/11, Tim Stephenson [EMAIL PROTECTED]:
 Thanks Volker

 Does this mean it never will or it would be a reasonable enhancement

feel free to add a enhancement request at jira.


 request? If the first does that mean i should always use the jsf core / html
 tags?

Did jsf core / html support this? I didn't know that.


 Obviously a more complex example would have the {0} in the middle of the
 resource string


You could create very complex value bindings :-)
We have something like this, and more complex ones in one app:
value=#{bundle.editUser}#{empty controller.user ? '' : ' ( '}#{empty
controller.user ? '' : controller.user.name}#{empty controller.user ?
'' : ' ) '}

But i like the idea of formating such values/labels with MessageFormat
and params.

Regards,

  Volker


 tim

 On 11/03/2008, Volker Weber [EMAIL PROTECTED] wrote:
  Hi Tim,
 
  tobago resourceBundle did not support argument formating.
 
  in your case you can concatenate the two values into a single
 valueBinding:
 
tc:out value=#{bundle.title} #{bean.name} /
 
 
  Regards,
  Volker
 
 
  2008/3/10, Tim Stephenson [EMAIL PROTECTED]:
 
   Hi,
  
I have loaded a resource bundle using
  tc:loadBundle basename=messages var=bundle /
and can output messages from the bundle like this:
  tc:out value=#{bundle.title} /
where the relevant line of the resource bundle props file is
  title = Welcome
which is all fine. But how can i substitute values into the resource
bundle message?
  
I tried putting this in the props file
  title = Welcome {0}
and this into the jsp:
  tc:out value=#{bundle.title}
  f:param value=#{bean.name}/f:param
  /tc:out
following the examples of JSF core, but apparently the tc control does
not understand the param as I just see Welcome {0} output without any
substitution.
  
Is there some other way to achieve this for Tobago resource bundles?
  
thanks in advance
  
  
--
Tim Stephenson
e: [EMAIL PROTECTED]
  
 
 
 
  --
  inexso - information exchange solutions GmbH
  Bismarckstraße 13  | 26122 Oldenburg
  Tel.: +49 441 4082 356 |
  FAX:  +49 441 4082 355 | www.inexso.de
 



 --
 Tim Stephenson
  e: [EMAIL PROTECTED]


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: general question: assigning/copying variables in view?

2008-03-09 Thread Volker Weber
Hi Łukasz,

you may look at the tomahawk aliasBean component:
http://myfaces.apache.org/tomahawk/aliasBean.html


Regards,
Volker



2008/3/9, Łukasz Budnik [EMAIL PROTECTED]:
 Hi All!

  I have a problem with redundancy in my web application and I am
  looking for a solution
  to this problem.

  Let's say I have an application to support the librarians. I have
  following views: authorDetails.jsf, bookDetails.jsf,
  bookOrderDetails.jsf.

  All above listed views use the very same HTML elements.
  It's huge redundancy, because they differ only by the value attribute
  set in outputTexts.
  For example, author's first name is retrieved from three different
  managed beans:

  authorMBean.author.firstName = in authorDetails.jsf
  bookMBean.book.author.firstName = in bookDetails.jsf
  bookOrderMBean.order.book.author.firstName = bookOrderDetails.jsf

  Is there any method in MyFaces to assign /copy a variable like this:

  copy to=authorDetails from=authorMBean.author /
  copy to=authorDetails from=bookOrderMBean.order.book.author /

  so that later on I could include one common JSP and display the
  contents of authorDetails variable?

  thanks in advance
  best regards

 Łukasz



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [tobago] tc:SelectOneListBox :Issue with ValueChangeEvent Validator

2008-02-25 Thread Volker Weber
)
  at
 org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PanelRenderer.encodeAjax(PanelRenderer.java:173)
 at
 org.apache.myfaces.tobago.ajax.api.AjaxUtils.encodeAjaxComponent(AjaxUtils.java:67)
 at
 org.apache.myfaces.tobago.component.UIPanelBase.encodeAjax(UIPanelBase.java:48)
  at
 org.apache.myfaces.tobago.util.EncodeAjaxCallback.execute(EncodeAjaxCallback.java:32)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1246)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIForm(ComponentUtil.java:1271)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1250)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.prepareOnUIComponent(ComponentUtil.java:1278)
 at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOrPrepare(ComponentUtil.java:1252)
  at
 org.apache.myfaces.tobago.component.ComponentUtil.invokeOnComponent(ComponentUtil.java:1240)
 at
 org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer.renderComponent(AjaxResponseRenderer.java:140)
 at
 org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer.renderResponse(AjaxResponseRenderer.java:120)
  at
 org.apache.myfaces.tobago.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:47)
 at
 org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.render(TobagoLifecycle.java:141)
 at
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.myfaces.tobago.webapp.TobagoMultipartFormdataFilter.doFilter(TobagoMultipartFormdataFilter.java:127)
  at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
 at
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  at
 org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
 at
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
 at
 org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  at
 org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
 at
 org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
 at java.lang.Thread.run(Thread.java:595)


 On Thu, Feb 21, 2008 at 10:13 AM, Raj .G. Narasimhan [EMAIL PROTECTED]
 wrote:
  Currently, I'm using 1.0.15...(since two days)...Previously, I started the
 development with 1.0.13
 
  thanks,
  -R
 
 
 
 
 
  On Thu, Feb 21, 2008 at 10:09 AM, Volker Weber [EMAIL

Re: [tobago] tc:SelectOneListBox :Issue with ValueChangeEvent Validator

2008-02-21 Thread Volker Weber
Hi Raj,

if i interpret your code snippet correct,

the selectOneListbox with the click/change facet is NOT inside the
partially rendered panel. This is the problem, only the content of the
partiallyRendered component is processed on the server.

you have two(tree) choices:
1. include the listbox into the renderedPartially scope.
2. invoke the processing of listbox lifecycle in your action.
UIComponent listbox = facesContext.getViewRoot().findComponent(id
of listbox);
listbox.processDecodes(facesContect);
listbox.processValidations(facesContect);
listbox.processUpdates(facesContect);

3.(experimental) use 1.1-SNAPSHOT version.
  you can declare full page to be submitted (and processed) partially and
  in your action method remove the page and add orderPanel from/to the
partially
  component list.


Regards,
Volker

2008/2/21, Raj .G. Narasimhan [EMAIL PROTECTED]:
 I am trying to show the details of 'SelectItem' object of SelectOneListBox
 on a set of Input fields. Problem that I am facing is, whenever the page is
 rendered partially, it always returns the 'value' of SelectOneListBox as
 null.  I have tried using both 'change' and 'click' facets, and both of them
 are not giving the desired results.

 Here's the scenario, in little detail:

 When I use, 'click' facet, and tried to select different list items:

 ** In the valueChangeEvent, everytime it's retaining the initially set value
 (First item of List box, which I set when I render the panel for the first
 time) .

 ** getValue() of the source component in the valueChange event, is
 supposedly returning the binding value, if the current value is null. And, I
 guess, this is the reason, it retains the old value, if the current
 localvalue is null.

 ** After this listerner call, it tries to set the value of the
 SelectOneListBox's bound value as null, and this results in NPException, as
 the 'DetailPanel's fields are this object's properties.

  ** I tried intercepting with a Validator - Surprisingly, this is not called
 at all...


 When I use Change facet and tried to select different list items:
 ** ValueChangeEvent does not occur at all
  **Agreeably, 'change' facet's command is also not called
 **No validator call is made

 Here's the code snippet:
 tc:panel id=orderPanel
 
 ...
 tc:box label=#{rsrcBundle.order_orderListLabel}
  f:facet name=layout
 tc:gridLayout rows=* columns=* margin=2px /
 /f:facet
 tc:selectOneListbox value=#{orderPanelController.order}

 valueChangeListener=#{orderPanelController.showInDetail}

 validator=#{orderPanelController.validateListSelection}
 f:selectItems value=#{orderPanelController.orders} /
  f:converter converterId=deviceOrderId /

 f:facet name=click
 tc:command action=#{orderPanelController.returnNull}
  tc:attribute value=:cdbmainpage:orderPanel
 name=renderedPartially /
 /tc:command
 /f:facet
  %-- I tired the same command with 'change' facet' also %
 /tc:selectOneListbox

 /tc:box

 tc:panel id=orderDetailPanel
 
 ..

 OrderPanelController:
 public void showInDetail(ValueChangeEvent valChangeEvent) {
 UISelectOne select =
 (UISelectOne)valChangeEvent.getComponent();
 if(select.getValue() == null){
 LOG.finer(Value is null);
  return;
 }
 order = (DeviceOrder) select.getValue();
 LOG.finer(Selected Order: +select.getValue());
 return;
 }

 public void validateListSelection(FacesContext context,
 UIComponent component, Object value) throws ValidatorException {
  if (value == null) {
 System.out.println(List validation:Came here : Value is null);
 return;
 }
 order = (DeviceOrder) value;
 LOG.finer(Selected order in validation: +order);
  }

 Appreciate your help!

 --
 Thanks,

 Raj .G. Narasimhan


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [tobago] tc:SelectOneListBox :Issue with ValueChangeEvent Validator

2008-02-21 Thread Volker Weber
than it should work!

can you add a tc:messages tag inside the orderPanel to ensure there
are no conversion/validation errors.

2008/2/21, Raj .G. Narasimhan [EMAIL PROTECTED]:
 Thanks Volker, for the reply!

 The SelectOneListBox with the facet, is within the rendered panel
 (orderPanel which encloses both this selectListOneBox component, as well as
 the 'orderDetailPanel').  Hence, I expected the value of SelectOneListBox,
 to be processed. And, it's not.

 I will  try with the other two options

 Appreciate it!

 tx,
 -R



 tc:panel id=orderPanel
 
 ...
 tc:box label=#{rsrcBundle.order_orderListLabel}
  f:facet name=layout
 tc:gridLayout rows=* columns=* margin=2px /
 /f:facet
 tc:selectOneListbox value=#{orderPanelController.order}

 valueChangeListener=#{orderPanelController.showInDetail}

 validator=#{orderPanelController.validateListSelection}
 f:selectItems value=#{orderPanelController.orders} /
  f:converter converterId=deviceOrderId /

 f:facet name=click
 tc:command action=#{orderPanelController.returnNull}
  tc:attribute value=:cdbmainpage:orderPanel
 name=renderedPartially /
 /tc:command
 /f:facet
  %-- I tired the same command with 'change' facet' also %
 /tc:selectOneListbox

 /tc:box

 tc:panel id=orderDetailPanel


  On Thu, Feb 21, 2008 at 3:22 AM, Volker Weber [EMAIL PROTECTED] wrote:
  Hi Raj,
 
  if i interpret your code snippet correct,
 
  the selectOneListbox with the click/change facet is NOT inside the
  partially rendered panel. This is the problem, only the content of the
  partiallyRendered component is processed on the server.
 
  you have two(tree) choices:
  1. include the listbox into the renderedPartially scope.
  2. invoke the processing of listbox lifecycle in your action.
 UIComponent listbox = facesContext.getViewRoot().findComponent(id
  of listbox);
 listbox.processDecodes(facesContect);
 listbox.processValidations(facesContect);
 listbox.processUpdates(facesContect);
 
  3.(experimental) use 1.1-SNAPSHOT version.
   you can declare full page to be submitted (and processed) partially and
   in your action method remove the page and add orderPanel from/to the
  partially
   component list.
 
 
  Regards,
 Volker
 
  2008/2/21, Raj .G. Narasimhan [EMAIL PROTECTED]:
 
 
 
   I am trying to show the details of 'SelectItem' object of
 SelectOneListBox
   on a set of Input fields. Problem that I am facing is, whenever the page
 is
   rendered partially, it always returns the 'value' of SelectOneListBox as
   null.  I have tried using both 'change' and 'click' facets, and both of
 them
   are not giving the desired results.
  
   Here's the scenario, in little detail:
  
   When I use, 'click' facet, and tried to select different list items:
  
   ** In the valueChangeEvent, everytime it's retaining the initially set
 value
   (First item of List box, which I set when I render the panel for the
 first
   time) .
  
   ** getValue() of the source component in the valueChange event, is
   supposedly returning the binding value, if the current value is null.
 And, I
   guess, this is the reason, it retains the old value, if the current
   localvalue is null.
  
   ** After this listerner call, it tries to set the value of the
   SelectOneListBox's bound value as null, and this results in NPException,
 as
   the 'DetailPanel's fields are this object's properties.
  
** I tried intercepting with a Validator - Surprisingly, this is not
 called
   at all...
  
  
   When I use Change facet and tried to select different list items:
   ** ValueChangeEvent does not occur at all
**Agreeably, 'change' facet's command is also not called
   **No validator call is made
  
   Here's the code snippet:
   tc:panel id=orderPanel
   
   ...
   tc:box label=#{rsrcBundle.order_orderListLabel}
f:facet name=layout
   tc:gridLayout rows=* columns=* margin=2px /
   /f:facet
   tc:selectOneListbox value=#{orderPanelController.order}
  
  
 valueChangeListener=#{orderPanelController.showInDetail}
  
  
 validator=#{orderPanelController.validateListSelection}
   f:selectItems value=#{orderPanelController.orders} /
f:converter converterId=deviceOrderId /
  
   f:facet name=click
   tc:command action=#{orderPanelController.returnNull}
tc:attribute value=:cdbmainpage:orderPanel
   name=renderedPartially /
   /tc:command
   /f:facet
%-- I tired the same command with 'change' facet' also %
   /tc:selectOneListbox
  
   /tc:box
  
   tc:panel id=orderDetailPanel
   
   ..
  
   OrderPanelController:
   public void showInDetail(ValueChangeEvent valChangeEvent) {
   UISelectOne select =
   (UISelectOne

Re: [tobago] tc:SelectOneListBox :Issue with ValueChangeEvent Validator

2008-02-21 Thread Volker Weber
Which version of tobago? I'm trying to reproduce this.

2008/2/21, Raj .G. Narasimhan [EMAIL PROTECTED]:
 Yes, I didVolker...  But, there is none...

 thanks,
 -R


 On Thu, Feb 21, 2008 at 9:59 AM, Volker Weber [EMAIL PROTECTED] wrote:
  than it should work!
 
  can you add a tc:messages tag inside the orderPanel to ensure there
  are no conversion/validation errors.
 
 
 
 
  2008/2/21, Raj .G. Narasimhan [EMAIL PROTECTED]:
   Thanks Volker, for the reply!
  
   The SelectOneListBox with the facet, is within the rendered panel
   (orderPanel which encloses both this selectListOneBox component, as well
 as
   the 'orderDetailPanel').  Hence, I expected the value of
 SelectOneListBox,
   to be processed. And, it's not.
  
   I will  try with the other two options
  
   Appreciate it!
  
   tx,
   -R
  
  
  
   tc:panel id=orderPanel
   
   ...
   tc:box label=#{rsrcBundle.order_orderListLabel}
f:facet name=layout
   tc:gridLayout rows=* columns=* margin=2px /
   /f:facet
   tc:selectOneListbox value=#{orderPanelController.order}
  
  
 valueChangeListener=#{orderPanelController.showInDetail}
  
  
 validator=#{orderPanelController.validateListSelection}
   f:selectItems value=#{orderPanelController.orders} /
f:converter converterId=deviceOrderId /
  
   f:facet name=click
   tc:command action=#{orderPanelController.returnNull}
tc:attribute value=:cdbmainpage:orderPanel
   name=renderedPartially /
   /tc:command
   /f:facet
%-- I tired the same command with 'change' facet' also %
   /tc:selectOneListbox
  
   /tc:box
  
   tc:panel id=orderDetailPanel
  
  
On Thu, Feb 21, 2008 at 3:22 AM, Volker Weber [EMAIL PROTECTED]
 wrote:
Hi Raj,
   
if i interpret your code snippet correct,
   
the selectOneListbox with the click/change facet is NOT inside the
partially rendered panel. This is the problem, only the content of the
partiallyRendered component is processed on the server.
   
you have two(tree) choices:
1. include the listbox into the renderedPartially scope.
2. invoke the processing of listbox lifecycle in your action.
   UIComponent listbox = facesContext.getViewRoot().findComponent(id
of listbox);
   listbox.processDecodes(facesContect);
   listbox.processValidations(facesContect);
   listbox.processUpdates(facesContect);
   
3.(experimental) use 1.1-SNAPSHOT version.
 you can declare full page to be submitted (and processed) partially
 and
 in your action method remove the page and add orderPanel from/to the
partially
 component list.
   
   
Regards,
   Volker
   
2008/2/21, Raj .G. Narasimhan [EMAIL PROTECTED]:
   
   
   
 I am trying to show the details of 'SelectItem' object of
   SelectOneListBox
 on a set of Input fields. Problem that I am facing is, whenever the
 page
   is
 rendered partially, it always returns the 'value' of
 SelectOneListBox as
 null.  I have tried using both 'change' and 'click' facets, and both
 of
   them
 are not giving the desired results.

 Here's the scenario, in little detail:

 When I use, 'click' facet, and tried to select different list items:

 ** In the valueChangeEvent, everytime it's retaining the initially
 set
   value
 (First item of List box, which I set when I render the panel for the
   first
 time) .

 ** getValue() of the source component in the valueChange event, is
 supposedly returning the binding value, if the current value is
 null.
   And, I
 guess, this is the reason, it retains the old value, if the current
 localvalue is null.

 ** After this listerner call, it tries to set the value of the
 SelectOneListBox's bound value as null, and this results in
 NPException,
   as
 the 'DetailPanel's fields are this object's properties.

  ** I tried intercepting with a Validator - Surprisingly, this is
 not
   called
 at all...


 When I use Change facet and tried to select different list items:
 ** ValueChangeEvent does not occur at all
  **Agreeably, 'change' facet's command is also not called
 **No validator call is made

 Here's the code snippet:
 tc:panel id=orderPanel
 
 ...
 tc:box label=#{rsrcBundle.order_orderListLabel}
  f:facet name=layout
 tc:gridLayout rows=* columns=* margin=2px /
 /f:facet
 tc:selectOneListbox value=#{orderPanelController.order}


  
 valueChangeListener=#{orderPanelController.showInDetail}


  
 validator=#{orderPanelController.validateListSelection}
 f:selectItems value=#{orderPanelController.orders} /
  f:converter converterId=deviceOrderId /

 f:facet name=click

Re: [Tobago] Scrollable text insice tc:sheet

2008-02-19 Thread Volker Weber
Hi Yazid,

are you are inside a sheet?

if not: tc:out inside tc:cell with scrollbars=auto should do this.

if yes: the same, plus forcing the tc:cell to get enough  height to
render at least the scrollbars.


Regards,
Volker

2008/2/19, yazid [EMAIL PROTECTED]:

 Hello ;
 I've the same problem, but I need to display an Html text (formatted);
 tc:out is better for this (escape=false) but not scrollable.


 Helmut Swaczinna wrote:
 
  Hello Michael,
 
  you can use a tc:in or tc:textArea with readonly=true.
 
  Regards
  Helmut
 
 
 Hello,
 
 is there a way to put a scrollable text inside a tc:column in tc:sheet?
 I tried tc:cell scrollbars=auto and putting tc:out inside, but it didn't
 work
 
 regards,
 michael
 
 --
 [EMAIL PROTECTED]
 http://stawicki.jasliska.pl
 GG: 369
 JID: [EMAIL PROTECTED]
 
 

 --
 View this message in context: 
 http://www.nabble.com/-Tobago--Scrollable-text-insice-tc%3Asheet-tp9441120p15560576.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] Edit an XML text

2008-02-18 Thread Volker Weber
Hi yazid,

do you want to edit or display the xml?

using tc:textarea is the simplest, i think. For display set the
readonly attribute to true.


Regards,
Volker

2008/2/18, yazid [EMAIL PROTECTED]:

 Hi all;
 Is there a way to display a bloc of text (20 line) of XML by tobago r
 Any ideas are welcome.

 --
 View this message in context: 
 http://www.nabble.com/-Tobago--Edit-an-XML-text-tp15542428p15542428.html
 Sent from the MyFaces - Users mailing list archive at Nabble.com.




-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [Tobago] Problem migrating to 1.0.15

2008-02-15 Thread Volker Weber
Hi,

no time to test this, but my guess from yazids las post is:

he had put a tc:out and a tc:selectOneChoice in the same column.
the tc:selectOneChoice was rendered but outside the columns visual
area and therefore clipped away.

surrounding the tc:out and tc:selectOneChoice with a tc:cell (or panel)
may solve this.

btw: if you put more than on components direct into a column you get
warning in the logs about layout problems (width of component can't
set).


Regards,
Volker

2008/2/15, Arvid Hülsebus [EMAIL PROTECTED]:
 Hello

  Like Udo I tried to reproduce the problem, but I failed, too. On my test
  page the tc:selectOneChoice gets rendered without any problem.

  Perhaps you can set up a small page, where this problem occurs. It
  shouldn't be necessary to add a tc:cell just to get the
  tc:selectOneChoice appear in the broswer.

  Thanks in advance,

 Arvid


  yazid wrote:
   Hi
   I found outI'm using a tc:out with tc:selectOneChoice ...inside a
   column.
   just put them in a cell.
   tx
  
   yazid wrote:
  
   Hi All;
   I've migrated last week to 1.0.15; most of component are OK, except for
   tc:selectOneChoice inside a sheet columns, it's not rendred at all
  
tc:column label=.
tc:selectOneChoice value=#{b.name}   
f:selectItems value=#{b.items}  /
   /tc:selectOneChoice
  
   Is that a bug in 1.0.15 or should I do  a special use of select...
   Thanks
  
  
  
  
  
  



-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


Re: [tobago] when renderedPartially, menuCheckbox's value is not updated

2008-02-08 Thread Volker Weber
Hi Zied,

in IE?
if this problem does not exsist in FF this may be

http://issues.apache.org/jira/browse/TOBAGO-611


Regards,
Volker

2008/2/8, Zied Hamdi [EMAIL PROTECTED]:
 Hi,

 I have a problem when I attemp to render partially a box with a checkbox
 menu popup: in (tradition mode) the checkbox's state is updated normally as
 expected. But When I attemp to do it in ajax mode, the menu stays always
 checked (in my case: it's its first state).


 tc:panel id=intervenantCell...


 tc:box

   f:facet name=toolBar

 tc:toolBar

  tc:toolBarCommand


 id=cancelIntervenantSelectionCmd


 action=#{controller.cancelIntervenantSelectionCmd}


 image=image/cancel.PNG

tc:attribute


 name=renderedPartially


 value=#{ajaxScope} /

  /tc:toolBarCommand

  tc:toolBarCommand

f:facet
 name=menupopup

  tc:menu
 image=image/strict.png


 tc:menuCheckbox


 label=#{i18n.unstrictIntervenantSelectionMode}


 value=#{controller.unstrictIntervenantSelection}


 tc:attribute


 name=renderedPartially


 value=intervenantCell /


 /tc:menuCheckbox

  /tc:menu

/f:facet

  /tc:toolBarCommand

 /tc:toolBar

   /f:facet


 Do I have to enter an issue? (I'm under tobago 1.0.12: I have message bundle
 exceptions when I try to upgrade. But I didn't find this issue in jira in
 any version)
 --
 Zied Hamdi
 www.into-i.fr
  (previously in 2003)
 zatreex.sf.net


-- 
inexso - information exchange solutions GmbH
Bismarckstraße 13  | 26122 Oldenburg
Tel.: +49 441 4082 356 |
FAX:  +49 441 4082 355 | www.inexso.de


  1   2   3   4   5   6   7   8   9   >