Re: Re: Using Tree2 without Javascript

2006-11-15 Thread Sawan Vithlani

So it's not possible to do this, for example, with the node being an
HTML link back to the appropriate submission?

Sawan

On 11/15/06, Andrew Robinson [EMAIL PROTECTED] wrote:

JavaScript is required. Even with server side state toggling, the
javascript is what submits the tree when the icon is clicked.

On 11/14/06, Sawan Vithlani [EMAIL PROTECTED] wrote:
 Hello all,

 I'm currently evaluating some JSF controls and one of our requirements
 is that we be able to use the Tree control when Javascript is
 unavailable on the client side.

 I have downloaded and tried the Tomahawk examples.

 The Tree2 control example given
 (http://localhost:8080/myfaces-example-simple-1.1.5-SNAPSHOT/tree2.jsf,
 assuming a local installation) does not seem to work without
 Javascript. The description here:
 http://myfaces.apache.org/tomahawk/tree2.html says that ...there is
 an option for client-side or server-side toggling of the
 expand/collapse state.  I take this to mean that the whole tree is
 submit to the server, and comes back with the clicked node expanded,
 and that this operation was performed without Javascript.

 Was I correct in assuming this? If no, is there any other way in which
 this behaviour can be acheived?

 Thanks

 Sawan




Re: Re: Using Tree2 without Javascript

2006-11-15 Thread Martin Marinschek

It's a basic principle of JSF that every link needs JavaScript. The
problem is with the sizes of the state of a modern web-application: it
is (almost) impossible to cut this state down to sizes which can be
transferred via a link without IE restricting this.

So what JSF does is posting the form with a click on a link - as tree2
relies on links, you have the same issue here...

regards,

Martin

On 11/15/06, Sawan Vithlani [EMAIL PROTECTED] wrote:

So it's not possible to do this, for example, with the node being an
HTML link back to the appropriate submission?

Sawan

On 11/15/06, Andrew Robinson [EMAIL PROTECTED] wrote:
 JavaScript is required. Even with server side state toggling, the
 javascript is what submits the tree when the icon is clicked.

 On 11/14/06, Sawan Vithlani [EMAIL PROTECTED] wrote:
  Hello all,
 
  I'm currently evaluating some JSF controls and one of our requirements
  is that we be able to use the Tree control when Javascript is
  unavailable on the client side.
 
  I have downloaded and tried the Tomahawk examples.
 
  The Tree2 control example given
  (http://localhost:8080/myfaces-example-simple-1.1.5-SNAPSHOT/tree2.jsf,
  assuming a local installation) does not seem to work without
  Javascript. The description here:
  http://myfaces.apache.org/tomahawk/tree2.html says that ...there is
  an option for client-side or server-side toggling of the
  expand/collapse state.  I take this to mean that the whole tree is
  submit to the server, and comes back with the clicked node expanded,
  and that this operation was performed without Javascript.
 
  Was I correct in assuming this? If no, is there any other way in which
  this behaviour can be acheived?
 
  Thanks
 
  Sawan
 





--

http://www.irian.at

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

Professional Support for Apache MyFaces


Question on t:calendar popup value binding

2006-11-15 Thread Aneesha Govil
Hi,I am trying to use a calendar popup. What should be the type of the property that binds to the value of the popup? I looked at the examples source, it uses a date. Does it have to be a Date or can I use a String for the same? Which date format does it assume by default, 
e.g. - mm/dd/ or what?Thanks,Aneesha


Re: Re: Re: Using Tree2 without Javascript

2006-11-15 Thread Sawan Vithlani

And apparently there doesnt seem to be any way in which this can
degrade gracefully in case JS is not available

Thanks for your help guys.

Sawan

On 11/15/06, Martin Marinschek [EMAIL PROTECTED] wrote:

It's a basic principle of JSF that every link needs JavaScript. The
problem is with the sizes of the state of a modern web-application: it
is (almost) impossible to cut this state down to sizes which can be
transferred via a link without IE restricting this.

So what JSF does is posting the form with a click on a link - as tree2
relies on links, you have the same issue here...

regards,

Martin

On 11/15/06, Sawan Vithlani [EMAIL PROTECTED] wrote:
 So it's not possible to do this, for example, with the node being an
 HTML link back to the appropriate submission?

 Sawan

 On 11/15/06, Andrew Robinson [EMAIL PROTECTED] wrote:
  JavaScript is required. Even with server side state toggling, the
  javascript is what submits the tree when the icon is clicked.
 
  On 11/14/06, Sawan Vithlani [EMAIL PROTECTED] wrote:
   Hello all,
  
   I'm currently evaluating some JSF controls and one of our requirements
   is that we be able to use the Tree control when Javascript is
   unavailable on the client side.
  
   I have downloaded and tried the Tomahawk examples.
  
   The Tree2 control example given
   (http://localhost:8080/myfaces-example-simple-1.1.5-SNAPSHOT/tree2.jsf,
   assuming a local installation) does not seem to work without
   Javascript. The description here:
   http://myfaces.apache.org/tomahawk/tree2.html says that ...there is
   an option for client-side or server-side toggling of the
   expand/collapse state.  I take this to mean that the whole tree is
   submit to the server, and comes back with the clicked node expanded,
   and that this operation was performed without Javascript.
  
   Was I correct in assuming this? If no, is there any other way in which
   this behaviour can be acheived?
  
   Thanks
  
   Sawan
  
 



--

http://www.irian.at

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

Professional Support for Apache MyFaces



JSF EL - empty operator

2006-11-15 Thread Michael Heinen








Hi,



Is the empty operator of the JSF EL working ?

I want to display some text if an ArrayList is empty, but
this does not work in my case



snippet:

t:dataList id=results var=cat


value=#{MyController.filters['key'].values}

...

/t:dataList

h:outputText value=***no results found*** 

 rendered=#{empty
MyController.filters['key'].values}/

 

 

MyController.filters['key'].values is an empty ArrayList.

Are there any alternatives to check whether a collection is
empty via EL ?



Michael








RE: JSF EL - empty operator

2006-11-15 Thread Michael Heinen








Doh, Forget this, my mistake.

The outputText was in an area that wasnt
refreshed via ajax
and contained old data.



Sorry

Michael









From: Michael Heinen
[mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 15. November 2006
11:25
To: MyFaces
 Discussion
Subject: JSF EL - empty operator





Hi,



Is the empty operator of the JSF EL working ?

I want to display some text if an ArrayList is empty, but
this does not work in my case



snippet:

t:dataList id=results var=cat


value=#{MyController.filters['key'].values}

...

/t:dataList

h:outputText value=***no results found*** 

 rendered=#{empty
MyController.filters['key'].values}/

 

 

MyController.filters['key'].values is an empty ArrayList.

Are there any alternatives to check whether a collection is empty
via EL ?



Michael








Re: Very strange problem: conversion error

2006-11-15 Thread Mr Arvind Pandey
Hi,

   Make sure that the arraylist property or its
contents are not null. It must be initialised before
the setter method gets invoked for this. 

regards...
Arvind



--- Fraley, Taylor [EMAIL PROTECTED] wrote:

 So I'm having a very strange problem.  I have a jsp
 that's using a
 h:selectOneMenu populated by an ArrayList within a
 bean, which is all
 pretty standard.  In one environment, on my desktop
 PC running Tomcat
 5.5, everything works fine.  On my SPARC running the
 same version of
 Tomcat, configured, from what I can tell,
 identically, I get the
 following exception when loading the page:
 
 org.apache.jasper.JasperException:
 org.apache.jasper.JasperException:
 javax.servlet.jsp.JspException: {2} Conversion
 Error setting value
 ''{0}'' for ''{1}''. 
   

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServle
 tWrapper.java:512)
   

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
 va:377)
   

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
   

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   

org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFil
 ter.java:144)
 
 I've done some poking around on Google, but haven't
 found anything
 terribly useful.  The two possible explanations I've
 found (getter for
 the ArrayList returning null and a mistype of the
 managed bean name in
 the jsp vs. the faces-config.xml) both don't seem to
 apply here.  Here
 are the relevant snippets of code:
 
 ...from faces-config.xml...
 
 managed-bean
 

managed-bean-nameTransactionReportBean/managed-bean-name
   

managed-bean-classcom.level3.ssid.idd.report.web.TransactionReportBean
 /managed-bean-class
   managed-bean-scopesession/managed-bean-scope
 /managed-bean
 
 ...from the TransactionReportBean...
 
public TransactionReportBean()
{
   availableTimes.add(new SelectItem(0, 12:00
 AM));
   availableTimes.add(new SelectItem(1, 01:00
 AM));
   availableTimes.add(new SelectItem(2, 02:00
 AM));
   availableTimes.add(new SelectItem(3, 03:00
 AM));
   availableTimes.add(new SelectItem(4, 04:00
 AM));
   availableTimes.add(new SelectItem(5, 05:00
 AM));
   availableTimes.add(new SelectItem(6, 06:00
 AM));
   availableTimes.add(new SelectItem(7, 07:00
 AM));
   availableTimes.add(new SelectItem(8, 08:00
 AM));
   availableTimes.add(new SelectItem(9, 09:00
 AM));
   availableTimes.add(new SelectItem(10, 10:00
 AM));
   availableTimes.add(new SelectItem(11, 11:00
 AM));
   availableTimes.add(new SelectItem(12, 12:00
 PM));
   availableTimes.add(new SelectItem(13, 01:00
 PM));
   availableTimes.add(new SelectItem(14, 02:00
 PM));
   availableTimes.add(new SelectItem(15, 03:00
 PM));
   availableTimes.add(new SelectItem(16, 04:00
 PM));
   availableTimes.add(new SelectItem(17, 05:00
 PM));
   availableTimes.add(new SelectItem(18, 06:00
 PM));
   availableTimes.add(new SelectItem(19, 07:00
 PM));
   availableTimes.add(new SelectItem(20, 08:00
 PM));
   availableTimes.add(new SelectItem(21, 09:00
 PM));
   availableTimes.add(new SelectItem(22, 10:00
 PM));
   availableTimes.add(new SelectItem(23, 11:00
 PM));
}
 
public ArrayListSelectItem
 getAvailableCnamOptions()
{
  return availableCnamOptions;
}
 
 ...from the jsp...
 
 h:selectOneMenu id=beginHour
 value=#{TransactionReportBean.beginHour}
 styleClass=rptSmallInputs
   f:selectItems
 value=#{TransactionReportBean.availableTimes}/
 
 /h:selectOneMenu
 
 Judging by all the hits on Google, it seems to be a
 pretty common
 problem, but I'm sort of stumped on what to do next
 to figure out the
 problem.  Has anyone seen this?  Any pointers?
 
 Thanks,
 Taylor
 
 
 




__
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/


Re: Question on t:calendar popup value binding

2006-11-15 Thread Aneesha Govil
I used a value binding to a String but the value did not get populated, however it works for a date. Do I have to write a custom converter? Can I find more information about writing custom converters for JSF components somewhere?
Thanks,AneeshaOn 11/15/06, Aneesha Govil [EMAIL PROTECTED] wrote:
Hi,I am trying to use a calendar popup. What should be the type of the property that binds to the value of the popup? I looked at the examples source, it uses a date. Does it have to be a Date or can I use a String for the same? Which date format does it assume by default, 
e.g. - mm/dd/ or what?Thanks,Aneesha




RE: Question on t:calendar popup value binding

2006-11-15 Thread Madhav Bhargava








Yes it only works with a Date. If you want
to accept the value into a String then you have 2 options:


 Use
 jenia4jsf popup  http://www.jenia.org
 
 Or
 write a simple validator/converter  google and you will find loads
 of articles to write one.




~madhav













From: Aneesha Govil
[mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 15, 2006
5:59 PM
To: MyFaces
 Discussion
Subject: Re: Question on
t:calendar popup value binding





I used a value binding to
a String but the value did not get populated, however it works for a date. Do I
have to write a custom converter? Can I find more information about writing
custom converters for JSF components somewhere? 

Thanks,
Aneesha



On 11/15/06, Aneesha
Govil [EMAIL PROTECTED]
wrote:

Hi,

I am trying to use a calendar popup. What should be the type of the property
that binds to the value of the popup? I looked at the examples source, it uses
a date. Does it have to be a Date or can I use a String for the same? Which
date format does it assume by default, e.g. - mm/dd/ or what?

Thanks,
Aneesha













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


Re: Help getting started with tobago-facelets in a portlet

2006-11-15 Thread Stephen More

On 11/14/06, Bernd Bohmann [EMAIL PROTECTED] wrote:

looks like the scarborough jar is missing.


I added the scarborough jar.

I am using maven2 and put tobago-facelets in my pom.xml
  
http://www.ibiblio.org/maven2/org/apache/myfaces/tobago/tobago-facelets/1.0.8/

If scarborough is required, shouldn't it have been automatically downloaded ?


I'm not sure that tobago is working in a portlet enviroment, but if you
are interested I will try to help you with the errors.


Now I get this error:
  2006-11-15 14:50:26,413 WARN  [TobagoRenderKit:77] patching content
type from text/html to text/html'
2006-11-15 14:50:26,756 ERROR [RendererBase:112] catched
java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
:com.liferay.portlet.RenderResponseImpl
java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
   at 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEndTobago(PageRenderer.java:145)
   at 
org.apache.myfaces.tobago.renderkit.RendererBase.encodeEnd(RendererBase.java:108)
   at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
   at 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
   at 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
   at 
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
   at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:323)
   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:298)
   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:380)
   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)
   at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
   at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)



Can you share the example with me?


Yes, I will put it on a web site shortly.


-Steve More


Stephen More wrote:
 I am trying to get a simple HelloWorld JSR 168 facelet tobago example
 working.

 In my logs I see the following:

 2006-11-14 22:05:35,894 INFO  [ClientProperties:68] contentType='html'
 from header Accept='null'
 2006-11-14 22:05:35,898 INFO  [ClientProperties:75] userAgent='null'
 from header User-Agent='null'
 2006-11-14 22:05:35,902 INFO  [ClientProperties:86] debug-mode=false
 2006-11-14 22:05:35,906 INFO  [ClientProperties:92] theme='speyside'
 from requestParameter tobago.theme='null'
 2006-11-14 22:05:37,140 WARN  [TobagoRenderKit:77] patching content
 type from text/html to text/html'
 2006-11-14 22:05:37,196 ERROR [ResourceManagerImpl:291] Path not
 found, and no fallback. Using empty string.
 resourceDirs = '[tobago-resource,
 org/apache/myfaces/tobago/renderkit]' contentType = 'html' theme =
 'speyside' browser = 'null' subDir = 'tag' name = 'PageRenderer'
 suffix = '' key
 = 'null'
 2006-11-14 22:05:37,205 ERROR [ResourceManagerImpl:397] name =
 'PageRenderer' clientProperties = 'html/speyside/null'
 java.lang.NullPointerException
at
 
org.apache.myfaces.tobago.context.ResourceManagerImpl.getRenderer(ResourceManagerImpl.java:392)

at
 
org.apache.myfaces.tobago.renderkit.TobagoRenderKit.getRenderer(TobagoRenderKit.java:60)

at
 javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:527)
at
 javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:304)
at
 org.apache.myfaces.tobago.component.UIPage.encodeBegin(UIPage.java:94)
at
 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:232)

at
 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)



 Is there a problem with a config file that is leading up to this
 NullPointerException ?

 -Thanks
 Steve More




Re: text-align: center - without h:dataTable

2006-11-15 Thread monkeyden

Can I use t:columnwithout using dataTable?


Scott Stevenson-5 wrote:
 
 In your column (or columns) tag simply specify a style to align the text
 contained in that column.  We use something like this in our t:columns
 tag:
 
 style=text-align:#{dataTableBean.alignment};
 
 Where getAlignment() in the backing bean returns left, right or
 center depending on the current column.
 
 If you are using a t:column tag then you can explicity set the style
 like this:
 
 style=text-align:RIGHT;
 
 

 I have 1 row of 10 fields, with respective column headers, which I need
 to
 display in a two-row table.  Some fields are strings and some are numbers
 and dates.  Applying typical justification rules, I need to right justify
 dates and numbers and left justify the Strings.  I have come to the
 conclusion that I can't use h:dataTable.  The question is, how do I get
 the ability to specify justification without the use of h:dataTable?

 It may be my ignorance but I'm finding JSF view rendering unecessarily
 restrictive, when something like this should be allowed (or at least
 configurable).  HTML nested in f:verbatim doesn't seem to render
 properly
 when there are JSF tags (h:outputText/) nested within.
 --
 View this message in context:
 http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7344409
 Sent from the MyFaces - Users mailing list archive at Nabble.com.


 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7359717
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: creating a dynamic code for a group of radio buttons

2006-11-15 Thread Yaron Spektor








Thanks Aneesha,

I did have the IDs unique. I also tried setting the valueBinding to an
HtmlSelectOneRadio that I put on the bean (with getters and setters of course)
nothing seemed to work.

Just to make sure my question is clear I need to create a dynamic view
similar to this:

|column1|column2|column3|

|radio1 |radio 2 |radio3
|

|radio4 |radio5
|
|





The number of columns and number of rows is not fixed and all the radio
buttons need to be in the same group.



Any advice would be appreciated,









From: Aneesha Govil
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 14, 2006
4:58 AM
To: MyFaces
 Discussion
Subject: Re: creating a dynamic
code for a group of radio buttons



Hi,

I haven't constructed radio buttons dynamically but in general, to do something
like this..
HtmlSelectOneRadio
selectOneRadio = new HtmlSelectOneRadio(); 
selectOneRadio.setId(choicesRadioButtons);//TODO: componentID
selectOneRadio.setLayout(spread);
selectOneRadio.setValue(displayValue);

// If you are setting IDs for radio instances here, make sure each is unique 
HtmlRadio radio = new HtmlRadio();
radio.setFor(choicesRadioButtons);
radio.setIndex(0);

selectOneRadio.getChildren ().add(radio);

panelGroup.getChildren().add(selectOneRadio);

Hope that helps!

Aneesha

On 11/14/06, Yaron Spektor [EMAIL PROTECTED]
wrote:

Hi
there,

I
would like to convert this code to dynamic components (I can not use tableData
with newspaperColumn because I want multiple columns with the same button group
and I need a header aligned with each such column). I would like to be able to
set the t:radio in a panelGrid with X number of columns:

h:panelGroup



t:selectOneRadio id=buttons layout=spread
forceId=true forceIdIndex=false
value=hello


 f:selectItems
value=#{pc_Wizard.choicesDisplayValue} /


/t:selectOneRadio 

 





h:panelGrid columns=5







 


t:radio for="" index=0 /


t:radio for="" index=1 /


t:radio for="" index=2 /


t:radio for="" index=3 /


t:radio for="" index=4
/ 


t:radio for="" index=5 /


t:radio for="" index=6 /


t:radio for="" index=7 /


t:radio for="" index=8 /


/h:panelGrid 

/h:panelGroup 



This
is the code I started writing but I have a problem making it work especially
setting the for

 HtmlPanelGroup panelGroup= new
HtmlPanelGroup();

 HtmlPanelGrid htmlPanelGrid = new
HtmlPanelGrid();

 List panelGroupChildren =
panelGroup.getChildren();

 panelGroupChildren.clear();

 HtmlRadio radio;



 HtmlSelectOneRadio selectOneRadio
= new HtmlSelectOneRadio();


selectOneRadio.setId(choicesRadioButtons);//TODO: componentID


selectOneRadio.setLayout(spread); 


selectOneRadio.setValue(displayValue);

 


htmlPanelGrid.setColumns(5); 


htmlPanelGrid.setColumnClasses(Constants.cColumnClasses+,+Constants.cColumnClassesCurrency);


htmlPanelGrid.setRendered(true); 

 

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

 radio = new HtmlRadio();

 radio.setId(selectOneRadio);
 

 ValueBinding vb
=app.createValueBinding(buttons);


radio.setValueBinding(for, vb); 

 radio.setIndex(i);


htmlPanelGrid.getChildren().add(radio);

} 

 

 

panelGroupChildren.add(selectOneRadio); 

panelGroupChildren.add(htmlPanelGrid);



return panelGroup;



any
ideas?
















Re: Help getting started with tobago-facelets in a portlet

2006-11-15 Thread Stephen More

On 11/14/06, Bernd Bohmann [EMAIL PROTECTED] wrote:



 Can you share the example with me?


The example can be found at:
http://www.geocities.com/mores/portal-facelets.jar

-Thanks
Steve More


Re: text-align: center - without h:dataTable

2006-11-15 Thread Scott Stevenson
Maybe I'm missing the point but why would you want to use a columns tag
without a datatable??

The answer is, you can't (as far as I know).


 Can I use t:columnwithout using dataTable?


 Scott Stevenson-5 wrote:

 In your column (or columns) tag simply specify a style to align the text
 contained in that column.  We use something like this in our t:columns
 tag:

 style=text-align:#{dataTableBean.alignment};

 Where getAlignment() in the backing bean returns left, right or
 center depending on the current column.

 If you are using a t:column tag then you can explicity set the style
 like this:

 style=text-align:RIGHT;



 I have 1 row of 10 fields, with respective column headers, which I need
 to
 display in a two-row table.  Some fields are strings and some are
 numbers
 and dates.  Applying typical justification rules, I need to right
 justify
 dates and numbers and left justify the Strings.  I have come to the
 conclusion that I can't use h:dataTable.  The question is, how do I
 get
 the ability to specify justification without the use of h:dataTable?

 It may be my ignorance but I'm finding JSF view rendering unecessarily
 restrictive, when something like this should be allowed (or at least
 configurable).  HTML nested in f:verbatim doesn't seem to render
 properly
 when there are JSF tags (h:outputText/) nested within.
 --
 View this message in context:
 http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7344409
 Sent from the MyFaces - Users mailing list archive at Nabble.com.







 --
 View this message in context:
 http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7359717
 Sent from the MyFaces - Users mailing list archive at Nabble.com.






Re: Navigation from error question...

2006-11-15 Thread K. Johnson

Try removing the redirect. You should see your facesMessage then.

Hope this helps. 

K

  ---Original Message---
  From: Mick Knutson [EMAIL PROTECTED]
  Subject: Re: Navigation from error question...
  Sent: 14 Nov '06 17:01
  
  That did work, but now, I do not get the messages I want printed...
  In registration.xhtml:
  
  TD colspan=2
  h:messages /
  /TD
  
  
  TD
  h:inputText
  value=#{UserBackingBean.user.username}
  required=true
  id=username 
  f:validateLength minimum=2 /
  /h:inputText
  h:message for=username
  errorClass=error /
  /TD
  
  
  Then in my UserBackingBean:
  
  FacesContext.getCurrentInstance()
  .addMessage(null,
  new FacesMessage(
  FacesMessage.SEVERITY_ERROR,
  failureMessage,
  failureMessage));
  
  //String failureMsg = ErrorMessages.getString
  (LoginBean.LOGIN_FAILURE);
  FacesMessage message = new FacesMessage(
  FacesMessage.SEVERITY_ERROR, failureMessage, failureMessage);
  context.addMessage(login_form:loginButton, message);
  
  return (null);
  
  
  But no messages are printed at all.
  The page is displayed though...
  
  
  On 11/13/06, GERALD MüLLAN  [LINK: mailto:[EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:Hi,
  
  in order to stay on the same page, you can also return null. You don`t
  need any special navigation outcome to achieve this.
  
  cheers,
  
  Gerald
  
  On 11/13/06, Mick Knutson [LINK: mailto:[EMAIL PROTECTED]
  [EMAIL PROTECTED] wrote:
   I am fairly new to JSF, but thought that I had this right, however I am
  not
   getting the navigation I expect...
  
   When I get an error for a duplicate username, I want to be sent back to
  my
   registration form and have an error message shows.
  
   faces-config:
   
  
   navigation-rule
  
   from-view-id/views/registration.xhtml/from-view-id
   navigation-case
from-outcomesuccess/from-outcome
  
   to-view-id/views/secure/index.xhtml/to-view-id
redirect/
/navigation-case
navigation-case
from-outcomecancel/from-outcome
to-view-id/views/center.xhtml/to-view-id
redirect/
/navigation-case
navigation-case
   from-outcomeduplicateUsername/from-outcome
  
   to-view-id/views/registration.xhtml/to-view-id
   redirect/
/navigation-case
   /navigation-rule
  
  
  
  
  
   Here is the UserBackingBean method:
   
  
   public String createUser(){
   log.info(createUser());
  
   FacesContext context = FacesContext.getCurrentInstance();
  
   try{
userManager.createUser(getUser());
   } catch(Exception e){
   log.error(Duplicate user name. Username already exists);
   e.printStackTrace();
   String failureMessage = Duplicate user name. Username
  already
   exists;
   FacesContext.getCurrentInstance()
   .addMessage(null,
   new FacesMessage(
  
   FacesMessage.SEVERITY_ERROR,
   failureMessage,
   failureMessage));
  
   return duplicateUsername;
   }
   return success;
   }
  
  
   When I get this error, I still get sent to /views/secure/index.xhtml,
  same
   as if I succeeded...
  
  
   --
  
   Thanks
  
   DJ MICK
[LINK: http://www.djmick.com] http://www.djmick.com
   [LINK: http://www.myspace.com/mickknutson]
  http://www.myspace.com/mickknutson
  
  
  --
  [LINK: http://www.irian.at] http://www.irian.at
  
  Your JSF powerhouse -
  JSF Consulting, Development and
  Courses in English and German
  
  Professional Support for Apache MyFaces
  
  
  --
  
  Thanks
  
  DJ MICK
  [LINK: http://www.djmick.com] http://www.djmick.com
  [LINK: http://www.myspace.com/mickknutson]
  http://www.myspace.com/mickknutson


[Tobago] multi row tabGroup?

2006-11-15 Thread swaczinna
Hi,

is it possible to display the labels of the tabs in a tabGroup in multiple
rows, if not all labels fit in one row, like Swing does it?

Regards
Helmut


[Tobago] dynamic style for components

2006-11-15 Thread swaczinna
Hi,

is it possible to set the style (font, color, ...) of a component 
(tc:button, tc:in, ...) dynamicly in the JSP page via value binding?
There's no attribute like 'style'. How do I use the tc:style tag?

Regards
Helmut


Re: Panel Tabbed Pane

2006-11-15 Thread K. Johnson
The rendered attribute is processed at render-time. My guess is that it is 
processed after both jsp:includes are already processed.


  ---Original Message---
  From: Hasnain Badami [EMAIL PROTECTED]
  Subject: Panel Tabbed Pane
  Sent: 14 Nov '06 12:55
  
  Hi
  
  
  I have written the following code:
  
  
  t:panelTabbedPane
  
  styleClass=levelOneTabbedPane
  
  width=100%
  
  bgcolor=#CC
  
  activeTabStyleClass=levelOneActiveTab
  
  inactiveTabStyleClass=levelOneInactiveTab
  
  activeSubStyleClass=levelOneActiveSub
  
  inactiveSubStyleClass=levelOneInactiveSub
  
  tabContentStyleClass=levelOneTabContent
  
  serverSideTabSwitch=true
  
  id=pDetailTab
  
  
  
  t:panelTab label= #{messages['snapshot_view']} 
  
  f:subview id=tabportfoliodetailsnapshotview
  rendered=#{tabIndices.portfolioTabIndex==0} 
  
  jsp:include page=portfoliodetailsnapshotview.jsp  /
  
  /f:subview
  
  /t:panelTab
  
  t:panelTab label= #{messages['time_series_view']} 
  
  f:subview id=tabportfoliodetailtimeseriesview
  rendered=#{tabIndices.portfolioTabIndex==1} 
  
  jsp:include page=portfoliodetailtimeseriesview.jsp  /
  
  /f:subview
  
  /t:panelTab
  
  
  t:tabChangeListener type
  =com.prytania.model.backingbeans.PortfolioDetailTabManager /
  
  /t:panelTabbedPane
  
  
  There are two separate backing beans each for the
  portfoliodetailsnapshotview.jsp and portfoliodetailtimeseriesview.jsp. At
  a single point in time, the tabIndices.portfolioTabIndex can either be 0
  or 1 which means either  portfoliodetailsnapshotview.jsp and
  portfoliodetailtimeseriesview.jsp should be included. But in the logs, I
  can see the code of both the backing beans being executed (constructors
  being called),. Why is that so? If the rendered attribute equals to false
  why would the framework still include the jsp. Is there any solution to
  the above mentioned problem. I mean if rendered is false then the included
  jsp should not be processed.
  
  
  Thanks in advance
  
  
  Best Regards
  
  Hassnain


RE: Very strange problem: conversion error

2006-11-15 Thread Fraley, Taylor



Yup, that it is. Not that I solved the problem, but I 
did discover it's localized to one machine. Everything works fine in every 
other environment I've tried it in. So, I can only assume it's not a 
problem with the code at this point.

Thanks!
Taylor



From: Grant Smith [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 14, 2006 5:49 PMTo: MyFaces 
DiscussionSubject: Re: Very strange problem: conversion 
error
Recent changes to SelectItem in 1.1.5 SNAPSHOT remove the convenient 
conversion between types for this component to make it work like the RI. Is 
#{TransactionReportBean.beginHour} a String ?
On 11/14/06, Fraley, 
Taylor [EMAIL PROTECTED] 
wrote:
So 
  I'm having a very strange problem.I have a jsp that's using 
  ah:selectOneMenu populated by an ArrayList within a bean, which is 
  allpretty standard.In one environment, on my desktop PC 
  running Tomcat5.5, everything works fine.On my SPARC running 
  the same version of Tomcat, configured, from what I can tell, identically, 
  I get thefollowing exception when loading the 
  page:org.apache.jasper.JasperException: 
  org.apache.jasper.JasperException:javax.servlet.jsp.JspException : "{2}" 
  Conversion Error setting value''{0}'' for 
  ''{1}''.org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:512)org.apache.jasper.servlet.JspServletWrapper.service 
  (JspServletWrapper.java:377)org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)javax.servlet.http.HttpServlet.service 
  (HttpServlet.java:802)org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)I've 
  done some poking around on Google, but haven't found anythingterribly 
  useful.The two possible explanations I've found (getter for 
  the ArrayList returning null and a mistype of the managed bean name 
  inthe jsp vs. the faces-config.xml) both don't seem to apply 
  here.Hereare the relevant snippets of code:...from 
  faces-config.xml... 
  managed-beanmanaged-bean-nameTransactionReportBean/managed-bean-namemanaged-bean-classcom.level3.ssid.idd.report.web.TransactionReportBean/managed-bean-class 
  managed-bean-scopesession/managed-bean-scope/managed-bean...from 
  the TransactionReportBean... public 
  TransactionReportBean() 
  {availableTimes.add(new 
  SelectItem("0", "12:00 AM")); 
  availableTimes.add(new SelectItem("1", 
  "01:00 AM"));availableTimes.add(new 
  SelectItem("2", "02:00 
  AM"));availableTimes.add(new 
  SelectItem("3", "03:00 AM")); 
  availableTimes.add(new SelectItem("4", 
  "04:00 AM"));availableTimes.add(new 
  SelectItem("5", "05:00 
  AM"));availableTimes.add(new 
  SelectItem("6", "06:00 AM")); 
  availableTimes.add(new SelectItem("7", 
  "07:00 AM"));availableTimes.add(new 
  SelectItem("8", "08:00 
  AM"));availableTimes.add(new 
  SelectItem("9", "09:00 AM")); 
  availableTimes.add(new 
  SelectItem("10", "10:00 
  AM"));availableTimes.add(new 
  SelectItem("11", "11:00 
  AM"));availableTimes.add(new 
  SelectItem("12", "12:00 PM")); 
  availableTimes.add(new 
  SelectItem("13", "01:00 
  PM"));availableTimes.add(new 
  SelectItem("14", "02:00 
  PM"));availableTimes.add(new 
  SelectItem("15", "03:00 PM")); 
  availableTimes.add(new 
  SelectItem("16", "04:00 
  PM"));availableTimes.add(new 
  SelectItem("17", "05:00 
  PM"));availableTimes.add(new 
  SelectItem("18", "06:00 PM")); 
  availableTimes.add(new 
  SelectItem("19", "07:00 
  PM"));availableTimes.add(new 
  SelectItem("20", "08:00 
  PM"));availableTimes.add(new 
  SelectItem("21", "09:00 PM")); 
  availableTimes.add(new 
  SelectItem("22", "10:00 
  PM"));availableTimes.add(new 
  SelectItem("23", "11:00 PM")); } public 
  ArrayListSelectItem getAvailableCnamOptions()  
  { return 
  availableCnamOptions; }...from the 
  jsp...h:selectOneMenu 
  id="beginHour"value="#{TransactionReportBean.beginHour}" 
  styleClass="rptSmallInputs" 
  f:selectItems 
  value="#{TransactionReportBean.availableTimes}"//h:selectOneMenuJudging 
  by all the hits on Google, it seems to be a pretty commonproblem, but I'm 
  sort of stumped on what to do next to figure out the 
  problem.Has anyone seen this?Any 
  pointers?Thanks,Taylor-- Grant Smith


Re: Panel Tabbed Pane

2006-11-15 Thread Hasnain Badami
Hi

Is there any way through which, depending on tabIndices.portfolioTabIndex, I can include the appropriate jsp.
HB.
On 11/15/06, K. Johnson [EMAIL PROTECTED] wrote:
The rendered attribute is processed at render-time. My guess is that it is processed after both jsp:includes are already processed.
---Original Message---From: Hasnain Badami [EMAIL PROTECTED]Subject: Panel Tabbed PaneSent: 14 Nov '06 12:55
HiI have written the following code:t:panelTabbedPanestyleClass=levelOneTabbedPanewidth=100%
bgcolor=#CCactiveTabStyleClass=levelOneActiveTabinactiveTabStyleClass=levelOneInactiveTabactiveSubStyleClass=levelOneActiveSub
inactiveSubStyleClass=levelOneInactiveSubtabContentStyleClass=levelOneTabContentserverSideTabSwitch=trueid=pDetailTab
t:panelTab label= #{messages['snapshot_view']} f:subview id=tabportfoliodetailsnapshotviewrendered=#{tabIndices.portfolioTabIndex==0
} jsp:include page=portfoliodetailsnapshotview.jsp  //f:subview/t:panelTabt:panelTab label= #{messages['time_series_view']} 
f:subview id=tabportfoliodetailtimeseriesviewrendered=#{tabIndices.portfolioTabIndex==1} jsp:include page=portfoliodetailtimeseriesview.jsp
  //f:subview/t:panelTabt:tabChangeListener type=com.prytania.model.backingbeans.PortfolioDetailTabManager /
/t:panelTabbedPaneThere are two separate backing beans each for theportfoliodetailsnapshotview.jsp and portfoliodetailtimeseriesview.jsp. Ata single point in time, the 
tabIndices.portfolioTabIndex can either be 0or 1 which means eitherportfoliodetailsnapshotview.jsp andportfoliodetailtimeseriesview.jsp should be included. But in the logs, Ican see the code of both the backing beans being executed (constructors
being called),. Why is that so? If the rendered attribute equals to falsewhy would the framework still include the jsp. Is there any solution tothe above mentioned problem. I mean if rendered is false then the included
jsp should not be processed.Thanks in advanceBest RegardsHassnain


Strange problem, datatable sorting

2006-11-15 Thread Hasnain Badami
hi

I am using a datatable. I have written the code as required for sorting. Now when I click on the header of the first column the sorting works fine. I can also see the ascending/descending toggler working in the 
INVOKE_APPLICATION phase. But when I click on the header of the second or the following columns it works once, but then nothing happens. Any ideas?

Thanks in advance

HB.


Re: Help getting started with tobago-facelets in a portlet

2006-11-15 Thread Bernd Bohmann

Hello,

started to try your example.
How can I deploy and invoke the example on a server?


See the other comments in the mail.


Stephen More wrote:

On 11/14/06, Bernd Bohmann [EMAIL PROTECTED] wrote:

looks like the scarborough jar is missing.


I added the scarborough jar.

I am using maven2 and put tobago-facelets in my pom.xml
  
http://www.ibiblio.org/maven2/org/apache/myfaces/tobago/tobago-facelets/1.0.8/ 



If scarborough is required, shouldn't it have been automatically 
downloaded ?


The tobago-facelets.jar has only a dependency to tobago-core.
You should include a dependency to a theme in you pom.




I'm not sure that tobago is working in a portlet enviroment, but if you
are interested I will try to help you with the errors.




This error should be fixed in the current snapshot.

Please follow the instructions in:

http://myfaces.apache.org/tobago/getting-started.html


Now I get this error:
  2006-11-15 14:50:26,413 WARN  [TobagoRenderKit:77] patching content
type from text/html to text/html'
2006-11-15 14:50:26,756 ERROR [RendererBase:112] catched
java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
:com.liferay.portlet.RenderResponseImpl
java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
   at 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEndTobago(PageRenderer.java:145) 

   at 
org.apache.myfaces.tobago.renderkit.RendererBase.encodeEnd(RendererBase.java:108) 

   at 
javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
   at 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242) 

   at 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239) 

   at 
com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
   at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:323) 

   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:298) 

   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:380) 

   at 
org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266) 


   at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
   at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)



Can you share the example with me?


Yes, I will put it on a web site shortly.



Regards


Bernd


Re: [Tobago] multi row tabGroup?

2006-11-15 Thread Udo Schnurpfeil

Hi Helmut,

there is an issue in Jira for a drop-down to show surplus tabs in a 
tabgroup.

This will be resolved in the next time.
*https://issues.apache.org/jira/browse/TOBAGO-176

Hope that helps

Udo
*
[EMAIL PROTECTED] schrieb:

Hi,

is it possible to display the labels of the tabs in a tabGroup in multiple
rows, if not all labels fit in one row, like Swing does it?

Regards
Helmut

  


Re: text-align: center - without h:dataTable

2006-11-15 Thread monkeyden

Really the fundamental issue has little to do with the dataTable itself.  It
has more to do with specifying justifications for different types of data,
within the same table.  UI layout in JSF is very klugey.  Here is a simple
table with two columns and two rows.

table border=1
tr
thToday's Date/th
thCurrent Weather/th
/tr
tr
td align=right11/15/2006/td
tdSunny/td
/tr
/table

As you can see, the first column in the second row needs to be right
aligned, becasue it's a date.

Now, so far as I know, here is (roughly) the way this same table would be
represented in JSF:

h:panelGrid columns=2
h:panelGrid style=text-align: center columns=2
h:outputText value=Today's Date/
h:outputText value=Current Weather/
/h:panelGrid
h:panelGrid style=text-align: right columns=1
h:outputText value=#{myBean.todaysDate}/
/h:panelGrid
h:panelGrid columns=1
h:outputText value=#{myBean.weather}/
/h:panelGrid
/h:panelGrid

There must be something better than this.  Do I really need to create a new
table (h:panelGrid) everytime a style attribute changes across columns? 
Is this the extent of control we have over finite rendering points?





Scott Stevenson-5 wrote:
 
 Maybe I'm missing the point but why would you want to use a columns tag
 without a datatable??
 
 The answer is, you can't (as far as I know).
 

 Can I use t:columnwithout using dataTable?


 Scott Stevenson-5 wrote:

 In your column (or columns) tag simply specify a style to align the text
 contained in that column.  We use something like this in our t:columns
 tag:

 style=text-align:#{dataTableBean.alignment};

 Where getAlignment() in the backing bean returns left, right or
 center depending on the current column.

 If you are using a t:column tag then you can explicity set the style
 like this:

 style=text-align:RIGHT;



 I have 1 row of 10 fields, with respective column headers, which I need
 to
 display in a two-row table.  Some fields are strings and some are
 numbers
 and dates.  Applying typical justification rules, I need to right
 justify
 dates and numbers and left justify the Strings.  I have come to the
 conclusion that I can't use h:dataTable.  The question is, how do I
 get
 the ability to specify justification without the use of h:dataTable?

 It may be my ignorance but I'm finding JSF view rendering unecessarily
 restrictive, when something like this should be allowed (or at least
 configurable).  HTML nested in f:verbatim doesn't seem to render
 properly
 when there are JSF tags (h:outputText/) nested within.
 --
 View this message in context:
 http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7344409
 Sent from the MyFaces - Users mailing list archive at Nabble.com.







 --
 View this message in context:
 http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7359717
 Sent from the MyFaces - Users mailing list archive at Nabble.com.


 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7365614
Sent from the MyFaces - Users mailing list archive at Nabble.com.



RE: text-align: center - without h:dataTable

2006-11-15 Thread Nebinger, David
 table border=1
   tr
   thToday's Date/th
   thCurrent Weather/th
   /tr
   tr
   td align=right11/15/2006/td
   tdSunny/td
   /tr
 /table

 [snip]

 h:panelGrid columns=2
   h:panelGrid style=text-align: center columns=2
   h:outputText value=Today's Date/
   h:outputText value=Current Weather/
   /h:panelGrid
   h:panelGrid style=text-align: right columns=1
   h:outputText value=#{myBean.todaysDate}/
   /h:panelGrid
   h:panelGrid columns=1
   h:outputText value=#{myBean.weather}/
   /h:panelGrid
 /h:panelGrid

These two aren't even close.  The HTML table uses th to define the headers, 
so your h:panelGrid should have the f:facet name=header to get the same 
thing.

But more importantly, the nesting of panel grids you have will not give the 
same result as what you think.  The outer grid says 2 columns and, after 
layout, you'll have 2 rows.  But the upper left cell from the outer table will 
contain the first inner panel grid (2 cols, 1 row with header), the upper right 
will have a table (1 row, 1 col), the bottom left will have a table (1 row, 1 
col), and the bottom right cell will be empty.

h:panelGrid supports the columnClasses attribute where you can specify 
classes to assign to the columns; the best way to get what you want (if the 
upper table is what you want) would be:

h:panelGrid columns=2 columnClasses=justifyRight,justifyCenter
  f:facet name=header
h:outputText value=Today's Date /
h:outputText value=Current Weather /
  /f:facet
  h:outputText value=#{myBean.todaysDate} /
  h:outputText value=#{myBean.weather} /
/h:panelGrid

Just define the justifyRight and justifyCenter in the stylesheet to justify 
right and center appropriately.  You'll probably also want to use the 
headerClass attribute of h:panelGrid to have the header formatted differently 
than the standard columns while you're at it.


Re: text-align: center - without h:dataTable

2006-11-15 Thread Jeff Bischoff

Monkeyden,

You may try Facelets, where you can be more granular by using the actual 
tr and td elements...


Regards,

Jeff Bischoff
Kenneth L Kurz  Associates, Inc.

monkeyden wrote:

Really the fundamental issue has little to do with the dataTable itself.  It
has more to do with specifying justifications for different types of data,
within the same table.  UI layout in JSF is very klugey.  Here is a simple
table with two columns and two rows.

table border=1
tr
thToday's Date/th
thCurrent Weather/th
/tr
tr
td align=right11/15/2006/td
tdSunny/td
/tr
/table

As you can see, the first column in the second row needs to be right
aligned, becasue it's a date.

Now, so far as I know, here is (roughly) the way this same table would be
represented in JSF:

h:panelGrid columns=2
h:panelGrid style=text-align: center columns=2
h:outputText value=Today's Date/
h:outputText value=Current Weather/
/h:panelGrid
h:panelGrid style=text-align: right columns=1
h:outputText value=#{myBean.todaysDate}/
/h:panelGrid
h:panelGrid columns=1
h:outputText value=#{myBean.weather}/
/h:panelGrid
/h:panelGrid

There must be something better than this.  Do I really need to create a new
table (h:panelGrid) everytime a style attribute changes across columns? 
Is this the extent of control we have over finite rendering points?






Scott Stevenson-5 wrote:

Maybe I'm missing the point but why would you want to use a columns tag
without a datatable??

The answer is, you can't (as far as I know).


Can I use t:columnwithout using dataTable?


Scott Stevenson-5 wrote:

In your column (or columns) tag simply specify a style to align the text
contained in that column.  We use something like this in our t:columns
tag:

style=text-align:#{dataTableBean.alignment};

Where getAlignment() in the backing bean returns left, right or
center depending on the current column.

If you are using a t:column tag then you can explicity set the style
like this:

style=text-align:RIGHT;



I have 1 row of 10 fields, with respective column headers, which I need
to
display in a two-row table.  Some fields are strings and some are
numbers
and dates.  Applying typical justification rules, I need to right
justify
dates and numbers and left justify the Strings.  I have come to the
conclusion that I can't use h:dataTable.  The question is, how do I
get
the ability to specify justification without the use of h:dataTable?

It may be my ignorance but I'm finding JSF view rendering unecessarily
restrictive, when something like this should be allowed (or at least
configurable).  HTML nested in f:verbatim doesn't seem to render
properly
when there are JSF tags (h:outputText/) nested within.
--
View this message in context:
http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7344409
Sent from the MyFaces - Users mailing list archive at Nabble.com.







--
View this message in context:
http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7359717
Sent from the MyFaces - Users mailing list archive at Nabble.com.













Re: text-align: center - without h:dataTable

2006-11-15 Thread Craig McClanahan

On 11/15/06, Jeff Bischoff [EMAIL PROTECTED] wrote:


Monkeyden,

You may try Facelets, where you can be more granular by using the actual
tr and td elements...



Or, whether you use facelets or not, experiment with the columnClasses and
rowClasses attributes of h:panelGrid.  You can specify comma delimited
lists of CSS style classes that will get applied to each column or each row,
respectively ... and if the component runs out of choices it starts over
again.  This latter feature makes it very easy to do things like even/odd
striping.

Regards,


Jeff Bischoff
Kenneth L Kurz  Associates, Inc.



Craig


monkeyden wrote:

 Really the fundamental issue has little to do with the dataTable
itself.  It
 has more to do with specifying justifications for different types of
data,
 within the same table.  UI layout in JSF is very klugey.  Here is a
simple
 table with two columns and two rows.

 table border=1
   tr
   thToday's Date/th
   thCurrent Weather/th
   /tr
   tr
   td align=right11/15/2006/td
   tdSunny/td
   /tr
 /table

 As you can see, the first column in the second row needs to be right
 aligned, becasue it's a date.

 Now, so far as I know, here is (roughly) the way this same table would
be
 represented in JSF:

 h:panelGrid columns=2
   h:panelGrid style=text-align: center columns=2
   h:outputText value=Today's Date/
   h:outputText value=Current Weather/
   /h:panelGrid
   h:panelGrid style=text-align: right columns=1
   h:outputText value=#{myBean.todaysDate}/
   /h:panelGrid
   h:panelGrid columns=1
   h:outputText value=#{myBean.weather}/
   /h:panelGrid
 /h:panelGrid

 There must be something better than this.  Do I really need to create a
new
 table (h:panelGrid) everytime a style attribute changes across
columns?
 Is this the extent of control we have over finite rendering points?





 Scott Stevenson-5 wrote:
 Maybe I'm missing the point but why would you want to use a columns tag
 without a datatable??

 The answer is, you can't (as far as I know).

 Can I use t:columnwithout using dataTable?


 Scott Stevenson-5 wrote:
 In your column (or columns) tag simply specify a style to align the
text
 contained in that column.  We use something like this in our
t:columns
 tag:

 style=text-align:#{dataTableBean.alignment};

 Where getAlignment() in the backing bean returns left, right or
 center depending on the current column.

 If you are using a t:column tag then you can explicity set the
style
 like this:

 style=text-align:RIGHT;


 I have 1 row of 10 fields, with respective column headers, which I
need
 to
 display in a two-row table.  Some fields are strings and some are
 numbers
 and dates.  Applying typical justification rules, I need to right
 justify
 dates and numbers and left justify the Strings.  I have come to the
 conclusion that I can't use h:dataTable.  The question is, how do
I
 get
 the ability to specify justification without the use of
h:dataTable?

 It may be my ignorance but I'm finding JSF view rendering
unecessarily
 restrictive, when something like this should be allowed (or at least
 configurable).  HTML nested in f:verbatim doesn't seem to render
 properly
 when there are JSF tags (h:outputText/) nested within.
 --
 View this message in context:

http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7344409
 Sent from the MyFaces - Users mailing list archive at Nabble.com.





 --
 View this message in context:

http://www.nabble.com/text-align%3A-center---without-%3Ch%3AdataTable%3E-tf2631645.html#a7359717
 Sent from the MyFaces - Users mailing list archive at Nabble.com.











Re: [Tobago] Important changes to tc:tree (please rename tc:tree to tc:treeOld)

2006-11-15 Thread Udo Schnurpfeil

Hello,

it turns out, that the changes are very complex.
The release of 1.0.9 is scheduled for 30/Nov/06.
To have a stable version at release time I suggest to put
the new tree for the time being in the sandbox
and schedule the release of the fundamental change
to version 1.1.0.

Regards

Udo

Udo Schnurpfeil schrieb:

Hello,

today I've started the development of the long outstanding fundamental
change of the tc:tree tag. (The change was announced in the tld-file
long time ago.)

If you are using this tag and you want to update to version
1.0.9-SNAPSHOT of tobago you should change your code by renaming tc:tree
to tc:treeOld.

The tc:treeOld tag will keep the old functionality for the time being.

The main change is TOBAGO-18: Implement a var attribute for the tree
The change will make the tree more flexible, the current version is very
old, and has some disadvantages (e.g. the name of a node can't be set
with an usual EL-Expression).

I apologize for the trouble caused.

Regards

Udo





general myfaces performance question

2006-11-15 Thread Werner Punz

Ok, before anyone is falling down the chair because I ask this question.
Here we go. A friend of mine is looking for a struts replacement 
framework covering extranet sites.


Well here we go, my experience with jsf in the past is, that it was not 
too suitable for extranet, but is a perfect choice for intranet sites.
The reason, higher overhead than plain lean frameworks only covering a 
minimalistic approach.


The situation has changed however, facelets give a huge performance 
boost due to good caching.

But I lack experience, I know several bigger intranet installations,
but extranet is a fully different beast.

So my question how good does jsf scale nowadays in those cases.
Does anyone have any experience or samples?



Re: Help getting started with tobago-facelets in a portlet

2006-11-15 Thread Stephen More

On 11/15/06, Bernd Bohmann [EMAIL PROTECTED] wrote:

Hello,

started to try your example.
How can I deploy and invoke the example on a server?


You can download a working portal from:
http://www.liferay.com/web/guest/downloads
Once the portal is up and running, you configure a directory where
portlets are HotDeployed. Copy the war file into this deploy directory
then that portlet can be added to a page within the portal.


See the other comments in the mail.


Stephen More wrote:
 On 11/14/06, Bernd Bohmann [EMAIL PROTECTED] wrote:
 looks like the scarborough jar is missing.

 I added the scarborough jar.

 I am using maven2 and put tobago-facelets in my pom.xml

 http://www.ibiblio.org/maven2/org/apache/myfaces/tobago/tobago-facelets/1.0.8/


 If scarborough is required, shouldn't it have been automatically
 downloaded ?

The tobago-facelets.jar has only a dependency to tobago-core.
You should include a dependency to a theme in you pom.


 I'm not sure that tobago is working in a portlet enviroment, but if you
 are interested I will try to help you with the errors.


This error should be fixed in the current snapshot.

Please follow the instructions in:

http://myfaces.apache.org/tobago/getting-started.html



I have tried:

$ svn checkout http://svn.apache.org/repos/asf/myfaces/tobago/trunk/ tobago
svn: PROPFIND request failed on '/repos/asf/myfaces/tobago/trunk'
svn: PROPFIND of '/repos/asf/myfaces/tobago/trunk': 504 Proxy Timeout
( Connection timed out. For more information about this event, see ISA
Server Help.  ) (http://svn.apache.org)

I will try again later.

-Thanks


 Now I get this error:
   2006-11-15 14:50:26,413 WARN  [TobagoRenderKit:77] patching content
 type from text/html to text/html'
 2006-11-15 14:50:26,756 ERROR [RendererBase:112] catched
 java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
 :com.liferay.portlet.RenderResponseImpl
 java.lang.ClassCastException: com.liferay.portlet.RenderResponseImpl
at
 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEndTobago(PageRenderer.java:145)

at
 
org.apache.myfaces.tobago.renderkit.RendererBase.encodeEnd(RendererBase.java:108)

at
 javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:331)
at
 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)

at
 
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)

at
 com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
at
 org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:352)
at
 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:323)

at
 
org.apache.myfaces.portlet.MyFacesGenericPortlet.nonFacesRequest(MyFacesGenericPortlet.java:298)

at
 
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:380)

at
 
org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:266)

at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)


 Can you share the example with me?

 Yes, I will put it on a web site shortly.


Regards


Bernd



javax.servlet.ServletException: Client-id : _idJsp0 is duplicated in the faces tree.

2006-11-15 Thread behrangsa

Hi,

When I modify a JSP (add/remove some children to a panelGrid,etc.) and press
F5 to see the changes, I get the following exception in Tomcat 5.5.17 or
5.5.20:

javax.faces.FacesException: Client-id : _idJsp0 is duplicated in the faces
tree. Component : _idJsp0, path: {Component-Path : [Class:
javax.faces.component.UIViewRoot,ViewId: /position/index.jsp][Class:
javax.faces.component.html.HtmlPanelGrid,Id: positionPane][Class:
javax.faces.component.html.HtmlPanelGrid,Id: ositionTitlePane][Class:
javax.faces.component.html.HtmlOutputText,Id: _idJsp0]}

org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:422)

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

org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

The second time I press F5, everything starts working fine again. Any ideas
how can I overcome this problem?

Also, sometimes when I change the value attribute of an outputText and press
F5 to see the changes, the changes are not reflected... any ideas what
should I do to make these glitches go away?

Regards,
Behi
-- 
View this message in context: 
http://www.nabble.com/javax.servlet.ServletException%3A-Client-id-%3A-_idJsp0-is-duplicated-in-the-faces-tree.-tf2640305.html#a7370404
Sent from the MyFaces - Users mailing list archive at Nabble.com.



panelGrid cellpadding and cellspacing

2006-11-15 Thread behrangsa

Hi,

MyFaces does not emit the output of cellpadding and cellspacing for
panelGrid. Is this a known issue or is it intentional?

Regards,
Behi
-- 
View this message in context: 
http://www.nabble.com/panelGrid-cellpadding-and-cellspacing-tf2640378.html#a7370604
Sent from the MyFaces - Users mailing list archive at Nabble.com.



Printing and Saving text in JSF

2006-11-15 Thread pallavi.roy

Hi All,

 I have a simple JSF Faces Portlet application having two
buttons (Print and Save) and a text area.
 I want your suggestions on how i could print the text to
printer and save the text to a word doc in JSF.
 Please forward me any tutorials or references where i could
understand this concept.

Best Regards,
Pallavi





The information contained in this electronic message and any attachments to 
this message are intended for the exclusive use of the addressee(s) and may 
contain proprietary, confidential or privileged information. If you are not the 
intended recipient, you should not disseminate, distribute or copy this e-mail. 
Please notify the sender immediately and destroy all copies of this message and 
any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should 
check this email and any attachments for the presence of viruses. The company 
accepts no liability for any damage caused by any virus transmitted by this 
email.

www.wipro.com

Re: [Tobago] Mozilla renders different than Explorer

2006-11-15 Thread [EMAIL PROTECTED]
Try another theme

 
 Hi,
 Next day, Another problem.
 
 What's wrong with this code?
 Explorer renders ok, Mozilla renders with scrollbars.
 Is there any tutorial about tobago? Couldn't find anything else then
 myfaces.apache.org/.../tobago..
 
 Thx again,
 Peter
 
 layout:standard
 jsp:body
 tc:panel
 tc:form id=form_productedit
 tc:tabGroup id=CartEditTabs state=client 
 height=600px
 tc:tab label=Ogólne tip=Ogólne dane dotyczące
 produktu
 tc:form id=form_productedit_general
 tc:panel
 f:facet name=layout
 tc:gridLayout
 rows=20px;20px;50px;20px;400px columns=800px/
 /f:facet
 tx:in value=#{CartEdit.id}
 readonly=true label=ID/
 tx:in label=Nazwa id=name
 required=true value=#{CartEdit.name}/
 tx:in id=keywords label=Słowa
 kluczowerequired=true value=#{CartEdit.keywords}/
 tc:button action=#{CartEdit.Save}
 tip=Zapisuje zmiany label=ZAPISZ/
 tc:cell /
 /tc:panel
 tc:hidden id=id value=#{CartEdit.id}/
 /tc:form
 /tc:tab
 
 tc:tab label=Opis
 tc:form id=form_productedit_desc
 tc:panel
 f:facet name=layout
 tc:gridLayout rows=95%;5%
 columns=1* /
 /f:facet
 tc:textarea id=description 
 value=#{CartEdit.description}/
 tc:button action=#{CartEdit.Save}
 tip=Zapisuje zmiany label=ZAPISZ/
 /tc:panel
 /tc:form
 /tc:tab
 /tc:tabGroup
 /tc:form
 /tc:panel
 /jsp:body
 /layout:standard
 -- 
 View this message in context: 
 http://www.nabble.com/-Tobago--Mozilla-renders-different-than-Explorer-tf2629215.html#a7336838
 Sent from the MyFaces - Users mailing list archive at Nabble.com.
 
 


---
This mail was sent with the Java email client Columba. Read more at 
http://columbamail.org



Re: Custom component, validation messages

2006-11-15 Thread delbd
I was hoping there could be some suggestion on how to transfert messages
from component id X:a to component id X. I'd like to give user
opportunity to put those error message where ever they want. But maybe i
should better do 'component X internal validation that check values of
it's subcomponents', it seems more logical now.

Thanks for your answers, at least i know i am not missing some obvious
possibility :)

Martin Marinschek a écrit :
 If he can integrate the message-component in the input-component, then
 that's an option, right!

 regards,

 Martin

 On 11/14/06, David Chandler [EMAIL PROTECTED] wrote:
 I may not be understanding your question correctly, but if you're
 adding the
 input sub-components programatically, you could add the associated
 message
 sub-components programatically at the same time. Call setId() on each
 input
 component to give it its own ID that you can then use in for= on the
 corresponding message component.

 /dmc

 -- 
 David Chandler
 Development Coach
 learnjsf.com

 On 11/14/06, David Delbecq [EMAIL PROTECTED] wrote:
  Hi,
 
  I have a custom component ( let's say assume has id X ) that is
 made of
  several Input component ( let's say X:a, X:b, X:c)
 
  Is it possible to have the error messages for X also contains the
 error
  for X:a X:b and X:c. I  assume user will want something like
  h:message for=X/
 
  and not have to write
 
  h:message for=X/
  h:message for=X:a/
  h:message for=X:b/
  h:message for=X:c/
 
  Is there some mechanics in myfaces that can be of any help to me? Do i
  have to manually transfer message in the component, and if yes, when?
 









Re: general myfaces performance question

2006-11-15 Thread Martin Marinschek

He should definitely take the Trinidad component set for high
performance requirements, with this, you're in the same region as
Struts for performance (probably better - cause if you do it yourself,
you won't get the same optimized state-saving as is implemented in
Trinidad).

regards,

Martin

On 11/15/06, Werner Punz [EMAIL PROTECTED] wrote:

Ok, before anyone is falling down the chair because I ask this question.
Here we go. A friend of mine is looking for a struts replacement
framework covering extranet sites.

Well here we go, my experience with jsf in the past is, that it was not
too suitable for extranet, but is a perfect choice for intranet sites.
The reason, higher overhead than plain lean frameworks only covering a
minimalistic approach.

The situation has changed however, facelets give a huge performance
boost due to good caching.
But I lack experience, I know several bigger intranet installations,
but extranet is a fully different beast.

So my question how good does jsf scale nowadays in those cases.
Does anyone have any experience or samples?





--

http://www.irian.at

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

Professional Support for Apache MyFaces


t:dataTable

2006-11-15 Thread support

In the t:dataTable value=#{addressBB.states} var=state, what is the var 
attribute for?
Also is it possible to use this tag to display a full table in text edit fields 
and display a submit button to updated
the table on the backend?

Any examples would be appreciated.  The documentation and examples on this tag 
on the apache website seem to be lacking.





Re: t:dataTable

2006-11-15 Thread Cagatay Civici

Hi,

In the t:dataTable value=#{addressBB.states} var=state, what is the

var attribute for?


var attribute is an iterator used when rendering each row.

Also is it possible to use this tag to display a full table in text edit

fields and display a submit button to updated
the table on the backend?


Yes, it's possible.

Please see the examples under datatable section,
http://example.irian.at/example-simple-20061116/home.jsf

Regards,

Cagatay

On 11/16/06, support [EMAIL PROTECTED] wrote:


In the t:dataTable value=#{addressBB.states} var=state, what is the
var attribute for?
Also is it possible to use this tag to display a full table in text edit
fields and display a submit button to updated
the table on the backend?

Any examples would be appreciated.  The documentation and examples on this
tag on the apache website seem to be lacking.






t:inputDate display seconds

2006-11-15 Thread Aneesha Govil

Hi,

I would like to display seconds as well in the t:inputDate component. Right
now, it just gives me Date-Month-Year-Hours-Mins. I am using type=both.
Any idea how can I set it to display seconds too?

Thanks,
Aneesha


preserve formatting with textArea component

2006-11-15 Thread Madhav Bhargava

Hi All,



Following is the requirement:

User enters text in text area or a similar component. The user clicks on
the save button which then saves the data in a database.

When the user views the file again, data is retrieved from the database
to display on the page.



Question:



1.  How will preserve any formatting which involves indentation,
line breaks etc.. along with text?
2.  While showing the text in an editable or non-editable field how
will display the text as it was entered using any JSF component?



Thanks,

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

Re: general myfaces performance question

2006-11-15 Thread Matthias Wessendorf

do you have numbers for that better than struts ?

On 11/16/06, Martin Marinschek [EMAIL PROTECTED] wrote:

He should definitely take the Trinidad component set for high
performance requirements, with this, you're in the same region as
Struts for performance (probably better - cause if you do it yourself,
you won't get the same optimized state-saving as is implemented in
Trinidad).

regards,

Martin

On 11/15/06, Werner Punz [EMAIL PROTECTED] wrote:
 Ok, before anyone is falling down the chair because I ask this question.
 Here we go. A friend of mine is looking for a struts replacement
 framework covering extranet sites.

 Well here we go, my experience with jsf in the past is, that it was not
 too suitable for extranet, but is a perfect choice for intranet sites.
 The reason, higher overhead than plain lean frameworks only covering a
 minimalistic approach.

 The situation has changed however, facelets give a huge performance
 boost due to good caching.
 But I lack experience, I know several bigger intranet installations,
 but extranet is a fully different beast.

 So my question how good does jsf scale nowadays in those cases.
 Does anyone have any experience or samples?




--

http://www.irian.at

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

Professional Support for Apache MyFaces




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

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


Re: Printing and Saving text in JSF

2006-11-15 Thread Matthias Wessendorf

that is not really related to jsf general.
the print approach, you can create a pdf (has been discussed here already)
the save thing you need to work with an API that allows you to take (plain)
text to word...

On 11/16/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 Hi All,

 I have a simple JSF Faces Portlet application having two buttons
(Print and Save) and a text area.
 I want your suggestions on how i could print the text to printer
and save the text to a word doc in JSF.
 Please forward me any tutorials or references where i could
understand this concept.

Best Regards,
Pallavi



The information contained in this electronic message and any attachments
to this message are intended for the exclusive use of the addressee(s) and
may contain proprietary, confidential or privileged information. If you are
not the intended recipient, you should not disseminate, distribute or copy
this e-mail. Please notify the sender immediately and destroy all copies of
this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient
should check this email and any attachments for the presence of viruses. The
company accepts no liability for any damage caused by any virus transmitted
by this email.

www.wipro.com





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

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