Re: [tobago] integrating Tomahawk Shedule componenent in Tobago

2007-07-17 Thread Volker Weber

Hi Zied,

with the latest shnapshot you should be able to use tomahawk tags inside tobago.

There is an example with the tomahawk Shedule in the sandbox examples:
example/sandbox/src/main/webapp/tomahawk.jsp


Regards,
   Volker


2007/7/17, Zied Hamdi <[EMAIL PROTECTED]>:

Hi Again,

I've downloaded the last night build (1.0.12 SNAPSHOT), there's a lot of
interesting stuff like radio and checkbox menus, extended text area,
unfortunately there's nothing dealing with the Shedule yet (I took a look at
the tld).

Can someone of the team please tell me if it's planned to be adapted in the
near future? I'd like to do and submit it, but I'm not exerienced with JSF
and it would take me a lot of time and frustrations (especially that I'm
already late for my project :-)...

Regards,
Zied

2007/7/17, Zied Hamdi <[EMAIL PROTECTED]>:
>
> Thanks for the hint Matthias (and the rapid answer),
>
> I'll take a look there and give a feedback to the mailing list if I've
found a solution.
>
> Regards,
> Zied
>
>
> 2007/7/17, Matthias Wessendorf <[EMAIL PROTECTED]>:
>
> > I know there is a tobago sandbox, which aims to support some tomahawk
stuff,
> > perhaps it's worth to take a look ?
> >
> > -Matthias
> >
> > On 7/17/07, Zied Hamdi <[EMAIL PROTECTED]> wrote:
> > > Hi there,
> > >
> > > I have a strong need of a shedule, and I saw
> > > http://myfaces.apache.org/tomahawk/schedule.html that
is
> > > really excellent. I've chosen Tobago because of the time I can gain on
> > > design (not developping css files, and have nice skins that fulfill my
> > > needs), I saw it's not possible to have compatibility between tobago
and
> > > other myFaces libs, because of the unique View id imposed by the
specs. So
> > > the only solution to have the tomahawk schedule in my tobago app seems
to be
> > > to port the classes to Tobago. I'm new to JSF so I'd ask: is it a big
time
> > > consuming task to do that? or maybe should I ask before that: "does
Tobgao
> > > plan to have its shedule in the next two months?"
> > >
> > > If anyone has the answer, please tell me, my project must be finished
in two
> > > months, so I'm beginning to be scared ;-+;
> > >
> > > Regards,
> > > Zied
> > >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > mail: matzew-at-apache-dot-org
> >
>
>
>
> --
> Zied Hamdi
> zatreex.sourceforge.net



--
Zied Hamdi
zatreex.sourceforge.net


Re: [Tobago] when

2007-07-22 Thread Volker Weber

Hi Ramarao,

what you want is currently not possible in plain tobago. You need additional
javascript to archive this.



Try the following code:


   
  initInput = function(id) {
var input = Tobago.element(id);
Tobago.addEventListener(input, "keyup", "submitActionOnEnter(event)");
  }
  submitActionOnEnter = function(event) {
if (!event) { event = window.event;}

var keyCode;
if (event.which) {
  keyCode = event.which;
} else {
  keyCode = event.keyCode;
}

if (keyCode == 13) {
  var input = Tobago.element(event);
  if (input) {
if (input.value.length > 0) {
  var linkId = input.id.substr(0,
input.id.lastIndexOf(":") + ":searchLink");
  Tobago.submitAction(linkId);
} else {
  alert("No value in search field!")
}
  }
}
  }
  checkAndSubmit = function(event) {
if (!event) { event = window.event;}
var link = Tobago.element(event);
var inputId = link.id.substr(0, link.id.lastIndexOf(":") + ":search");
var input = Tobago.element(inputId);
if (input) {
  if (input.value.length > 0) {
Tobago.submitAction(link.id);
  } else {
alert("No value in search field!")
  }
} else {
  alert("input not found");
}
  }
   
   
   


note: I have not tested nor compiled this so there may be errors in
the javascript, but you should get how to do this.


Regards,
   Volker



2007/7/20, Ramarao Venkata <[EMAIL PROTECTED]>:

Hi,

I has a tc:in and a tc:link.  when we click on the link the form is submited
even though no value value in tc:in.
When there is no value in tc:in and pressed on 
 
 
 


kindly suggest a solution.

regards
Ramarao













Re: [Trinidad] How to check if file exists using InputFile compon ent?

2007-07-26 Thread Volker Weber
Hi,

is there a contentType if the file does not exists?


Regards,
Volker

2007/7/26, Piotr Pikusa <[EMAIL PROTECTED]>:
> Thank you for reply. Unfortunately your method doesn't work with
> org.apache.myfaces.trinidad.model.UploadedFile object returned by InputFile.
> UploadFile has a method getFilename() which returns name given by user. It
> still doesn't check if file exists, so it is not a name of real file. So the
> problem still isn't solved.
>
> -Original Message-
> From: Volker Weber [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 26, 2007 11:40 AM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] How to check if file exists using InputFile
> compon ent?
>
>
> Hi Piotr,
>
> i don't know the tomahawk InputFile component, but maybe you can check
> the uploaded filename?
>
> In tobago we check the filename to determine if a file was uploaded:
>
>  if (file == null || file.getName().length() == 0) {
>   addErrorMessage(facesContext);
>   setValid(false);
>  }
>
>
> Regards,
> Volker
>
>
> 2007/7/26, Piotr Pikusa <[EMAIL PROTECTED]>:
> > In many toutorials about InputFile component (e.g on Oracle and Trinidad
> > sites) there is if instruction to check if uploadFile is not null. But it
> > would never be null, event if the file doesn't exist. Is it a bug in
> > compoment? Is there any way to check file existence using InputFile
> > component?
> >
> >
> > -Original Message-
> > From: Piotr Pikusa [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 25, 2007 3:10 PM
> > To: 'MyFaces Discussion'
> > Subject: RE: [Trinidad] How to check if file exists using InputFile compon
> > ent?
> >
> >
> > Unfotunately not. If the existing file is empty the getLength() method
> > returns 0 too. So the problem isn't still solved.
> >
> >
> > Matthias Wessendorf  wrote:
> >
> > hi piotr,
> >
> > the UploadedFile interfaces has a getLength() method
> >
> > it's 0, when the file isn't there..
> >
> > -M
> >
> > On 7/25/07, Piotr Pikusa <[EMAIL PROTECTED]> wrote:
> > > Hey!
> > >
> > > As it is mentioned in the subject I wonder if there is any possibility
> to
> > > check file existence.
> > > I got this code on my jsp page:
> > >
> > > [code]
> > >
> > >  > >required="true"
> > >rendered="true"
> > >label="Load File:"
> > >value="#{backingBean.file}"
> > >  />
> > >  > > text="#{"Button"}"
> > > action="#{backingBean.importFile}" />
> > >
> > > [/code]
> > >
> > > which bind the value to the file property. The type of file is
> UploadFile.
> > > In backingBean I have this code:
> > >
> > > [code]
> > >
> > > UploadFile file;
> > >
> > > public void importFile(){
> > > if(file != null) {
> > > doSomeAction();
> > > }
> > > else{
> > > returnError();
> > > }
> > > }
> > >
> > > public UploadedFile getFile() {
> > > return file;
> > > }
> > >
> > > public void setFile(UploadedFile file) {
> > > this.file = file;
> > > }
> > >
> > > [/code]
> > >
> > > The point of the problem is that the file is never null, no matter if
> file
> > > exists or not. If file doesn't exist the InputFile component doesn't
> > return
> > > null. The UploadFile doesn't have a method to check file existence.
> > > So my question is when file property can be null. And how to check if
> file
> > > exists using InputFile component and UploadFile object? (I cannot use
> > other
> > > type, but UploadFile).
> > >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > mail: matzew-at-apache-dot-org
> >
>


Re: [Trinidad] How to check if file exists using InputFile compon ent?

2007-07-26 Thread Volker Weber
Hi Piotr,

i don't know the tomahawk InputFile component, but maybe you can check
the uploaded filename?

In tobago we check the filename to determine if a file was uploaded:

 if (file == null || file.getName().length() == 0) {
  addErrorMessage(facesContext);
  setValid(false);
 }


Regards,
Volker


2007/7/26, Piotr Pikusa <[EMAIL PROTECTED]>:
> In many toutorials about InputFile component (e.g on Oracle and Trinidad
> sites) there is if instruction to check if uploadFile is not null. But it
> would never be null, event if the file doesn't exist. Is it a bug in
> compoment? Is there any way to check file existence using InputFile
> component?
>
>
> -Original Message-
> From: Piotr Pikusa [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 25, 2007 3:10 PM
> To: 'MyFaces Discussion'
> Subject: RE: [Trinidad] How to check if file exists using InputFile compon
> ent?
>
>
> Unfotunately not. If the existing file is empty the getLength() method
> returns 0 too. So the problem isn't still solved.
>
>
> Matthias Wessendorf  wrote:
>
> hi piotr,
>
> the UploadedFile interfaces has a getLength() method
>
> it's 0, when the file isn't there..
>
> -M
>
> On 7/25/07, Piotr Pikusa <[EMAIL PROTECTED]> wrote:
> > Hey!
> >
> > As it is mentioned in the subject I wonder if there is any possibility to
> > check file existence.
> > I got this code on my jsp page:
> >
> > [code]
> >
> >  >required="true"
> >rendered="true"
> >label="Load File:"
> >value="#{backingBean.file}"
> >  />
> >  > text="#{"Button"}"
> > action="#{backingBean.importFile}" />
> >
> > [/code]
> >
> > which bind the value to the file property. The type of file is UploadFile.
> > In backingBean I have this code:
> >
> > [code]
> >
> > UploadFile file;
> >
> > public void importFile(){
> > if(file != null) {
> > doSomeAction();
> > }
> > else{
> > returnError();
> > }
> > }
> >
> > public UploadedFile getFile() {
> > return file;
> > }
> >
> > public void setFile(UploadedFile file) {
> > this.file = file;
> > }
> >
> > [/code]
> >
> > The point of the problem is that the file is never null, no matter if file
> > exists or not. If file doesn't exist the InputFile component doesn't
> return
> > null. The UploadFile doesn't have a method to check file existence.
> > So my question is when file property can be null. And how to check if file
> > exists using InputFile component and UploadFile object? (I cannot use
> other
> > type, but UploadFile).
> >
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> mail: matzew-at-apache-dot-org
>


Re: tc:in and autocomplete="off"

2007-07-27 Thread Volker Weber
Hi Michał,

if you add the suggestMethod attribute you get autocomplete="off" as sideeffect.
You can just return an empty list to aviod the selections.


Regards,
Volker

2007/7/27, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]>:
> Is there a way to set autocomplete="off" attribute for input field
> generated by tc:in ?
>
> regards,
> michał stawicki
>
> --
> Michał Stawicki
>
> [EMAIL PROTECTED]
> http://stawicki.jasliska.pl
>


Re: [Trinidad] How to check if file exists using InputFile compon ent?

2007-07-27 Thread Volker Weber
Hi,

there is no chance on the server to distinguish between an empty file and a
non existing file. In FF and IE the generated request is the same.

see also
http://www.nabble.com/-FileUpload--Detecting-empty-file-vs.-bad-path-t2122968.html#a5888362

The only we can do on the server is checking the filename, an uploaded
file has a filename.


Regards,
Volker



2007/7/26, Piotr Pikusa <[EMAIL PROTECTED]>:
> Yes there is a contentType of file type not recognized by server. The
> problem is, that InputFile doesn't return null if file doesn't exist. What
> is more UploadFile dosen't have a method to check it. So I can even get
> InputStream from UploadFile object with length = 0. There is no way to
> differ an empty file from not existing file. So I wonder if it is a bug.
>
> -Original Message-
> From: Volker Weber [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 26, 2007 12:51 PM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] How to check if file exists using InputFile
> compon ent?
>
>
> Hi,
>
> is there a contentType if the file does not exists?
>
>
> Regards,
> Volker
>
> 2007/7/26, Piotr Pikusa <[EMAIL PROTECTED]>:
> > Thank you for reply. Unfortunately your method doesn't work with
> > org.apache.myfaces.trinidad.model.UploadedFile object returned by
> InputFile.
> > UploadFile has a method getFilename() which returns name given by user. It
> > still doesn't check if file exists, so it is not a name of real file. So
> the
> > problem still isn't solved.
> >
> > -Original Message-
> > From: Volker Weber [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, July 26, 2007 11:40 AM
> > To: MyFaces Discussion
> > Subject: Re: [Trinidad] How to check if file exists using InputFile
> > compon ent?
> >
> >
> > Hi Piotr,
> >
> > i don't know the tomahawk InputFile component, but maybe you can check
> > the uploaded filename?
> >
> > In tobago we check the filename to determine if a file was uploaded:
> >
> >  if (file == null || file.getName().length() == 0) {
> >   addErrorMessage(facesContext);
> >   setValid(false);
> >  }
> >
> >
> > Regards,
> > Volker
> >
> >
> > 2007/7/26, Piotr Pikusa <[EMAIL PROTECTED]>:
> > > In many toutorials about InputFile component (e.g on Oracle and Trinidad
> > > sites) there is if instruction to check if uploadFile is not null. But
> it
> > > would never be null, event if the file doesn't exist. Is it a bug in
> > > compoment? Is there any way to check file existence using InputFile
> > > component?
> > >
> > >
> > > -Original Message-
> > > From: Piotr Pikusa [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, July 25, 2007 3:10 PM
> > > To: 'MyFaces Discussion'
> > > Subject: RE: [Trinidad] How to check if file exists using InputFile
> compon
> > > ent?
> > >
> > >
> > > Unfotunately not. If the existing file is empty the getLength() method
> > > returns 0 too. So the problem isn't still solved.
> > >
> > >
> > > Matthias Wessendorf  wrote:
> > >
> > > hi piotr,
> > >
> > > the UploadedFile interfaces has a getLength() method
> > >
> > > it's 0, when the file isn't there..
> > >
> > > -M
> > >
> > > On 7/25/07, Piotr Pikusa <[EMAIL PROTECTED]> wrote:
> > > > Hey!
> > > >
> > > > As it is mentioned in the subject I wonder if there is any possibility
> > to
> > > > check file existence.
> > > > I got this code on my jsp page:
> > > >
> > > > [code]
> > > >
> > > >  > > >required="true"
> > > >rendered="true"
> > > >label="Load File:"
> > > >value="#{backingBean.file}"
> > > >  />
> > > >  > > > text="#{"Button"}"
> > > > action="#{backingBean.importFile}" />
> > > >
> > > > [/code]
> > > >
> > > > which bind the value to the file property. The type of file is
> > UploadFile.
> > > > In backingBean I have this code:
> > > >
> > > > [code]
> > > >
> > > > UploadFile file;
> > > >
> > > > public void importFile(){
> > > > if(file != null) {
> > > > doSomeAction();
> > > > }
> > > > else{
> > > > returnError();
> > > > }
> > > > }
> > > >
> > > > public UploadedFile getFile() {
> > > > return file;
> > > > }
> > > >
> > > > public void setFile(UploadedFile file) {
> > > > this.file = file;
> > > > }
> > > >
> > > > [/code]
> > > >
> > > > The point of the problem is that the file is never null, no matter if
> > file
> > > > exists or not. If file doesn't exist the InputFile component doesn't
> > > return
> > > > null. The UploadFile doesn't have a method to check file existence.
> > > > So my question is when file property can be null. And how to check if
> > file
> > > > exists using InputFile component and UploadFile object? (I cannot use
> > > other
> > > > type, but UploadFile).
> > > >
> > >
> > >
> > > --
> > > Matthias Wessendorf
> > >
> > > further stuff:
> > > blog: http://matthiaswessendorf.wordpress.com/
> > > mail: matzew-at-apache-dot-org
> > >
> >
>


Re: JSF localization

2007-07-31 Thread Volker Weber
Hi,

you should point the locale attribute of f:view to a bean property which is
changed by the flag actions.

The tobago-demo [1] has an example in the config menu,
sources are avaliable in the svn[2].

[1]: http://tobago.atanion.net/tobago-example-demo
[2]: http://svn.apache.org/repos/asf/myfaces/tobago/trunk/example/demo


Regards,
Volker

2007/7/30, Carlos Ortiz <[EMAIL PROTECTED]>:
>
>  Hi,
>  Is there a way i can change a JSF localization at runtime example my web
> page is default in english  but a made my resources in Spanish and German. I
> have 3 flags when a user click the Germany Flag the JSF loads the German
> resource file instead the Engish resource file. [And so on]
>
>  Thank You
>
>  Carlos Ortiz.
>
>
>
>
> --
>  
> Vi Veri Veniversum Vivus Vici [By the power of Truth, I, while living, have
> conquered the universe]


Re: [Tobago] parameter for detail links

2007-08-01 Thread Volker Weber
Hi Leonhard,

you need the value of the parameter in your action?

Implement your actionListener like this:

public void test(ActionEvent event) {
String value =
(String)ComponentUtil.findParameter(event.getComponent(),
"tableNameId");

  ...

}


Regards,
Volker




2007/8/1, Leonhard Holzer <[EMAIL PROTECTED]>:
> Hello list,
>
> I use spring webflow together with tobago 1.0.11 on java 1.4.
> I have a sheet:
>
>  value="#{tableSearchCriteria.tableList}"
> columns="100px;70px;70px;70px;*" var="row">
> 
> 
> 
> ...
> 
> 
>  label="#{global.cmdDescribe}" action="describe"
> actionListener="#{tableSearchCriteria.test}">
>  value="test123"/>
>  value="Test23"/>
> 
> 
> 
> ...
> 
>
>
> but the parameter tableNameId is not transfered to the server.If I read
> all request parameters in the actionListener:
>
> FacesContext context = FacesContext.getCurrentInstance();
> Map map = context.getExternalContext().getRequestMap();
> Iterator iter = map.keySet().iterator();
> while (iter.hasNext()) {
> String key = (String) iter.next();
> System.out.println("key: "+key+" -> "+map.get(key));
> }
>
>
> The parameter tableNameId is not part of the parameters. does anyone
> have any suggestions?
>
> regards
>   Leo
>
>


Re: [Tobago] parameter for detail links

2007-08-01 Thread Volker Weber
Hi,

i suppose to don't use binding if you can avoid it. At least you
should never use a binding pointing to a session scoped bean.


Regards,
Volker

2007/8/1, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Leo,
>
> You sould use one of these two
>
> 1.  2. getApplication().createValueBinding( "#{" + yourID + "}" ).getValue(
> getFacesContext() );
>
> If you are under jsf 1.2 you can use
> getApplication().evaluateExpressionGet( getFacesContext(),
> "#{" + el + "}", clazz ) for the second case.
> In general it's not a good idea to access the tree through ServletRequest
> parameters, JSF did all it can to hide this low level.
>
> Regards,
> Zied
>
>
> 2007/8/1, Leonhard Holzer <[EMAIL PROTECTED]>:
> > Hello list,
> >
> > I use spring webflow together with tobago 1.0.11 on java 1.4.
> > I have a sheet:
> >
> > > value="#{tableSearchCriteria.tableList}"
> >
> columns="100px;70px;70px;70px;*" var="row">
> >
> > />
> >
> > ...
> >
> > id="describeTableForm">
> > > label="#{global.cmdDescribe}" action="describe"
> > actionListener="#{tableSearchCriteria.test}">
> > name="testTable"
> > value="test123"/>
> > name="tableNameId"
> > value="Test23"/>
> >
> >
> >
> > ...
> >
> >
> >
> > but the parameter tableNameId is not transfered to the server.If I read
> > all request parameters in the actionListener:
> >
> >FacesContext context = FacesContext.getCurrentInstance();
> >Map map = context.getExternalContext().getRequestMap();
> >Iterator iter = map.keySet().iterator();
> >while (iter.hasNext()) {
> >String key = (String) iter.next();
> >System.out.println("key: "+key+" -> "+map.get(key));
> >}
> >
> >
> > The parameter tableNameId is not part of the parameters. does anyone
> > have any suggestions?
> >
> > regards
> > Leo
> >
> >
>
>
>
> --
> Zied Hamdi
>  zatreex.sourceforge.net


Re: Date Display issue

2007-08-07 Thread Volker Weber
Hi,

see this link:
http://www.mail-archive.com/users%40myfaces.apache.org/msg21412.html


Regards,
Volker

2007/8/7, Ganesh Surisetty <[EMAIL PROTECTED]>:
> Hi,
>
> i need to display a date from the data base, i am printing on a
> jsp  with  less, means it is actually 3-jul-07 but it is showing 2-Jul-07 in the front
> end.
>
> can any one tell me the solution ...
> Thanks in Advance.


Re: Readonly + Validator

2007-08-15 Thread Volker Weber
Hi,

i don't understand the first question. You can use getTipFeriado()  on
the bean instance
independent of the readonly status of the ui component.
When the ui component is readonly the value will not change.

for the second question try:

((EditableValueHolder)uiComponent).setSubmittedValue(uiComponent.getSubmittedValue().toUpperCase())

in your validate method.


Regards,
Volker

2007/8/15, daniel ccss <[EMAIL PROTECTED]>:
>
> Hi all, I have 2 questions:
>
> Question1:
>
> In my JSP I have:
>
> 
> 
>  value="#{DiaFeriadoBean.tipFeriado }" readonly="true">
>  value="#{DiaFeriadoBean.tiposFeriadosSelect}" />
> 
> 
> .
>
> And In the DiaFeriadoBean the value of tipFeriado property is 0, I tried
> with disabled = true, but is the same, If I quit the reaonly="true" then I
> can get the value, My question is how can I get the value of a property that
> is read only?
>
> Question2:
>
> I use custom validators, and I need one to pass the value that the user
> enter to UpperCase:
>
> public class TextValidator implements Validator {
> .
>
> public void validate(FacesContext facesContext, UIComponent uIComponent,
> Object value) throws ValidatorException{
> ...
>
> What I need is that in this validate method change the value of the
> component to UpperCase, I have a javascript to do that, but I also want to
> have it on a validator method, how can I set the value of the component to
> the same value but toUpperCase something like uIComponent =
> value.toUpperCase.
>
> Regards,
>
> Daniel


Re: Readonly + Validator

2007-08-15 Thread Volker Weber
Hi,

I just took a look into the spec and the impl: It is not possible to change the
value inside the validator. You can change the value object, but in
case of String
this will not influence the object in the calling method. So you need
a converter
for this.

For the first question:
  you mean before rendering the result of getTipFeriado() is 21, and 0
  after rendering? Or why should 21 be the correct value?
  the value should not change on a readonly component.

 Or the value is 0 before rendering, but 0 is not content of the itemsList,
 And the value of the first item is 21 and therefore displayed, but
not set in case of readonly.


Regards,
Volker


2007/8/15, daniel ccss <[EMAIL PROTECTED]>:
> Thanks!!!
>
> 1- When the select have the attribute of readonly in true when i use
> getTipFeriado() I get a 0 value, when i put it in false I get 21 (the
> correct value), this is the select:
>
>  value="#{DiaFeriadoBean.tipFeriado}">
>  value="#{DiaFeriadoBean.tiposFeriadosSelect}" />
>  
>
> 2-
> I have somenthing very similar but it dosn´t works:
>
> String valor = (String)value;
>
> ((EditableValueHolder)uIComponent).setSubmittedValue(value.toUpperCase())
>
> It change the value but when i get back to the bean it steal have the value
> in lowercase
>
> I use your code, but a I recived a Sintaxis error: getSubmittedValue not
> found, do I have to do another cast:
>
> ((EditableValueHolder)uIComponent).setSubmittedValue(uIComponent.getSubmittedValue().toUpperCase())
>
>
>


Re: Readonly + Validator

2007-08-15 Thread Volker Weber
On a readonly component the model value will not change!

If your itemlist did not contain the modelValue the display is wrong not the
model after submit.


Regards,
Volker

2007/8/15, daniel ccss <[EMAIL PROTECTED]>:
> This is the case
>
> When I show the edit form the value of the readonly select is 21, but when I
> edit others values and click on the commandLink and an action is called if
> the select is readonly I get 0 if the select is not readonly the value is 21
> the correct value. What I just notice is that it only happens on the select
> control, beacause i have 2 input readonly controls and in the action I
> always get the correct value, no matter if are read only or not.


Re: Readonly + Validator

2007-08-16 Thread Volker Weber
Hi,

is the value of getTipFeriado() truely 21 BEFORE rendering the page?
Which scope is the bean?


Regards,
Volker

2007/8/15, daniel ccss <[EMAIL PROTECTED]>:
> On a readonly component the model value will not change!
>
> I know, I try to explain my point better with an image, as you can see when
> I load the edit form the select have a value selected readOnly, the code of
> the value selected is 21. Ok then I modify some others value and click on
> the  code in the select if (when the select is readonly) is 0! If I modify the
> jsp code and put readonly=false, in the backing_bean i get a 21 (correct
> value).
>


Re: Readonly + Validator

2007-08-16 Thread Volker Weber
Which value has getTipFeriado() BEFORE rendering the html to the Browser?
Why did you expect this is changed to the value displayed in the Browser?

2007/8/16, daniel ccss <[EMAIL PROTECTED]>:
> The scope is session,
>
> If i see the page source code from the browser I get this, as you see the 21
> is the first value, but it brings me a 0 if is read only. What I just notice
> is that in the JSP I have readonly="true" and in this source code I see:
> disabled="disabled" is that right?? Again if I erase the readonly=true I get
> the correct value 21:
>
>  ="1" disabled=
> "disabled">
>  ="21">RELIGIOSO >
> DEL ESTADO
> <
> option value="2">POR VACACIONES
>   value="3">PATRONALES
>  "15">POR DESATRES NATURALES
>  >BE
>
>
>
> On 8/16/07, Volker Weber < [EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > is the value of getTipFeriado() truely 21 BEFORE rendering the page?
> > Which scope is the bean?
> >
> >
> > Regards,
> > Volker
> >
> > 2007/8/15, daniel ccss <[EMAIL PROTECTED]>:
> > > On a readonly component the model value will not change!
> > >
> > > I know, I try to explain my point better with an image, as you can see
> when
> > > I load the edit form the select have a value selected readOnly, the code
> of
> > > the value selected is 21. Ok then I modify some others value and click
> on
> > > the  selected
> > > code in the select if (when the select is readonly) is 0! If I modify
> the
> > > jsp code and put readonly=false, in the backing_bean i get a 21 (correct
> > > value).
> > >
> >
>
>


Re: Readonly + Validator

2007-08-16 Thread Volker Weber
Let me summarize:

You have a datatable with rows containing commandLinks with parameters.
in a actionListener you fetch the parameter and set the bean value to 21.
Then a readonly selectOneMenu is rendered and after receiving the request
the bean value is resetted to 0.

In this case there must be a bug in the selectOneMenu component.

Can you put a debug statement with stacktrace in the setter to find out from
where the value is set to 0?


Regards,
Volker

2007/8/16, daniel ccss <[EMAIL PROTECTED]>:
> The value before is 21, the only problem is that when I put it readonly I
> can´t access his value and recived a 0.
>
> I have a datatable and in each row i of the datatable I have a commandLink
> to edit, when I click on the edit link I fill the form in an action listener
> that will be edit (look for the bold text), then I show the jsp:
>
>
> public void establecerFormEditar(ActionEvent event){
>
>  //Se obtiene el parámetro del día
>  UIParameter parametro =
> (UIParameter)event.getComponent().findComponent("parDia");
>  this.parDia = Integer.parseInt(parametro.getValue().toString());
>
>  //Se obtiene el parámetro del mes
>  parametro =
> (UIParameter)event.getComponent().findComponent("parMes");
>  this.parMes = Integer.parseInt(parametro.getValue().toString());
>
>  //Se obtiene el parámetro del anio
>  parametro =
> (UIParameter)event.getComponent().findComponent("parAnio");
>  this.parAnio = Integer.parseInt(parametro.getValue().toString());
>
>
>  //Se obtiene el parámetro del motivo
>  parametro =
> (UIParameter)event.getComponent().findComponent("dscFeriado");
>  this.dscFeriado = parametro.getValue().toString();
>
>  //Se obtiene el parámetro del logAplicaSiempre
>  parametro =
> (UIParameter)event.getComponent().findComponent("logAplicaSiempre");
>  this.logAplicaSiempre =
> Integer.parseInt(parametro.getValue().toString());
>
>  //Se obtiene el parámetro del tipFeriado
>  parametro =
> (UIParameter)event.getComponent().findComponent("tipFeriado");
>  this.tipFeriado =
> Integer.parseInt(parametro.getValue().toString());
>
>
>  //Se obtiene el parámetro del logActivo
>      parametro =
> (UIParameter)event.getComponent().findComponent("logActivo");
>  this.logActivo = Integer.parseInt(parametro.getValue().toString());
>
>
>  }
>
>
>
>
>
>
> On 8/16/07, Volker Weber <[EMAIL PROTECTED]> wrote:
> > Which value has getTipFeriado() BEFORE rendering the html to the Browser?
> > Why did you expect this is changed to the value displayed in the Browser?
> >
> > 2007/8/16, daniel ccss < [EMAIL PROTECTED]>:
> > > The scope is session,
> > >
> > > If i see the page source code from the browser I get this, as you see
> the 21
> > > is the first value, but it brings me a 0 if is read only. What I just
> notice
> > > is that in the JSP I have readonly="true" and in this source code I see:
> > > disabled="disabled" is that right?? Again if I erase the readonly=true I
> get
> > > the correct value 21:
> > >
> > >  > > ="1" disabled=
> > > "disabled">
> > >  > > ="21">RELIGIOSO > > >
> > > DEL ESTADO
> > > <
> > > option value="2">POR VACACIONES
> > >  > >  value="3">PATRONALES
> > >  > > "15">POR DESATRES NATURALES
> > >  > > >BE
> > >
> > >
> > >
> > > On 8/16/07, Volker Weber < [EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > is the value of getTipFeriado() truely 21 BEFORE rendering the page?
> > > > Which scope is the bean?
> > > >
> > > >
> > > > Regards,
> > > > Volker
> > > >
> > > > 2007/8/15, daniel ccss <[EMAIL PROTECTED]>:
> > > > > On a readonly component the model value will not change!
> > > > >
> > > > > I know, I try to explain my point better with an image, as you can
> see
> > > when
> > > > > I load the edit form the select have a value selected readOnly, the
> code
> > > of
> > > > > the value selected is 21. Ok then I modify some others value and
> click
> > > on
> > > > > the  > > selected
> > > > > code in the select if (when the select is readonly) is 0! If I
> modify
> > > the
> > > > > jsp code and put readonly=false, in the backing_bean i get a 21
> (correct
> > > > > value).
> > > > >
> > > >
> > >
> > >
> >
>
>


Re: Readonly + Validator

2007-08-19 Thread Volker Weber
I can't reproduce this behavior.
Can you please provide a small example showing this problem?


Regards,
Volker



2007/8/16, daniel ccss <[EMAIL PROTECTED]>:
> I think is a bug, is the only value that becomes 0 when a readonly property
> is set to true
>
>
> On 8/16/07, Volker Weber < [EMAIL PROTECTED]> wrote:
> > Let me summarize:
> >
> > You have a datatable with rows containing commandLinks with parameters.
> > in a actionListener you fetch the parameter and set the bean value to 21.
> > Then a readonly selectOneMenu is rendered and after receiving the request
> > the bean value is resetted to 0.
> >
> > In this case there must be a bug in the selectOneMenu component.
> >
> > Can you put a debug statement with stacktrace in the setter to find out
> from
> > where the value is set to 0?
> >
> >
> > Regards,
> > Volker
> >
> > 2007/8/16, daniel ccss < [EMAIL PROTECTED]>:
> > > The value before is 21, the only problem is that when I put it readonly
> I
> > > can´t access his value and recived a 0.
> > >
> > > I have a datatable and in each row i of the datatable I have a
> commandLink
> > > to edit, when I click on the edit link I fill the form in an action
> listener
> > > that will be edit (look for the bold text), then I show the jsp:
> > >
> > >
> > > public void establecerFormEditar(ActionEvent
> event){
> > >
> > >  //Se obtiene el parámetro del día
> > >  UIParameter parametro =
> > >
> (UIParameter)event.getComponent().findComponent("parDia");
> > >  this.parDia = Integer.parseInt
> (parametro.getValue().toString());
> > >
> > >  //Se obtiene el parámetro del mes
> > >  parametro =
> > >
> (UIParameter)event.getComponent().findComponent("parMes");
> > >  this.parMes =
> Integer.parseInt(parametro.getValue().toString());
> > >
> > >  //Se obtiene el parámetro del anio
> > >  parametro =
> > >
> (UIParameter)event.getComponent().findComponent("parAnio");
> > >  this.parAnio =
> Integer.parseInt(parametro.getValue().toString());
> > >
> > >
> > >  //Se obtiene el parámetro del motivo
> > >  parametro =
> > >
> (UIParameter)event.getComponent().findComponent("dscFeriado");
> > >  this.dscFeriado = parametro.getValue().toString();
> > >
> > >  //Se obtiene el parámetro del logAplicaSiempre
> > >  parametro =
> > >
> (UIParameter)event.getComponent().findComponent("logAplicaSiempre");
> > >  this.logAplicaSiempre =
> > > Integer.parseInt(parametro.getValue().toString());
> > >
> > >      //Se obtiene el parámetro del tipFeriado
> > >  parametro =
> > >
> (UIParameter)event.getComponent().findComponent("tipFeriado");
> > >  this.tipFeriado =
> > > Integer.parseInt(parametro.getValue().toString());
> > >
> > >
> > >  //Se obtiene el parámetro del logActivo
> > >  parametro =
> > >
> (UIParameter)event.getComponent().findComponent("logActivo");
> > >  this.logActivo =
> Integer.parseInt(parametro.getValue().toString());
> > >
> > >
> > >  }
> > >
> > >
> > >
> > >
> > >
> > >
> > > On 8/16/07, Volker Weber < [EMAIL PROTECTED]> wrote:
> > > > Which value has getTipFeriado() BEFORE rendering the html to the
> Browser?
> > > > Why did you expect this is changed to the value displayed in the
> Browser?
> > > >
> > > > 2007/8/16, daniel ccss < [EMAIL PROTECTED]>:
> > > > > The scope is session,
> > > > >
> > > > > If i see the page source code from the browser I get this, as you
> see
> > > the 21
> > > > > is the first value, but it brings me a 0 if is read only. What I
> just
> > > notice
> > > > > is that in the JSP I have readonly="true" and in this source code I
> see:
> > > > > disabled="disabled" is that right?? Again if I erase the
> readonly=true I
> > > get
> > > > > the correct value 21:
> > > > >
> > > > >  > > > > ="1" disabled=
> > > > > "disabled"

Re: [Tobago] Layout problem with 1.0.12

2007-08-19 Thread Volker Weber
Hi Helmut,

> Must I specify for every not rendered tag in a gridLayout a layout token for
> row and column?
yes, but in case of just one token (columns="*")  you can omit it.

I reduced your example to just the box content (only one button), and
the problem still exists, even without the popup.

Please add a jira entry, i'm going to take a look at this.


Regards,
Volker



2007/8/17, Helmut Swaczinna <[EMAIL PROTECTED]>:
> Hi,
>
> with Tobago 1.0.12 the layout of one of my popups is not calculated correct
> anymore. With 1.0.11 the
> layout was correct.
>
> Here's the (simplified) jsp code:
>
>   
> 
>label="Popup">
> 
>   
>
>label="Popup">
>   
>rows="40px;40px;*;fixed"
>   columns="*"/>
>   
>
>value="Text 1"/>
>value="Text 2"/>
>
>   
>
>   
> 
>columns="*;*;*"/>
> 
>label="button1">
>   
> 
>label="button2">
>   
> 
>label="button3">
>   
> 
>   
> 
>   
> 
>   
> 
>   
>
> With 1.0.12 the box has scrollbars, with 1.0.11 not. The scrollbars aren't
> nessecary at all.
> The problem with the layout comes from the two tc:out tags. One of them is
> rendered, the other not.
> (Which one should be rendered comes from a property in the backing bean). My
> question is:
> Must I specify for every not rendered tag in a gridLayout a layout token for
> row and column?
> (Here it's the 40px token.) If I specify the 40px token only once the layout
> is broken also.
>
> So, is there a (new) bug in the layout manager or how do I configure the
> layout manager when I have
> not rendered tags?
>
> Regards
> Helmut
>
>
>
>


Re: [Tobago] Layout problem with 1.0.12

2007-08-19 Thread Volker Weber
Hi,

i just added the jira entry: http://issues.apache.org/jira/browse/TOBAGO-473.

I fixed this locally, but svn seems to be down, i can't connect to commit.

I try it later.


Regards,
Volker




2007/8/19, Volker Weber <[EMAIL PROTECTED]>:
> Hi Helmut,
>
> > Must I specify for every not rendered tag in a gridLayout a layout token for
> > row and column?
> yes, but in case of just one token (columns="*")  you can omit it.
>
> I reduced your example to just the box content (only one button), and
> the problem still exists, even without the popup.
>
> Please add a jira entry, i'm going to take a look at this.
>
>
> Regards,
> Volker
>
>
>
> 2007/8/17, Helmut Swaczinna <[EMAIL PROTECTED]>:
> > Hi,
> >
> > with Tobago 1.0.12 the layout of one of my popups is not calculated correct
> > anymore. With 1.0.11 the
> > layout was correct.
> >
> > Here's the (simplified) jsp code:
> >
> >   
> > 
> >> label="Popup">
> > 
> >   
> >
> >  >   label="Popup">
> >   
> >  >   rows="40px;40px;*;fixed"
> >   columns="*"/>
> >   
> >
> >> value="Text 1"/>
> >> value="Text 2"/>
> >
> >   
> >
> >   
> > 
> >> columns="*;*;*"/>
> > 
> >  >   label="button1">
> >   
> > 
> >  >   label="button2">
> >   
> > 
> >  >   label="button3">
> >   
> > 
> >   
> > 
> >   
> > 
> >   
> > 
> >   
> >
> > With 1.0.12 the box has scrollbars, with 1.0.11 not. The scrollbars aren't
> > nessecary at all.
> > The problem with the layout comes from the two tc:out tags. One of them is
> > rendered, the other not.
> > (Which one should be rendered comes from a property in the backing bean). My
> > question is:
> > Must I specify for every not rendered tag in a gridLayout a layout token for
> > row and column?
> > (Here it's the 40px token.) If I specify the 40px token only once the layout
> > is broken also.
> >
> > So, is there a (new) bug in the layout manager or how do I configure the
> > layout manager when I have
> > not rendered tags?
> >
> > Regards
> > Helmut
> >
> >
> >
> >
>


Re: Russian characters of a filename in the dialogue to open or to save the file, turn to hieroglyphs. (tomcat apache Myfaces)

2007-08-27 Thread Volker Weber
Hi,

to get the correct encoded filename i do this:

  String encoding = request.getCharacterEncoding();
  if (encoding == null) {
encoding = "UTF-8";
  }
  String fileName = new String(attachment.getName().getBytes(), encoding);


Regards,
Volker

2007/8/25, Владимир Петров <[EMAIL PROTECTED]>:
> Hello! I'm from Russia. And I not so well speak in English. i am trying to 
> get the data from database to jsp. If the name of the file on English - in 
> the dialogue normal characters, all works. If the name of the file on Russian 
> - in the dialogue hieroglyphs and nothing works. Please respond.
> jsp:
>
> <%@ page contentType="text/html; charset=UTF-8" %>
> <%@ page pageEncoding="UTF-8"%>
> <%@ page import="java.io.File,
>  java.io.InputStream,
>  java.io.FileInputStream,
>  java.io.OutputStream"%>
> <%@ page session="false" %>
> <%
> String fileName = (String)application.getAttribute("fileupload_name");
> String contentType = (String)application.getAttribute("fileupload_type");
> if(contentType!=null){
> response.setContentType(contentType);
> }
>
> StringBuffer contentDisposition = new StringBuffer();
>
> contentDisposition.append("attachment;");
> //URLEncoder.encode(fileName, "UTF-8");
> contentDisposition.append("filename=\"");
> contentDisposition.append(fileName);
> contentDisposition.append("\"");
>
> response.setHeader ("Content-Disposition", contentDisposition.toString());
>
>
> byte[] bytes = (byte[])application.getAttribute("fileupload_bytes");
> if (bytes != null){
> response.getOutputStream().write(bytes);
> }
> %>
>
> Thank by all.
>


Re: TObago

2007-08-29 Thread Volker Weber
Hi Yazid,

which version of tobago?

this is UIPopup in trunk:

 69
 70   public boolean isRendered() {
 71 ValueBinding valueBinding = getValueBinding("rendered");
 72 if (valueBinding!= null) {
 73   return (Boolean) valueBinding.getValue(getFacesContext());
 74 } else {
 75   return isActivated() || isRedisplay();
 76 }
 77   }
 78

The only NPE in line 73 could be a autoboxing NPE when converting a
null returned by valueBinding to boolean return value.


Regards,
Volker

2007/8/29, yazid <[EMAIL PROTECTED]>:
>
> Hi all;
> I've a strange problem with tobago jsp;  happens sometimes and I can't
> reproduce
> -
> java.lang.NullPointerException
> at 
> org.apache.myfaces.tobago.component.UIPopup.isRendered(UIPopup.java:73)
> at
> org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:66)
> at
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEnd(PageRenderer.java:138)
>   ..
> --
> I've 3 popup in the page; all off in page load time.
> Please help
>
>
>
>
> --
> View this message in context: 
> http://www.nabble.com/TObago-tf4345120.html#a12379088
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: TObago

2007-08-29 Thread Volker Weber
Can you ensure that getDeleteRuleMessage() never returns null?
Only in this case the NPE can happen.

2007/8/29, yazid <[EMAIL PROTECTED]>:
>
> Hi Volker;
> Two of  the popup have rendered="true" and the third have
> rendered="#{ruleBrowserUI.deleteRuleMessage!=''}"; this method is a getter
> of a String
> public String getDeleteRuleMessage() {
> return deleteRuleMessage;
> }
>
> The version of Tobago I'm using is 1.0.11
> Regards;
>
>
> yazid wrote:
> >
> > Hi all;
> > I've a strange problem with tobago jsp;  happens sometimes and I can't
> > reproduce
> > -
> > java.lang.NullPointerException
> >   at
> > org.apache.myfaces.tobago.component.UIPopup.isRendered(UIPopup.java:73)
> >   at
> > org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:66)
> >   at
> > org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.PageRenderer.encodeEnd(PageRenderer.java:138)
> >   ..
> > --
> > I've 3 popup in the page; all off in page load time.
> > Please help
> >
> >
> >
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/TObago-tf4345120.html#a12382919
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: Tobago refresh

2007-08-29 Thread Volker Weber
Hi,

you can use partial rendering e.g.:


...

  

  



in this case only the box is updated on button click.

note: you may need to use absolute id in renderedPartially value, if
the button and the box are not inside the same namingContainer.


Regards,
Volker


2007/8/29, yazid <[EMAIL PROTECTED]>:
>
> I'm using tobago for a big application.
> All the tobago object are usefull; except the page refreshing. My
> application is structure like  as Tobago demo (menu, dobody...); when I
> click on any button or link in the page; the whole page is refreshed...
> Is there any  to avoid this.
> Regard;
> --
> View this message in context: 
> http://www.nabble.com/Tobago-refresh-tf4346459.html#a12382957
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: Tobago refresh

2007-08-29 Thread Volker Weber
What is the generated value of the onclick attribute of the link?

Can you turn on javascript debugging to see whats the problem at the
"error in page"?

Maybe try firefox to debug the javascript.



2007/8/29, yazid <[EMAIL PROTECTED]>:
>
> Hi Volker;
> I've inserted the attribute in a link ; and point the attribute to container
> box id; but I've an "error in page" when I click and nothing happens
> Cheers
>
>
> Volker Weber-5 wrote:
> >
> > Hi,
> >
> > you can use partial rendering e.g.:
> >
> > 
> > ...
> >
> >   
> > 
> >   
> >
> > 
> >
> > in this case only the box is updated on button click.
> >
> > note: you may need to use absolute id in renderedPartially value, if
> > the button and the box are not inside the same namingContainer.
> >
> >
> > Regards,
> > Volker
> >
> >
> > 2007/8/29, yazid <[EMAIL PROTECTED]>:
> >>
> >> I'm using tobago for a big application.
> >> All the tobago object are usefull; except the page refreshing. My
> >> application is structure like  as Tobago demo (menu, dobody...); when I
> >> click on any button or link in the page; the whole page is refreshed...
> >> Is there any  to avoid this.
> >> Regard;
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Tobago-refresh-tf4346459.html#a12382957
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/Tobago-refresh-tf4346459.html#a12384249
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: compareToValidator promotion

2007-08-30 Thread Volker Weber
Hi,

can we move this one and some others to the long discussed myfaces-jsf-commons
(or how it should be named) subproject?

If there is nothing tomahawk related in this validator i like to use
it without tomahawk.jar in the classpath.


Regards,
Volker

2007/8/30, Mike Kienenberger <[EMAIL PROTECTED]>:
> It's certainly stable enough at this point.
> However, I've never gotten around to localizing the messages or operator 
> names.
> There should probably be some unit tests as well.
> It's probably not enough to hold it back from being promoted, though.
>
> Perhaps you can start a vote on promotion on [EMAIL PROTECTED], and open a
> JIRA issue and submit some patches to move it into Tomahawk.
>
> On 8/30/07, Martin Denham <[EMAIL PROTECTED]> wrote:
> > I have used the compareToValidator in a couple of applications and have
> > found it to be very useful.  The only issue is that it is not in the main
> > tomahawk jar.
> >
> > Are there plans to move compareToValidator to the Tomahawk jar?
> >
> > Thanks
> >
> > Martin
> >
>


Re: [Tobago] EmptyStackException in datepicker

2007-09-04 Thread Volker Weber
Hi,

seems this is not only the datePicker, I just got a
EmptyStackException in a page without datePicker.

java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:79)
at java.util.Stack.pop(Stack.java:61)
at 
org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(TobagoResponseWriterImpl.java:232)
at 
org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent(TabGroupRenderer.java:80)
at 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView(TabGroupRenderer.java:342)
at 
org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeAjax(TabGroupRenderer.java:368)


I'm going to look at this.


Regards,
Volker

2007/9/3, Helmut Swaczinna <[EMAIL PROTECTED]>:
> Hi,
>
> in the current snapshot the datepicker is broken. You get an
> EmptyStackException when you click on
> the picker image. You can see this in the demo.
>
> Regards
> Helmut
>
>


Re: [Tobago] EmptyStackException in datepicker

2007-09-04 Thread Volker Weber
Hi Helmut,

there was a Problem in the ButtonRenderer introduced with the changes
for tabindex.

Please try next nightly or build you own from svn head.


Regards,
Volker

2007/9/4, Volker Weber <[EMAIL PROTECTED]>:
> Hi,
>
> seems this is not only the datePicker, I just got a
> EmptyStackException in a page without datePicker.
>
> java.util.EmptyStackException
> at java.util.Stack.peek(Stack.java:79)
> at java.util.Stack.pop(Stack.java:61)
> at 
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(TobagoResponseWriterImpl.java:232)
> at 
> org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent(TabGroupRenderer.java:80)
> at 
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView(TabGroupRenderer.java:342)
> at 
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeAjax(TabGroupRenderer.java:368)
>
>
> I'm going to look at this.
>
>
> Regards,
> Volker
>
> 2007/9/3, Helmut Swaczinna <[EMAIL PROTECTED]>:
> > Hi,
> >
> > in the current snapshot the datepicker is broken. You get an
> > EmptyStackException when you click on
> > the picker image. You can see this in the demo.
> >
> > Regards
> > Helmut
> >
> >
>


Re: [Tobago] EmptyStackException in datepicker

2007-09-04 Thread Volker Weber
Hi Helmut,

the problem with the popups in wrong order is a known issue:
https://issues.apache.org/jira/browse/TOBAGO-133 / -134

The other (nothing happen after first click) must be a other Problem.

Can you see if a request is made after the first click and what the response is?

You can set the debug level of
org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer
to trace to get the full response in the logs.


Regards,
Volker



2007/9/4, Helmut Swaczinna <[EMAIL PROTECTED]>:
> Hi Volker,
>
> thanks, the datepicker works now in general.
>
> But I have very strange effects with the datepicker in a special use case.
>
> I have a sheet with a link in one column which opens a popup. And this popup
> has a date field and a datepicker.
> The first time I click on the picker image on the popup after the page was
> loaded for the first time nothing
> happens. The datepicker doesn't open. When I close the popup and reopen it
> and then click on the
> picker image the datepicker opens but *behind* the popup, so it is not
> accessable (see attachted scrennshot).
> I have to close the popup first and then I can close the datepicker. When I
> open the popup for the third time and
> click on the picker image the datepicker opens normally and everything works
> fine. To summarize: I must open
> the popup three times after the page is initially loaded to make the
> datepicker working.
>
> Unfortunately I can't reproduce this behaviour in a small example.
>
> Here is an extract from my jsp page:
>
>columns="30px;80px;80px;70px;65px;165px;60px;100px"
> showHeader="true"
> showRowRange="none"
> showPageRange="none"
> showDirectLinks="none"
> first="0"
> rows="1000"
> selectable="multi"
> value="#{mainController.meineAufgaben}"
> var="aufgabe"
> binding="#{mainController.sheetMeineAufgaben}"
> state="#{mainController.sheetStateMeineAufgaben}">
> 
>   
> 
>   
> 
>   
>   
>value="#{aufgabenBundle.out_value_ablaufdatum}"/>
>   
>
>   
>required="true"
> value="#{mainController.ablaufdatum}"/>
>   
>
>   
>
>   
>label="#{mainBundle.button_label_ok}"
> action="#{mainController.ablaufAction}">
> 
>   
>label="#{mainBundle.button_label_cancel}">
> 
>   
> 
>   
> 
> ...
>label="#{aufgabenBundle.column_label_ablauf}"
>   tip="#{aufgabenBundle.column_tip_ablauf}"
>   sortable="true">
>action="#{mainController.ablaufPopupAction}">
>value="#{aufgabe.ablauf}"/>
> 
>  value=":mainPage:tabsView:meineAufgabenView:meineAufgabenSheet:ablaufdatumPopup"/>
>   
>     
> ...
>   
>
> Regards,
> Helmut
>
>
> - Original Message -
> From: "Volker Weber" <[EMAIL PROTECTED]>
> To: "MyFaces Discussion" 
> Sent: Tuesday, September 04, 2007 1:39 PM
> Subject: Re: [Tobago] EmptyStackException in datepicker
>
>
> > Hi Helmut,
> >
> > there was a Problem in the ButtonRenderer introduced with the changes
> > for tabindex.
> >
> > Please try next nightly or build you own from svn head.
> >
> >
> > Regards,
> >Volker
> >
> > 2007/9/4, Volker Weber <[EMAIL PROTECTED]>:
> >> Hi,
> >>
> >> seems this is not only the datePicker, I just got a
> >> EmptyStackException in a page without datePicker.
> >>
> >> java.util.EmptyStackException
> >> at java.util.Stack.peek(Stack.java:79)
> >> at java.util.Stack.pop(Stack.java:61)
> >> at
> >> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(TobagoResponseWriterImpl.java:232)
> >> at
> >> org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent(TabGroupRenderer.java:80)
> >> at
> >> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView(TabGroupRenderer.java:342)
> >> at
> >> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeAjax(TabGroupRenderer.java:368)
> >>
> >>
> >> I'm going to look at this.
> >>
> >>
> >> Regards,
> >> Volker
> >>
> >> 2007/9/3, Helmut Swaczinna <[EMAIL PROTECTED]>:
> >> > Hi,
> >> >
> >> > in the current snapshot the datepicker is broken. You get an
> >> > EmptyStackException when you click on
> >> > the picker image. You can see this in the demo.
> >> >
> >> > Regards
> >> > Helmut
> >> >
> >> >
> >>
> >
>
>


Re: [tobago] error not verbose enough

2007-09-05 Thread Volker Weber
Hi Zied,

the lines like
...TobagoResponseWriterImpl.endElement(235) - Element end with
name='html' doesn't match with ...

looks like related to a bug i fixed yesterday. Are there any lines like
...ButtonRenderer.encodeBegin(55) - Wrong type: Need
org.apache.myfaces.tobago.component.UIButtonCommand, but was  ...
?
if so please try latest nightly.


Regards,
Volker

2007/9/5, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Bernd,
>
> I've got good bad news :-). I'm experiencing the problem again but this time
> there are only 3 implied pages so I join them as you asked me to do...
>
> p.s: I've noticed some logs that complain invalid xml before the exception.
> This is probably a good hint that I mislooked yesterday.
>
> Here's the log
>
>
>
>  10:04:54,125 INFO  [STDOUT] 2007-09-05 10:04:54,125 [http-127.0.0.1-8080-3]
> INFO
> org.apache.myfaces.tobago.util.DebugPhaseListener.afterPhase(65)
> - Total response time : 63 milliseconds
>
>  10:05:17,500 ERROR [STDERR] 5 sept. 2007 10:05:17
> com.sun.facelets.tag.jsf.ComponentRule warnAttr
>
>  ATTENTION: /person/person.xhtml @22,71 image="image/new.GIF" Property
> 'image' is not on type:
> org.apache.myfaces.tobago.component.UICommand
>
>  10:05:17,500 ERROR [STDERR] 5 sept. 2007 10:05:17
> com.sun.facelets.tag.jsf.ComponentRule warnAttr
>
>  ATTENTION: /person/person.xhtml @25,52 image="image/stop.PNG" Property
> 'image' is not on type:
> org.apache.myfaces.tobago.component.UICommand
>
>  10:05:17,515 ERROR [STDERR] 5 sept. 2007 10:05:17
> com.sun.facelets.tag.jsf.ComponentRule warnAttr
>
>  ATTENTION: /person/personDetailTabs.xhtml @10,41
> xmlns:jsp="http://java.sun.com/JSP/Page"; Property '' is not on type:
> org.apache.myfaces.tobago.component.UITabGroup
>
>  10:05:17,656 INFO  [STDOUT] 2007-09-05 10:05:17,656 [http-127.0.0.1-8080-4]
> WARN
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.calculateLayoutHeight
> (104) - Unbalanced layout: rows.size()=5 != layoutTokens.length=2
> rowLayout='fixed;1*;'
> (clientId='page:personForm:details:j_id15')
>
>  10:05:17,656 INFO  [STDOUT] 2007-09-05 10:05:17,656 [http-127.0.0.1-8080-4]
> ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(235)
> - Element end with name='div' doesn't match with top element on the
> stack='html' ( GridLayoutRenderer.java:368 )
>
>  10:05:17,656 INFO  [STDOUT] 2007-09-05 10:05:17,656 [http-127.0.0.1-8080-4]
> ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(235)
> - Element end with name='td' doesn't match with top element on the
> stack='div' ( GridLayoutRenderer.java:369 )
>
>  10:05:17,656 INFO  [STDOUT] 2007-09-05 10:05:17,656 [http-127.0.0.1-8080-4]
> ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(235)
> - Element end with name='tr' doesn't match with top element on the
> stack='td' ( GridLayoutRenderer.java:373 )
>
>  10:05:17,656 INFO  [STDOUT] 2007-09-05 10:05:17,656 [http-127.0.0.1-8080-4]
> WARN
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.calculateLayoutHeight
> (138) - Unable to calculate Height for token '1*'! using 'fixed' ,
> component:page:personForm:details:personInfoSubview:firstName
> is Panel
>
>  10:05:17,687 INFO  [STDOUT] 2007-09-05 10:05:17,687 [http-127.0.0.1-8080-4]
> WARN
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.calculateLayoutHeight
> (138) - Unable to calculate Height for token '1*'! using 'fixed' ,
> component:page:personForm:details:personInfoSubview:lastName
> is Panel
>
>  10:05:17,687 INFO  [STDOUT] 2007-09-05 10:05:17,687 [http-127.0.0.1-8080-4]
> WARN
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.calculateLayoutHeight
> (138) - Unable to calculate Height for token '1*'! using 'fixed' ,
> component:page:personForm:details:personInfoSubview:firstName
> is Panel
>
>  10:05:17,687 INFO  [STDOUT] 2007-09-05 10:05:17,687 [http-127.0.0.1-8080-4]
> WARN
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.calculateLayoutHeight
> (138) - Unable to calculate Height for token '1*'! using 'fixed' ,
> component:page:personForm:details:personInfoSubview:lastName
> is Panel
>
>  10:05:17,687 INFO  [STDOUT] 2007-09-05 10:05:17,687 [http-127.0.0.1-8080-4]
> WARN  org.apache.myfaces.tobago.util.LayoutInfo.update(126)
> - There are columns left but no more space! cellsLeft=1,
> tokens=fixed;fixed;1*;
> clientId='page:personForm:details:personInfoSubview:j_id21'
>
>  10:05:17,687 INFO  [STDOUT] 2007-09-05 10:05:17,687 [http-127.0.0.1-8080-4]
> WARN  org.apache.myfaces.tobago.util.LayoutInfo.update(129)
> - calculated spaces = "20;20;-1"
> clientId='page:personForm:details:personInfoSubview:j_id21'
>
>  10:05:17,718 INFO  [STDOUT] 2007-09-05 10:05:17,718 [http-127.0.0.1-8080-4]
> ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(235)
> - Element end with name='html' doesn

Re: [tobago] assertion failure

2007-09-05 Thread Volker Weber
Hi Zied,

did you have the output of this statement in the log
  LOG.debug("actionId = '" + currentActionId + "'");
 just before the exception?

you  may need to set debug-level to debug for UIPage.

please post the actionId.


Regards,
Volker

2007/9/5, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi,
>
> I have an exception that I think shouldn't happen (am I doing sth wrong?,
> does anybody know how to avoid it?):
>
> Regards,
> Zied
>
>
> // TODO: remove this if block if prooven this never happens anymore
>
> if (command == null
>
> && currentActionId != null && currentActionId.matches(".*:\\d+:.*" )) {
>
> // If currentActionId component was inside a sheet the id contains the
>
> // rowindex and is therefore not found here.
>
> // We do not need the row here because we want just to find the
>
> // related form, so removing the rowindex will help here.
>
> currentActionId = currentActionId.replaceAll(":\\d+:", ":");
>
> try {
>
> command = findComponent(currentActionId);
>
> LOG.info("command = \"" + command + "\"", new Exception());
>
> } catch (Exception e) {
>
> // ignore
>
> }
>
> here's the trace
>
>
> 10:34:16,171 INFO  [STDOUT] 2007-09-05 10:34:16,171 [http-127.0.0.1-8080-4]
> INFO
> org.apache.myfaces.tobago.component.UIPage.markSubmittedForm(176)
> - command =
> "[EMAIL PROTECTED] "
>
> java.lang.Exception
>
>   at
> org.apache.myfaces.tobago.component.UIPage.markSubmittedForm
> (UIPage.java:176)
>
>   at
> org.apache.myfaces.tobago.component.UIPage.processDecodes
> (UIPage.java:138)
>
>   at
> javax.faces.component.UIComponentBase.processDecodes
> (UIComponentBase.java:1001)
>
>   at javax.faces.component.UIViewRoot.processDecodes
> (UIViewRoot.java:493)
>
>   at
> org.apache.myfaces.tobago.component.UIViewRoot.processDecodes
> (UIViewRoot.java:183)
>
>   at
> org.apache.myfaces.tobago.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java
> :78)
>
>at
> org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.executePhase(TobagoLifecycle.java
> :102)
>
>at
> org.apache.myfaces.tobago.lifecycle.TobagoLifecycle.execute(TobagoLifecycle.java
> :72)
>
>at
> javax.faces.webapp.FacesServlet.service(FacesServlet.java:244
> )
>
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
> :290)
>
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(
> ApplicationFilterChain.java:206)
>
>   at
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter
> (ExtensionsFilter.java:147)
>
>   at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
> (ApplicationFilterChain.java:235)
>
>   at
> org.apache.catalina.core.ApplicationFilterChain.doFilter
> (ApplicationFilterChain.java:206)
>
>   at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter
> (ReplyHeaderFilter.java:96)
>
>   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:230
> )
>
>at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java
> :175)
>
>at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java
> :179)
>
>at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84
> )
>
>at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128
> )
>
>at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104
> )
>
>at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java
> :157)
>
>at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
> )
>
>at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241
> )
>
>at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844
> )
>
>at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java
> :580)
>
>at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447
> )
>
>   at java.lang.Thread.run (Thread.java:619 )
>
> --
> Zied Hamdi
> zatreex.sourceforge.net


ajax and mod_compress

2007-09-06 Thread Volker Weber
Hi all,

we having problems with ajax requests when mod_compress is enabeld in
the apache.

Looks like XMLHttpRequest sends "Accept-Encoding: gzip,compress" but
did not decode
the compressed response.

The problem exists in IE and FF.

Is this a known problem? Maybe we did anything wrong in configuration.

This is a tobago app.

Currently we use a patched AjaxResponseRenderer to set a different
content-type, which is in
apache conf disabled for compressing.

But i would prefer a working compression also on ajax requests.

Any ideas?


Regards,
Volker


Re: [tobago] popup facelets : Found component is no ajaxComponent

2007-09-06 Thread Volker Weber
Hi Zied,

org.apache.myfaces.custom.ajax.api.AjaxDecodePhaseListener

this class should not involved in tobago requests. Did you mix
tomahawk with tobago?

Is this PhaseListener is registered by the tomahawk.jar or by your
faces-config.xml?


Regards,
Volker

2007/9/6, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Tobago,
>
> I was surprized by the difference there is between the jsp and facelets
> approch: even though I use the same tags, the result is sometimes totally
> different:
>
> I had a working popup in a jsp with the following code:
>
>
>
>
>   
>
> 
>
>< tc:toolBar id ="aressesToolBar" >
>
>  < tc:toolBarCommand id ="newAdressCmd" image=
> "image/new.GIF"
>
>   tip ="#{i18n.newAdressCmd}" action=
> "#{personCtrl.newAdressCmd}">
>
>   < tc:attribute name ="renderedPartially"
> value= "newAdressPopup" />
>
>   < f:facet name ="popup" >
>
> < tc:popup id
> ="newAdressPopup" width= "600" height ="140" >
>
>   < tc:box label
> ="#{i18n.newAdressCmd}" >
>
> < f:facet
> name ="layout" >
>
>   <
> tc:gridLayout rows ="*;20px" />
>
> 
>
>
>
> < f:subview
> id ="newAdress" >
>
>   <
> jsp:include flush ="true" page= "adress.xhtml" />
>
>  f:subview>
>
>
>
> < tc:cell>
>
>   <
> f:facet name ="layout" >
>
>
> < tc:gridLayout columns ="100px;1*;100px" marginLeft= "10px"
>
>
>   marginRight ="10px" />
>
>f:facet>
>
>   <
> tc:button label ="#{i18n.ok}"
>
>
> action= "#{personCtrl.addAdressCmd}">
>
>
> < tc:attribute name ="popupClose" value= "afterSubmit" />
>
>tc:button>
>
>   <
> tc:cell />
>
>   <
> tc:button label ="#{i18n.cancel}" >
>
>
> < tc:attribute name ="popupClose" value= "immediate" />
>
>tc:button>
>
> 
>
>
>
>   
>
> 
>
>   
>
>  
>
>
>
> 
>
>  ...
>
>  When I changed this same code under facelets, the popup stoped displaying
> and I have an error messagein my log:
> (I also attempted to change jsp:include to ui:include)
>
>
> 15:01:20,046 INFO [STDOUT] 2007-09-06 15:01:20,046 [http-127.0.0.1-8080-3]
> ERROR
> org.apache.myfaces.custom.ajax.api.AjaxDecodePhaseListener.decodeAjax(173)
> - Found component is no ajaxComponent : {Component-Path : [Class:
> org.apache.myfaces.tobago.component.UIViewRoot,ViewId:
> /person/person.xhtml][Class:
> org.apache.myfaces.tobago.component.UIPage,Id: page][Class:
> org.apache.myfaces.tobago.component.UIPanel,Id:
> j_id5][Class: org.apache.myfaces.tobago.component.UICell
> ,Id: j_id16][Class:
> org.apache.myfaces.tobago.component.UIForm,Id:
> personForm][Class:
> org.apache.myfaces.tobago.component.UIPanel,Id:
> j_id17][Class:
> org.apache.myfaces.tobago.component.UIPanel,Id:
> clientDetails][Class:
> javax.faces.component.UINamingContainer ,Id:
> details][Class:
> org.apache.myfaces.tobago.component.UITabGroup,Id:
> j_id26][Class:
> org.apache.myfaces.tobago.component.UITab,Id:
> personDetailTab][Class:
> org.apache.myfaces.tobago.component.UIPanel,Id:
> personDetailPanel][Class:
> org.apache.myfaces.tobago.component.UICell,Id:
> j_id44][Class: javax.faces.component.UINamingContainer,Id:
> adressListSubview][Class:
> org.apache.myfaces.tobago.component.UIBox,Id:
> j_id45][Class:
> org.apache.myfaces.tobago.component.UIToolBar ,Id:
> aressesToolBar][Class:
> org.apache.myfaces.tobago.component.UICommand,Id:
> newAdressCmd][Class:
> org.apache.myfaces.tobago.component.UIPopup,Id:
> newAdressPopup]}
>
> 15:01:20,078 INFO [STDOUT] 2007-09-06 15:01:20,078 [http-127.0.0.1-8080-3]
> DEBUG
> org.apache.myfaces.tobago.component.UIPage.markSubmittedForm(156)
> - actionId = 'page'
>
> I don't now where to debug: I entred to
> org.apache.myfaces.custom.ajax.api.AjaxDecodePhaseListener.decodeAjax(UIComponent,
> FacesContext) but I don't have a clue from where I should begin...
> I've also searched in the forum for the keys "[tobago] popup facelets" and
> "[tobago]  Found component is no ajaxComponent" with no result.
>
> If anyone knows how to pro

Re: [tobago] popup facelets : Found component is no ajaxComponent

2007-09-06 Thread Volker Weber
Hi,

the AjaxDecodePhaseListener is registered in the
tomahawk-sandbox-1.1.7-SNAPSHOT.jar.

So tobago is not compatible to this extension.

please remove the tomahawk-sandbox-1.1.7-SNAPSHOT.jar from your project for
now.

I have just created an jira entry:
http://issues.apache.org/jira/browse/TOBAGO-476


Regards,
   Volker



2007/9/6, Zied Hamdi <[EMAIL PROTECTED]>:
>
> Hi Volker,
>
> You're right, I have the intention to mix tobago with tomahawk (but I
> still don't do it in my pages now).
>
> I didn't register this listener in my faces-config, but I have the jar in
> my classpath.
>
> I'm joining my web.xml and faces-config.xml, I think they contain the
> minimum required by tobago.
>
> Maybe it's important to say I have the RI 1.2 in background...
>
> the list of the jars in my war is here:
>avalon-framework-4.1.3.jar  common-annotations.jar
> commons-beanutils.jar commons-beanutils-1.7.0.jar commons-codec-1.3.jar
> commons-collections.jar commons-collections-3.1.jar commons-digester.jar
> commons-digester-1.7.jar commons-el-1.0.jar commons-fileupload-1.1.1.jar
> commons-io-1.1.jar commons-lang-2.1.jar commons-logging-1.1.jar
> el-impl-1.0.jar jsf-facelets.jar jsf-tlds.jar jstl.jar jstl-1.1.0.jar
> log4j-1.2.14.jar logkit-1.0.1.jar maven-repository-importer-1.1.jar
> standard.jar tobago-core-1.0.12-SNAPSHOT.jar
> tobago-facelets-1.0.12-SNAPSHOT.jar  tobago-fileupload-1.0.12-SNAPSHOT.jar
> tobago-theme-charlotteville-1.0.12-SNAPSHOT.jar
> tobago-theme-richmond-1.0.12-SNAPSHOT.jar
> tobago-theme-scarborough-1.0.12-SNAPSHOT.jar
> tobago-theme-speyside-1.0.12-SNAPSHOT.jar
> tobago-theme-standard-1.0.12-SNAPSHOT.jar  tomahawk-1.1.7-SNAPSHOT.jar
> tomahawk-sandbox-1.1.7-SNAPSHOT.jar
>
> If I can give any other details, please let me know...
>
> Thanks,
> Zied
>
> 2007/9/6, Volker Weber <[EMAIL PROTECTED]>:
> >
> > Hi Zied,
> >
> > org.apache.myfaces.custom.ajax.api.AjaxDecodePhaseListener
> >
> > this class should not involved in tobago requests. Did you mix
> > tomahawk with tobago?
> >
> > Is this PhaseListener is registered by the tomahawk.jar or by your
> > faces-config.xml?
> >
> >
> > Regards,
> >Volker
> >
> > 2007/9/6, Zied Hamdi < [EMAIL PROTECTED]>:
> > > Hi Tobago,
> > >
> > > I was surprized by the difference there is between the jsp and
> > facelets
> > > approch: even though I use the same tags, the result is sometimes
> > totally
> > > different:
> > >
> > > I had a working popup in a jsp with the following code:
> > >
> > >
> > >
> > >
> > >   
> > >
> > > 
> > >
> > >< tc:toolBar id ="aressesToolBar" >
> > >
> > >  < tc:toolBarCommand id ="newAdressCmd" image=
> > > "image/new.GIF"
> > >
> > >   tip ="#{i18n.newAdressCmd}" action=
> > > "#{personCtrl.newAdressCmd}">
> > >
> > >   < tc:attribute name ="renderedPartially"
> >
> > > value= "newAdressPopup" />
> > >
> > >   < f:facet name ="popup" >
> > >
> > > < tc:popup id
> > > ="newAdressPopup" width= "600" height ="140" >
> > >
> > >   < tc:box label
> > > ="#{i18n.newAdressCmd}" >
> > >
> > > < f:facet
> > > name ="layout" >
> > >
> > >   <
> > > tc:gridLayout rows ="*;20px" />
> > >
> > > 
> > >
> > >
> > >
> > > < f:subview
> > > id ="newAdress" >
> > >
> > >   <
> > > jsp:include flush ="true" page= " adress.xhtml" />
> > >
> > >  > > f:subview>
> > >
> > >
> > >
> > >  

Re: [tobago] facelets tc:sheet seems to put java.util.Set into its var attribute

2007-09-11 Thread Volker Weber
Hi Zied,

tc:sheet is a extension of h:datatable and supports the same values.

AFAIK Set is not supported as Collection because there is no defined
order to work on.
But Set is supported as Object:
http://java.sun.com/javaee/javaserverfaces/1.2_MR1/docs/api/javax/faces/model/ScalarDataModel.html


Regards,
Volker

2007/9/11, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi,
>
> Sorry I was absent for a moment, today I'm back at work.
>
> So the problem is that  Why don't you just throw an IllegalArgumentException rather than passing the
> Set to the page scope under the varibale specified in var ?
>
> This is very confusing, it seems there's a problem with the page tags, and
> since there's no way to compile JSF syntax, it'd be better to give a runtime
> compilation...
>
> Is there a reason why Sets are not supported? is it because of the fact
> there's no id to maintain?
>
> Regards,
> Zied
>
> 2007/9/8, Zied Hamdi <[EMAIL PROTECTED]>:
> >
> > Hi again,
> >
> > I woke up remembering this problem happens when I don't surround my
> element by tc:column tags. So I decided to take a look so I don't feel
> stupid, and I found extra tc:column tags. After correcting the problem:
> >
> >
> > < tc:sheet id= "adressesSheet" var ="adress" showHeader=
> "false"
> >
> >   value ="#{personCtrl.adresses}" columns = "1*"
> >
> >   binding ="#{personCtrl.adressTable}" >
> >
> >   < tc:column>
> >
> > < tc:panel>
> >
> >  < f:facet name ="layout" >
> >
> >< tc:gridLayout
> columns ="10px;1*;10px" />
> >
> >  
> >
> >
> >
> >  < ui:include src ="/person/adress.xhtml" />
> >
> >
> >
> > 
> >
> >   
> >
> > 
> >
> >
> > Nothing has changed : I still have the problem with ui:include, and it
> still disappears when I use jsp:include instead...
> >
> > Anyway, the 'adress' variable should never be equal to
> #{personCtrl.adresses}, which is my case...
> >
> > Regards,
> > Zied
> >
> > 2007/9/7, Zied Hamdi <[EMAIL PROTECTED]>:
> >
> > >
> > > Hi,
> > >
> > > I hezitated for a while before sending this post, it seems impossible to
> me.
> > >
> > > Again under facelets (maybe it's due to the nightbuild of 05.09 but I
> don't think the junit didn't try this) I have a problem I didn't have with
> "plain" jsp:
> > >
> > > /person/adressListBox.xhtml
> > > ...
> > > < tc:sheet id= "adressesSheet" var ="adress1" showHeader=
> "false"
> > >
> > >   value ="#{personCtrl.adresses}" columns = "1*"
> > >
> > >   binding ="#{personCtrl.adressTable}" >
> > >
> > >   < tc:column>
> > >
> > > < tc:panel>
> > >
> > >  < f:facet name ="layout" >
> > >
> > >< tc:gridLayout
> columns ="10px;1*;10px" />
> > >
> > >  
> > >
> > >
> > >
> > >  < tc:column />
> > >
> > >
> > >
> > >  < f:subview id = "personAdressList" >
> > >
> > >< ui:include src =
> "/person/adress.xhtml" >
> > >
> > >  < c:set value
> = "#{adress1[0]}" var= "adress">
> > >
> > >
> > >
> > >  
> > >
> > >
> > >
> > >  < tc:column />
> > >
> > >
> > >
> > > 
> > >
> > >   
> > >
> > > 
> > > ...
> > >
> > > The error I receive here is :
> > >
> > >
> > > Caused by: javax.el.PropertyNotFoundException :
> /person/adress.xhtml @18,52 value="#{adress.specifier }":
> /person/adressListBox.xhtml @64,50 value="#{adress1[0]}": Property '0' not
> found on type org.hibernate.collection.PersistentSet
> > >
> > >   at
> com.sun.facelets.el.TagValueExpression.getValue(
> TagValueExpression.java:73 )
> > >
> > >   at
> javax.faces.component.UIOutput.getValue(UIOutput.java :173
> )
> > >
> > >   ... 99 more
> > >
> > >
> > > So it's really true: adress1 contains the value of
> #{personCtrl.adresses} instead of one of its elements: it should not be a
> Set but an Adress instance. (the exception is intentional to put in evidence
> the problem in one code snippet). Originally var ="adress1"  was var=
> "adress" . And there were no < c:set.
> > >
> > >
> > > The error in that case is equivalent when I attempt to use the variable
> adress in the included page:
> > >
> > >
> > > Caused by: javax.el.PropertyNotFoundException :
> /person/adress.xhtml @18,52 value="#{adress.specifier }": Property
> 'specifier' not found on type
> org.hibernate.collection.PersistentSet
> > >
> > >   at
> com.sun.facelets.el.TagValueExpression.getValue(
> TagValueExpression.java:73 )
> > >
> > >   at
> javax.faces.comp

Re: ajax and mod_compress

2007-09-11 Thread Volker Weber
Hi,

anyone who used successfully mod_deflate on ajax requests?


Regards,
Volker

2007/9/6, Volker Weber <[EMAIL PROTECTED]>:
> Hi all,
>
> we having problems with ajax requests when mod_compress is enabeld in
> the apache.
>
> Looks like XMLHttpRequest sends "Accept-Encoding: gzip,compress" but
> did not decode
> the compressed response.
>
> The problem exists in IE and FF.
>
> Is this a known problem? Maybe we did anything wrong in configuration.
>
> This is a tobago app.
>
> Currently we use a patched AjaxResponseRenderer to set a different
> content-type, which is in
> apache conf disabled for compressing.
>
> But i would prefer a working compression also on ajax requests.
>
> Any ideas?
>
>
> Regards,
> Volker
>


Re: include rendered JSF output in JSP page

2007-09-13 Thread Volker Weber
Hi Alexander,

not sure if this is possible in a phaseListerner, i think it sould be,
but you may look at this thread for a possilbel solution:

http://www.nabble.com/Change-visibility-dinamically-tf3299810.html#a9202172


Regards,
Volker

2007/9/13, Alexander Lendl <[EMAIL PROTECTED]>:
>
> Hi,
>
> I need to include the rendered html output from a myfaces jsf page in an old
> jsp page (not a jsf page!). Unfortunately it's not possible to use a jsf
> page at this point. It's a jsp/servlet framework application which is used
> during developement to test the output of portlets in tomcat - custom jsp
> tags include the rendered portlet output into a template jsp containing
> "grids" (divs).
>
> Now we want do change the portlet development to JSF (myfaces), but it's
> still required to use that test framework. For jsf portlets we will use the
> "MyFacesGeneralPortlet".
>
> My first attempt was to use a jsp include, but it didn't work.
>
>  results in a
> java.lang.IllegalStateException: Cannot forward after response has been
> commited
>
> What I need is an include  and not a forward. Is it possible to store the
> rendered jsf ouput  in a PhaseListener (RENDER_RESPONSE phase) in the http
> request and then include it with a jsp custom tag in the page?
> Is this the right approach? How do I get the rendered html output (as
> String?) from the FacesContext?
>
> Thanks in advance!
> Alex
> --
> View this message in context: 
> http://www.nabble.com/include-rendered-JSF-output-in-JSP-page-tf4434536.html#a12651358
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: include rendered JSF output in JSP page

2007-09-13 Thread Volker Weber
Hi,

to get the rendered html you can, as described in the thread, replace
the responsewriter
before rendering. Than you can get the writers content after
rendering. I think this should be possible also i  a PahseListener in
before and after renderResponse phase.

to prevent faces to do anything more with this request you can just
call facesContext.responseComplete().


Regards,
Volker



2007/9/13, Alexander Lendl <[EMAIL PROTECTED]>:
>
> Volker, thanks for your quick reply... I don't think that this thread can
> really help me with my problem.
>
> It's not necessary that the required functionality happens in a
> PhaseListener (could also be in a servlet, servlet filter, custom jsp tag,
> ...). All I need is to get the rendered html output of a jsf view and
> prevent faces from forwarding to the corresponding page (because the output
> should only be included in a template jsp).
>
>
>
> Volker Weber-5 wrote:
> >
> > Hi Alexander,
> >
> > not sure if this is possible in a phaseListerner, i think it sould be,
> > but you may look at this thread for a possilbel solution:
> >
> > http://www.nabble.com/Change-visibility-dinamically-tf3299810.html#a9202172
> >
> >
> > Regards,
> > Volker
> >
>
> --
> View this message in context: 
> http://www.nabble.com/include-rendered-JSF-output-in-JSP-page-tf4434536.html#a12653151
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: Download File

2007-09-13 Thread Volker Weber
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_fileDownloadActionListener.html


Regards,
Volker

2007/9/13, Wolfgang <[EMAIL PROTECTED]>:
> Which Trinidad component should that be??
> Can I also use the upload file component for downloading?
> > Trinidad has an actionlistener for that.
> > If you aren't using trinidad, you still can take a look at the code
> > and use its logic.
> >
> > -Matthias
> >
> > On 9/13/07, Wolfgang <[EMAIL PROTECTED]> wrote:
> >
> >> Hi,
> >>
> >> is there any kind of a jsf component with which I can download files?
> >> I need just a simple download-button on my webpage.
> >>
> >> Cheers!
> >>
> >>
> >
> >
> >
>
>


Re: include rendered JSF output in JSP page

2007-09-13 Thread Volker Weber
Hi,

in beforePhase:

// replace responseWriter
StringWriter content = new StringWriter();
ResponseWriter contentWriter = writer.cloneWithWriter(content);
facesContext.setResponseWriter(contentWriter);

and in afterPhase you can get the content out of the StringWriter.


Regards,
Volker


2007/9/13, Alexander Lendl <[EMAIL PROTECTED]>:
>
> Thanks again Volker... sorry for this stupid question, but can you please
> tell me, how to get the html content as string out of the ResponseWriter?
>
> facesContext.getResponseWriter() gives me an HtmlResponseWriterImpl with a
> JspWriterImpl which includes  the desired content in a char array, but I
> can't access the JspWriterImpl.
>
> TIA
>
>
> Volker Weber-5 wrote:
> >
> > Hi,
> >
> > to get the rendered html you can, as described in the thread, replace
> > the responsewriter
> > before rendering. Than you can get the writers content after
> > rendering. I think this should be possible also i  a PahseListener in
> > before and after renderResponse phase.
> >
> > to prevent faces to do anything more with this request you can just
> > call facesContext.responseComplete().
> >
> >
> > Regards,
> > Volker
> >
> >
> >
> > 2007/9/13, Alexander Lendl <[EMAIL PROTECTED]>:
> >>
> >> Volker, thanks for your quick reply... I don't think that this thread can
> >> really help me with my problem.
> >>
> >> It's not necessary that the required functionality happens in a
> >> PhaseListener (could also be in a servlet, servlet filter, custom jsp
> >> tag,
> >> ...). All I need is to get the rendered html output of a jsf view and
> >> prevent faces from forwarding to the corresponding page (because the
> >> output
> >> should only be included in a template jsp).
> >>
> >>
> >>
> >> Volker Weber-5 wrote:
> >> >
> >> > Hi Alexander,
> >> >
> >> > not sure if this is possible in a phaseListerner, i think it sould be,
> >> > but you may look at this thread for a possilbel solution:
> >> >
> >> >
> >> http://www.nabble.com/Change-visibility-dinamically-tf3299810.html#a9202172
> >> >
> >> >
> >> > Regards,
> >> > Volker
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/include-rendered-JSF-output-in-JSP-page-tf4434536.html#a12653151
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/include-rendered-JSF-output-in-JSP-page-tf4434536.html#a12655734
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: [TOBAGO] Custom Theme - StringIndexOutOfBoundsException

2007-09-14 Thread Volker Weber
Hi,

you do not need a jar, but than you must create a tobago-resource
directory in your webapps dir and configure this directory in the
tobago-config.xml.

eg.: create a directory "tobago-app" in your webapps directory and put
this line
   tobago-app
in your tobago-config.xml just after the theme-config section.

in this directory you can put the files starting with the html directory.


Regards,
Volker


2007/9/14, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Hello,
>
> i try to create my own custom theme. When i use the theme example project in
> my tobago application i get this error:
>
>
> main WARN  -
> org.apache.myfaces.tobago.context.ResourceLocator:141 -
> Unknown protocol
>  java.lang.StringIndexOutOfBoundsException: String index
> out of range: -6
>  at java.lang.String.substring(Unknown Source)
>  at
> org.apache.myfaces.tobago.context.ResourceLocator.addResources(ResourceLocator.java:163)
>
>
> I drop the theme example in my Source Directory, i use tomcat 6.0.14:
>
> src\org\apache\myfaces\tobago\renderkit\html\example...
> src\META-INF\tobago-theme.xml
>
> Can i use a custom theme in developing mode or its necessary to build a jar
> file?
> Thanks for helping me, kai.
>
>
> ---
>
> main INFO  -
> org.apache.myfaces.tobago.webapp.TobagoServletContextListener:40
> - *** contextInitialized ***
> main INFO  -
> org.apache.myfaces.tobago.config.TobagoConfig:154 - adding
> resourceDir = 'tobago-resource'
> main ERROR -
> org.apache.myfaces.tobago.context.ResourceLocator:79 -
> ResourcePath empty! Please check the tobago-config.xml file!
> path='/org/apache/myfaces/tobago/renderkit/html/caxton/standard/style/.svn/tmp/wcprops'
> main ERROR -
> org.apache.myfaces.tobago.context.ResourceLocator:79 -
> ResourcePath empty! Please check the tobago-config.xml file!
> path='/org/apache/myfaces/tobago/renderkit/html/caxton/standard/style/.svn/tmp/props'
> main ERROR -
> org.apache.myfaces.tobago.context.ResourceLocator:79 -
> ResourcePath empty! Please check the tobago-config.xml file!
> path='/org/apache/myfaces/tobago/renderkit/html/caxton/standard/style/.svn/tmp/text-base'
> main ERROR -
> org.apache.myfaces.tobago.context.ResourceLocator:79 -
> ResourcePath empty! Please check the tobago-config.xml file!
> path='/org/apache/myfaces/tobago/renderkit/html/caxton/standard/style/.svn/tmp/prop-base'
> main INFO  -
> org.apache.myfaces.tobago.context.ResourceLocator:123 -
> Loading tobago-theme.xml
> main INFO  -
> org.apache.myfaces.tobago.context.ThemeParser:77 - Found
> theme: 'example'
> main WARN  -
> org.apache.myfaces.tobago.context.ResourceLocator :141 -
> Unknown protocol
> 'file:/C:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/TobagoTest/WEB-INF/classes/META-INF/tobago-theme.xml'
> main INFO  -
> org.apache.myfaces.tobago.context.ResourceLocator :162 -
> themeUrl =
> 'file:/C:/Workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/TobagoTest/WEB-INF/classes/META-INF/tobago-theme.xml'
> main FATAL -
> org.apache.myfaces.tobago.webapp.TobagoServletContextListener
> :71 - Error while deploy process. Tobago can't be initialized! Application
> will not run!
>
> java.lang.StringIndexOutOfBoundsException: String index out
> of range: -6
> at java.lang.String.substring(Unknown Source)
> at
> org.apache.myfaces.tobago.context.ResourceLocator.addResources(ResourceLocator.java:163)
> at
> org.apache.myfaces.tobago.context.ResourceLocator.locateResourcesFromClasspath(ResourceLocator.java:142)
> at
> org.apache.myfaces.tobago.context.ResourceLocator.locate(ResourceLocator.java:63)
> at
> org.apache.myfaces.tobago.context.ResourceManagerFactory.init(ResourceManagerFactory.java:58)
> at
> org.apache.myfaces.tobago.webapp.TobagoServletContextListener.contextInitialized
> (TobagoServletContextListener.java:59)
> at
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)


Re: [tobago] layout of tc:selectManyCheckbox

2007-09-14 Thread Volker Weber
Hi Zied,

for this purpose you can use the attribute renderRange and the tag
tc:selectReference:



  < f:facet name ="layout" >
< tc:gridLayout columns ="*;*" />
  
  
< tc:selectItems ... />
  
  



you can also render every item in a own layout-cell if you need this.


Regards,
Volker
















2007/9/14, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi all,
>
> I'm encoutring a lyout problem, maybe this will sound like a feture request:
> I'm attemping to layout a list of checkboxes belonging to the same value.
> here's my code:
>
>
>
> 
>
>< f:facet name ="layout" >
>
>  < tc:gridLayout columns ="*;*" />
>
>
>
>< tc:selectItem itemLabel ="Lundi" />
>
>< tc:selectItem itemLabel ="Mardi" />
>
>< tc:selectItem itemLabel ="Mercredi" />
>
>< tc:selectItem itemLabel ="Jeudi" />
>
>< tc:selectItem itemLabel ="Vendredi" />
>
>< tc:selectItem itemLabel ="Samedi" />
>
>
>
> 
>
> The set of tc:selectItem will be replaced by one unique tc:selectItems. The
> problem is tha the facet doesn't have any effect on the layout...
>
> Regards,
> Zied
>
> --
> Zied Hamdi
> zatreex.sourceforge.net


Re: [tobago] layout of tc:selectManyCheckbox

2007-09-14 Thread Volker Weber
Sorry typo:

>   
should be
  


Regards,
Volker



2007/9/14, Volker Weber <[EMAIL PROTECTED]>:
> Hi Zied,
>
> for this purpose you can use the attribute renderRange and the tag
> tc:selectReference:
>
>
> 
>   < f:facet name ="layout" >
> < tc:gridLayout columns ="*;*" />
>   
>   
> < tc:selectItems ... />
>   
>   
> 
>
>
> you can also render every item in a own layout-cell if you need this.
>
>
> Regards,
> Volker
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> 2007/9/14, Zied Hamdi <[EMAIL PROTECTED]>:
> > Hi all,
> >
> > I'm encoutring a lyout problem, maybe this will sound like a feture request:
> > I'm attemping to layout a list of checkboxes belonging to the same value.
> > here's my code:
> >
> >
> >
> > 
> >
> >< f:facet name ="layout" >
> >
> >  < tc:gridLayout columns ="*;*" />
> >
> >
> >
> >< tc:selectItem itemLabel ="Lundi" />
> >
> >< tc:selectItem itemLabel ="Mardi" />
> >
> >< tc:selectItem itemLabel ="Mercredi" />
> >
> >< tc:selectItem itemLabel ="Jeudi" />
> >
> >< tc:selectItem itemLabel ="Vendredi" />
> >
> >< tc:selectItem itemLabel ="Samedi" />
> >
> >
> >
> > 
> >
> > The set of tc:selectItem will be replaced by one unique tc:selectItems. The
> > problem is tha the facet doesn't have any effect on the layout...
> >
> > Regards,
> > Zied
> >
> > --
> > Zied Hamdi
> > zatreex.sourceforge.net
>


Re: Custom UIViewRoot

2007-09-15 Thread Volker Weber
Hi,

Did you use RI or myfaces? RI 1.1 did not support replacing the
UIViewRoot component. Than you need to replace the ViewHandler like we
did in tobago.


Regards,
Volker




2007/9/15, Manfred K. <[EMAIL PROTECTED]>:
>
> Hi all,
>
> I implemented a custom UIViewRoot because I need to override the encodeBegin
> and encodeEnd methods. Unfortunately my methods never get called!?
>
> I declared my UIViewRoot class in faces-config as new component:
>
> 
>   javax.faces.ViewRoot
>   test.TestUIViewRoot
> 
>
> The class:
>
> public class TestUIViewRoot extends UIViewRoot {
> public TestUIViewRoot() {
> super();
> }
>
> public void encodeBegin(FacesContext context) throws IOException {
> //do some stuff
> super.encodeBegin(context);
> }
>
> public void encodeEnd(FacesContext context) throws IOException {
> //do some stuff
> super.encodeEnd(context);
> }
> ...
> }
>
> What I'm doing wrong?
>
> THANX!
> --
> View this message in context: 
> http://www.nabble.com/Custom-UIViewRoot-tf4447158.html#a12688634
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: SelectItem's constructor's "value" parameter and selectOneListBox

2007-09-17 Thread Volker Weber
Hi,

every Object exept String needs a converter from and to String.
Standard Converters (Number/Date) are included in the lib, but for
custom classes you must provide
a converter.


Regards,
Volker

2007/9/17, Evgeniy Karimov <[EMAIL PROTECTED]>:
> Hi, I have some problem:
> Say I have
>  
>   
>  
>
> Where myBackingBean.listBoxValue is of type MyObject.
>
> And myBackingBean.listBoxValuesList is ArrayList, which items are 
> constructed as:
>  new SelectItem(myObj, myObj.getDescription(), myObj.getDescription()), where 
> myObj is type of MyObject.
>
> Everything looks fine, but I get an exception with some message like: "Value 
> is no String ... does not have a Converter". Seems like 
> myBackingBean.listBoxValue must be of String type, but this isn't logical 
> because first argument of SelectItem constructor is of Object type, so it 
> _should_ be possible to use MyObject as a value of ListBox, isn't it?
>
>  Thanks in advance.
>


Re: Re[2]: SelectItem's constructor's "value" parameter and selectOneListBox

2007-09-17 Thread Volker Weber
Your object must converted into a representation which is a legal
value for a html option tag. e.g.:

label

and convertedValue must convertable back to your Object if selected
and send back to the server.


Regards,
Volker

2007/9/17, Evgeniy Karimov <[EMAIL PROTECTED]>:
> Thank you, but I don't really understand why I should use any converter at 
> all? Why I must convert my object to anything?
>
> -Original Message-
> From: David Delbecq <[EMAIL PROTECTED]>
> To: MyFaces Discussion 
> Date: Mon, 17 Sep 2007 18:27:04 +0200
> Subject: Re: SelectItem's constructor's "value" parameter and selectOneListBox
>
> >
> > You must either define an implicit converter "for-class" MyObject in
> > your jsf-config.xml, or use and explicit converter in your
> > h:selectOneListBox.
> >
> > In case of implicit convertion, type of #{myBackingBean.listBoxValue}
> > will be used to decide what converter to use.
> >
> > Regards,
> > David Delbecq
> >
> > Evgeniy Karimov a écrit :
> > > Hi, I have some problem:
> > > Say I have
> > >  
> > >   
> > >  
> > >
> > > Where myBackingBean.listBoxValue is of type MyObject.
> > >
> > > And myBackingBean.listBoxValuesList is ArrayList, which items 
> > > are constructed as:
> > >  new SelectItem(myObj, myObj.getDescription(), myObj.getDescription()), 
> > > where myObj is type of MyObject.
> > >
> > > Everything looks fine, but I get an exception with some message like: 
> > > "Value is no String ... does not have a Converter". Seems like 
> > > myBackingBean.listBoxValue must be of String type, but this isn't logical 
> > > because first argument of SelectItem constructor is of Object type, so it 
> > > _should_ be possible to use MyObject as a value of ListBox, isn't it?
> > >
> > >  Thanks in advance.
> > >
> >
>


Re: Input & ValueChangeListener

2007-09-18 Thread Volker Weber
Hi Mario,

the listener should invoked if you change the value AND submit the page.

If you want the page to be auto submitted on valueChange you  must add a
change facet to the input:

  

  



Regards,
Volker

2007/9/18, Schröder, Mario <[EMAIL PROTECTED]>:
>
>
>
>
> Hi,
>
>
>
> I'm having a problem with a valuechangelistener attached to an input field
> in Tobago.
>
> The method in the Bean is never been called. Strange enough, with Sun's JSF
> reference implementation and just one input field the listener works fine.
> But as soon as I add another input field nothing happens.
>
> What might be the problem?
>
>
>
> Any suggestions are appreciated.
>
>
>
>
>
> Here are snippets of my code:
>
>
>
> The Controller:
>
>
>
> …
>
>
>
> public class EventController{
>
>   private Log log;
>
>   private String someValue;
>
>
>
>   public EventController() {
>
> log = LogFactory.getLog(this.getClass());
>
>   }
>
>
>
>   public String getSomeValue() {
>
> return someValue;
>
>   }
>
>
>
>   public void setSomeValue(String someValue) {
>
> this.someValue = someValue;
>
>   }
>
>
>
>   public void processValueChange(ValueChangeEvent e)
>
>   throws AbortProcessingException {
>
> log.info(" Change Event: " +e);
>
>   }
>
> }
>
>
>
> The jsp:
>
> 
>
> 
>
>   
>
> 
>
>
>
> 
>
>  valueChangeListener="#{controller.processValueChange}"/>
>
>
>
>   
>
>
>
> Faces-config.xml:
>
>
>
> 
>
>   controller
>
>   EventController
>
>   session
>
> 
>
>
>
>


Re: tx:date Popup is too small

2007-09-20 Thread Volker Weber
Hi Zied,

is this the Richmond or a custom theme?

Looks like the font-size of the Month is to big which is not the case
in the online demo.

I you have a custom theme with a bigger font-size than default you
need to addjust the

Tobago.CalendarPopupWidth property in your custom
tobago-theme-config.property file.


Regards,
Volker

2007/9/20, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi,
>
> I have a bug that is maybe related to the one with multiple popups:
>
> My declaration :
>
>   
>  id ="workStartDate"
>
>  value ="#{intervention.workStart}"
>
>  label ="#{i18n.workStartDate}" >
>
>  < f:convertDateTime pattern ="dd.MM. HH:mm" />
>
>   
> opens a popup too small to hold all the fields.
>
> p.s: This was maybe fixed, my version of tobago is a nightly from the end of
> august.
>
> Regards,
> Zied
>


Re: FacesMessage in Tobago

2007-09-20 Thread Volker Weber
Hi Mario,

where are your resources stored? If in the tobago resource lookup path
you can use
the org.apache.myfaces.tobago.context.ResourceManagerUtil.getProperty(
  FacesContext facesContext, String bundle, String key)  method.

eg:
ResourceManagerUtil.getProperty(facesContext, "resource", "selectError")


Regards,
Volker


2007/9/20, Schröder, Mario <[EMAIL PROTECTED]>:
>
>
>
>
> Hi,
>
>
>
> how can I load a FacesMessage with the
> org.apache.myfaces.shared_impl.util.MessageUtils from a
> resource in Tobago. My code looks like this:
>
>
>
> FacesMessager error = MessageUtils.getMessage("resource", "selectError",
> null);
>
>
>
> But it throws a MissingResourceException. Do I have to give the path to the
> resource? Is there a Tobago-Class which deals with my problem: to load the
> correct resource?
>
>
>
> Regards,
>
> Mario


Re: tx:date Popup is too small

2007-09-20 Thread Volker Weber
Hi,

tc:time ?
http://myfaces.apache.org/tobago/tobago-core/tlddoc/tc/time.html


Regards,
Volker

2007/9/20, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker,
>
> You're right I didn't change the font, but in my browser I've set the text
> size as "Biggest". I didn't realize that :-). Do I have to declare it as a
> minor bug?
>
> While we're in the subject, isn't there a component to select a time?
> somethig like the lower part of the tx:date window when the pattern contains
> time. It's a frequent task to choose only time without a date. I didn't see
> a way to display this subwindow (even when I set the pattern to pattern
> ="HH:mm" ), is it because a java.util.Date object contains more data than
> what the window uses, if it's the case, I'd say it doesn't matter for me to
> use only a part of an object fields.
>
> Thanks,
> Zied
>
> 2007/9/20, Volker Weber <[EMAIL PROTECTED]>:
> > Hi Zied,
> >
> > is this the Richmond or a custom theme?
> >
> > Looks like the font-size of the Month is to big which is not the case
> > in the online demo.
> >
> > I you have a custom theme with a bigger font-size than default you
> > need to addjust the
> >
> > Tobago.CalendarPopupWidth property in your custom
> > tobago-theme-config.property file.
> >
> >
> > Regards,
> >Volker
> >
> > 2007/9/20, Zied Hamdi <[EMAIL PROTECTED]>:
> > > Hi,
> > >
> > > I have a bug that is maybe related to the one with multiple popups:
> > >
> > > My declaration :
> > >
> > >> >
> > >  id ="workStartDate"
> > >
> > >  value ="#{intervention.workStart}"
> > >
> > >  label ="#{ i18n.workStartDate}" >
> > >
> > >  < f:convertDateTime pattern ="dd.MM. HH:mm" />
> > >
> > >   
> > > opens a popup too small to hold all the fields.
> > >
> > > p.s: This was maybe fixed, my version of tobago is a nightly from the
> end of
> > > august.
> > >
> > > Regards,
> > > Zied
> > >
> >
>
>
>
> --
> Zied Hamdi
>  zatreex.sourceforge.net


Re: tx:date Popup is too small

2007-09-20 Thread Volker Weber
http://myfaces.apache.org/tobago/tobago-core/tlddoc/tx/time.html

2007/9/20, Zied Hamdi <[EMAIL PROTECTED]>:
> :-)) Ok I'm stupid!! I was searching for it in the tx...
>
> Thanks :-)
>
>
> 2007/9/20, Volker Weber <[EMAIL PROTECTED]>:
> > Hi,
> >
> > tc:time ?
> >
> http://myfaces.apache.org/tobago/tobago-core/tlddoc/tc/time.html
> >
> >
> > Regards,
> >Volker
> >
> > 2007/9/20, Zied Hamdi <[EMAIL PROTECTED]>:
> > > Hi Volker,
> > >
> > > You're right I didn't change the font, but in my browser I've set the
> text
> > > size as "Biggest". I didn't realize that :-). Do I have to declare it as
> a
> > > minor bug?
> > >
> > > While we're in the subject, isn't there a component to select a time?
> > > somethig like the lower part of the tx:date window when the pattern
> contains
> > > time. It's a frequent task to choose only time without a date. I didn't
> see
> > > a way to display this subwindow (even when I set the pattern to pattern
> > > ="HH:mm" ), is it because a java.util.Date object contains more data
> than
> > > what the window uses, if it's the case, I'd say it doesn't matter for me
> to
> > > use only a part of an object fields.
> > >
> > > Thanks,
> > > Zied
> > >
> > > 2007/9/20, Volker Weber <[EMAIL PROTECTED]>:
> > > > Hi Zied,
> > > >
> > > > is this the Richmond or a custom theme?
> > > >
> > > > Looks like the font-size of the Month is to big which is not the case
> > > > in the online demo.
> > > >
> > > > I you have a custom theme with a bigger font-size than default you
> > > > need to addjust the
> > > >
> > > > Tobago.CalendarPopupWidth property in your custom
> > > > tobago-theme-config.property file.
> > > >
> > > >
> > > > Regards,
> > > >Volker
> > > >
> > > > 2007/9/20, Zied Hamdi <[EMAIL PROTECTED] >:
> > > > > Hi,
> > > > >
> > > > > I have a bug that is maybe related to the one with multiple popups:
> > > > >
> > > > > My declaration :
> > > > >
> > > > >> > > >
> > > > >  id ="workStartDate"
> > > > >
> > > > >  value ="#{intervention.workStart}"
> > > > >
> > > > >  label ="#{ i18n.workStartDate}" >
> > > > >
> > > > >  < f:convertDateTime pattern ="dd.MM. HH:mm" />
> > > > >
> > > > >   
> > > > > opens a popup too small to hold all the fields.
> > > > >
> > > > > p.s: This was maybe fixed, my version of tobago is a nightly from
> the
> > > end of
> > > > > august.
> > > > >
> > > > > Regards,
> > > > > Zied
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Zied Hamdi
> > >  zatreex.sourceforge.net
> >
>
>
>
> --
>
> Zied Hamdi
>  zatreex.sourceforge.net


Re: How to write a link in a popup (which doesn't close the popup on click)

2007-09-24 Thread Volker Weber
Hi Zied,

a command without  should not close
the popup,
and if you add a  there should be no full request at all.

Using rendredPartially with popupId should completly rerender the
popup, so (i think, but never tested) it should be possible to resize
the popup if you have value-bindings for width and height.


Regards,
Volker

2007/9/24, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi all,
>
> I'd like to use links inside a popup to fill data in. But a link with no
> specified action reloads the page but closes the popup.
>
> To be honest, I'd like to do more with the popup: I need to increase its
> size when the link is clicked to display "choose elements": sheets and
> trees. Unfortunatly tc:popup doesn't have a binding attribute so control
> must be done on the page. Ideally an accordion could be the solution but I
> think theresn't any in tobago and compatible libs. Was the problem with
> layer's z index in popups fixed (so we can open more popups on each others)?
> this could be an alternative too.
>
> Regards,
> Zied
>
>
>


Re: [tobago] popup doesn't support tab groups?

2007-09-24 Thread Volker Weber
Hi Zied,

i just checked this out, and i found no problem when using
switchType=client or reloadTab
but reloadPage closes the popup.When reopen the popup  the selected
tab is shown.

Looks like the tabSwitch request is not recognized as inner popup action.

I added a jira issue: http://issues.apache.org/jira/browse/TOBAGO-498


Regards,
Volker


2007/9/24, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi,
>
> I have created a popup with a tabgroup as its root element, the problem is
> that we can't switch between tabs : clicks doesn't seem to be catched (but
> the mouse shows the correct 'hand' cursor).
>
> Regards,
> Zied
>


Re: [tobago] popup doesn't support tab groups?

2007-09-25 Thread Volker Weber
Hi Zied,

the tobago_selectTab is a javascript function which is defined in tab.js.

I think you run into the same problem as i two weeks ago, when
changing a old (non ajax) app to use ajax reload of a sheet.

You must add
   true
to your tobago-config.xml

the default is currently false but i'm going to switch default to true:
http://www.nabble.com/-tobago--config-option-ajax-enabled-tf4429742.html#a12636973


Regards,
Volker

2007/9/24, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker,
>
> The problem I have is different: in both ie7 and firefox2 I have javascript
> errors when I click on the tab.
>
> Under firefox the error is: "tobago_selectTab" is not defined (see figure).
> I didn't name any of my components this way... Maybe it is because I wrote
> my tab group directly inside the tc:popup without a layouting panel.
>
> Anyway, I prefer to upgrade to the latest nightly builds before telling you
> more, it's been a while I'm using old jars.
>
> Here's my code in the case the error is obvious for you...
>
>
> contract.xhtml
> ...
>
>
>   < tc:box
>
>  id ="taskTablePanel"
>
>  label ="#{i18n.planning}" >
>
>  < f:facet name ="toolBar" >
>
>   < tc:toolBar>
>
> < tc:toolBarCommand
>
>   image
> ="image/new.GIF"
>
>   action
> ="#{contractCtrl.newTaskCmd}"
>
>  tip= "|nouvelle
> tache">
>
>  < tc:attribute
>
> value
> ="taskEditPopup"
>
> name
> ="renderedPartially" />
>
>   < f:facet name
> ="popup" >
>
> < tc:popup
>
>   id
> ="taskEditPopup"
>
>
> height ="400px"
>
>   width
> ="500px" >
>
>   <
> tc:box label= "|Tache">
>
>
> < f:facet name ="layout" >
>
>
>   < tc:gridLayout rows ="*;fixed" />
>
>
> 
>
>
> < ui:include src ="/contract/workTask.xhtml" />
>
>
> < tc:cell>
>
>
>   < f:facet name ="layout" >
>
>
> < tc:gridLayout
>
>
>   columns= "100px;1*;100px"
>
>
>  marginLeft = "10px"
>
>
>   marginRight= "10px" />
>
>
>   
>
>
>   < tc:button
>
>
> label ="#{i18n.ok}"
>
>
> action= "#{contractCtrl.addTaskCmd}">
>
>
> < tc:attribute
>
>
>  name = "popupClose"
>
>
>   value= "afterSubmit" />
>
>
>   
>
>
>   < tc:cell />
>
>
>   < tc:button label ="#{i18n.cancel}" >
>
>
> < tc:attribute
>
>
>  name = "popupClose"
>
>
>  value = "immediate" />
>
>
>   
>
>
> 
>
>tc:box>
>
>  tc:popup>
>
>   
>
> 
>
>   
>
>  
>
>
>
>  < f:subview id ="taskTableSubview" >
>
>   < ui:include src ="/contract/taskTable.xhtml"
> />
>
>  
>
>   
>
> ...
>
> worktask.xhtml
>
>
> < tc:tabGroup
>
>   xmlns=" http://www.w3.org/1999/xhtml";
>
>   xmlns:f=" http://java.sun.com/jsf/core";
>
>   xmlns:h=" http://java.sun.com/jsf/html";
>
>   xmlns:tc="
> http://myfaces.apache.org/tobago/component";
>
>   xmlns:tx="
> http://myfaces.apache.org/tobago/extension";
>
>   xmlns:ui=" http://java.sun.com/jsf/facelets";
>
>   xmlns:t=" http://myfaces.apache.org/tomahawk";>
>
>   
>
>
>
> 
>
>< tc:gridLayout
>
>  columns ="*;*"
>
>  rows
> ="fixed;fixed;fixed;fixed;fixed;fixed" />
>
>  
>
>
>
>  < tx:date
>
>id ="workStartDate"
>
>value ="#{intervention.workStart}"
>
>label ="#{i18n.workStartDate}" >
>
>< f:convertDateTime pattern ="dd.MM." />
>
>  
>
>
>
>  < tc:cell>
>
>< f:facet name ="layout" >
>
>  < tc:gridLayout columns ="*;*" />
>
>
>
>< tc:time
>
>  id ="workStart"
>
>  value ="#{intervention.workStart}" />
>
>
>
>< tc:time
>
>  id ="workEnd"
>
>  value ="#{intervention.workEnd}" />
>
>  
>
>
>
>  < tx:date
>
>

Re: OT: Unsubscribe

2007-09-25 Thread Volker Weber
Hi,

this information is included in every mail on this list. take a look
into the mail headers:

List-Help: 
List-Unsubscribe: 
List-Post: 
List-Id: 


Regards,
Volker

2007/9/25, Michal Glowacki <[EMAIL PROTECTED]>:
> Hi guys
>
> Can't find anywhere address to unsubscribe from this list, can anybody
> help?
>
> Regards,
> Michal
>
>


Re: [jira] Commented: (MYFACES-1714) submitted (or local) values are not erasable after conversion or validation error

2007-09-25 Thread Volker Weber
Hi,

just to put my 2¢ here and to show the advantages of tobago ;-)

In tobago the ajax requests are full integrated into the lifecycle.
We did this by taking and extending a copy of the Lifecycle impl from myfaces.
All phases are execuded as on normal requests execpt the process*
methods are not invoked on UIViewRoot but on the relevant component in
case of ajax.

I think such a Lifecycle approach is mutch better than the
PhaseListener way where all further lifecycle phases are bypassed.

May be a candidate for a jsf-commons project?


Regards,
Volker



2007/9/25, Mario Ivankovits <[EMAIL PROTECTED]>:
> Hi!
> > I am just curious which ajax framework do you use/recommend?
> >
> It is not meant as a recommendation, I have no further experience with
> other ajax frameworks.
> I use the pprPanelGroup from tomahawk-sandbox.
> Compared to the other ajax frameworks the pprPanelGroup might be too
> limited, don't kow 
>
> Together with subForm where possible/required.
> Not sure if it helps you (3-4 days back - so it is brand-new), but I've
> added a preserveSubmittedValues="true|false" to the tomahawk subForm tag
> if a ppr outside of the subForm triggered the partial reload so that
> your model update will be reflected.
> On preserveSubmittedValues=false all submitted values of the embedded
> components will be nullified.
>
> Ciao,
> Mario
>
>


Re: General JSF Question regarding duplicate component ID

2007-09-26 Thread Volker Weber
Hi,

you MUST assign a unique id to all components created by your
application code, e.g.: all componets which are not created by the
framework via jsf tags.

And (according to my experience) you should not use createUniqueId()
of UIViewRoot.


Regards,
Volker


2007/9/25, CD <[EMAIL PROTECTED]>:
> Hi All,
>
> I seem to get a occasional incident in my application where I receive a 500
> error stating that a duplicate component id was found in the view.  Would
> anyone like to share a common pattern that is utilized to ensure that this
> does not occur?  Any other tips would be helpful as well.
>
> Thanks!
>
> CD


Re: JSF perf test with JMeter, possible?

2007-09-26 Thread Volker Weber
Hi Bryan,

yes it is possible, i'm currently doing this with a tobago app.

My app uses server-side state saving, i think this ViewState Extractor
from the wiki is
for client-side state saving, so i have two different extractors:

  
false
jsf_tree
:
>
>
>
>
> I would like to know if it's possible to do performance test using JMeter
> with the JSF, specifically, myfaces? Does anybody had already successfully
> implemented performance test for those two?
>
>
>
> I was thinking that I will not be able to execute jmeter concurrently
> because of the nature of the jsf, that it dynamically generates the form
> element id's, specially those of datatable elements.
>
>
>
> Could I possibly capture the dynamic IDs jsf generated on the fly, just like
> the what wiki mentioned for the ViewState?
>
>
>
> If Jmeter and jsf performance testing is not possible, is there any
> alternative solution for doing performance test with JSF?
> ViewState Extractor
>
> To simulate the ViewState parameter create a JMeter RegEx Extractor. The
> best approach is to apply the extractor to the Thread Group so it applies
> across the whole test script. Use the following parameters:
>
> Would appreciate any help.
>
>
>
> Regards,
>
> Bryan


Re: [tobago] JSTL problem

2007-09-26 Thread Volker Weber
Hi Zied,

i have no experience with facelets, but afaik jstl is a jsp taglib and
not facelets compatible.

i never tested tobago with 1.2 maybe bernd knows more.


Regards,
Volker

2007/9/26, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi again,
>
> Sorry for spamming, I forgot to say it's possible to do wihout JSTL playing
> with the rendered attribute or using tc:sheet or tc:forEach. The question
> is: is tobago still not compatible with JSTL under JSF 1.2?
>
> Regards,
> Zied
>
>
> 2007/9/26, Zied Hamdi <[EMAIL PROTECTED]>:
> >
> > Hi,
> >
> > I'm under JSF 1.2 (RI), Facelets 1.12 and a Tobago nightly 1.0.12 of
> yesterday, I'm trying to use JSTL 1.1 but even the simplest example fails:
> >
> >
> > < c:if test= "false" >
> >
> >   < tc:out value ="test" >
> >
> > 
> >
> > prints "test" anyway.
> >
> > Even more strange : when calling
> >
> >
> > < c:if test=' #{icf:instanceOf( "str", "java.lang.Long" )}' >
> >
> >   < tc:out value ="test2" >
> >
> > Where instanceOf is a function of mine, the function
> is executed but its result seems to be ignored anyway.
> >
> > The problem is not only with c:if. The tag c:forEach enters the loop only
> once (when items are numerous) and fills its var argument with null.
> >
> > Browsing the mailing list I've found a lot of posts talking about using
> JSTL and some seem to discourage using it with tobago, but some seem to use
> it without problems.
> >
> > I also have these error logs, that maybe related to the problem:
> >
> >
> > 5:33 :48,375 INFO   [STDOUT] 2007-09-26 15:33 :48,375
> [http-127.0.0.1-8080-3] ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(242)
> - Element end with name='div' doesn't match with top element on the
> stack='c:if' ( GridLayoutRenderer.java:381 )
> >
> > 15:33 :48,375 INFO   [STDOUT] 2007-09-26 15:33 :48,375
> [http-127.0.0.1-8080-3] ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(242)
> - Element end with name='td' doesn't match with top element on the
> stack='div' ( GridLayoutRenderer.java:382 )
> >
> > 15:33 :48,375 INFO   [STDOUT] 2007-09-26 15:33 :48,375
> [http-127.0.0.1-8080-3] ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(242)
> - Element end with name='tr' doesn't match with top element on the
> stack='td' ( GridLayoutRenderer.java:388 )
> >
> > 15:33 :48,375 INFO   [STDOUT] 2007-09-26 15:33 :48,375
> [http-127.0.0.1-8080-3] ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(242)
> - Element end with name='c:if' doesn't match with top element on the
> stack='div' ( EndElementInstruction.java:39 )
> >
> > 15:33 :48,390 INFO   [STDOUT] 2007-09-26 15:33 :48,390
> [http-127.0.0.1-8080-3] ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(242)
> - Element end with name='div' doesn't match with top element on the
> stack='td' ( GridLayoutRenderer.java:381 )
> >
> > 15:33 :48,390 INFO   [STDOUT] 2007-09-26 15:33 :48,390
> [http-127.0.0.1-8080-3] ERROR
> org.apache.myfaces.tobago.webapp.TobagoResponseWriterImpl.endElement(242)
> - Element end with name='td' doesn't match with top element on the
> stack='tr' ( GridLayoutRenderer.java:382 )
> >
> >
> >
> > Can you please confirm me if it's a bug or if I have to continue
> investigation?
> >
> >
> >
> > Regards,
> >
> > Zied
>
>
>
> --
> Zied Hamdi
> zatreex.sourceforge.net


Re: [core] display label from resource bundle in validation message

2007-09-28 Thread Volker Weber
Hi Thomas,

f:loadBundle stores the bundle in request-scope,
you can use the loadBundle from sandbox as replacement:
http://myfaces.apache.org/sandbox/apidocs/org/apache/myfaces/custom/loadbundle/LoadBundleTag.html


Regards,
Volker



2007/9/28, Thomas Fischer <[EMAIL PROTECTED]>:
>
> Hi all,
>
> We have an input field that looks like:
>
>  id="street"
> required="true"
> value="#{someController.street}"
> binding="#{someController.streetInput}"
> label="street" />
>
> If the "required" validation fails, the label is be replaced into
> placeholder {0} of the validation message "{0}: Validation Error: Value is
> required."
>
> Trying to internationalize the application, we now load the label from a
> resource bundle:
>
> 
>  id="street"
> required="true"
> value="#{someController.street}"
> binding="#{someController.streetInput}"
> label="#{labels['label.address.street']}" />
>
> Now, the label is not correctly replaced in the message; instead "null" is
> inserted into the placeholder. We have checked that the label is accessed
> correctly, the same expression in an outputText does find the message.
>
> I assume the following happens: The label replacement takes place in the
> processValidations phase (when the validation fails). In this phase. the
> message bundle is not yet registered (this happens in the
> renderResponsePhase when the jsp page with the loadBundle is executed).
>
> I have also found the following remark in the class
> org.apache.myfaces.taglib.core.LoadBundleTag, which points in the same
> direction:
>  * TODO:
>  * We should find a way to save loaded bundles in the state, because
> otherwise
>  * on the next request the bundle map will not be present before the render
> phase
>  * and value bindings that reference to the bundle will always log annoying
>  * "Variable 'xxx' could not be resolved" error messages.
>
> Does anybody have an idea how one could achieve this ?
>
> Regards
>
> Thomas
>
>
>


Re: [tobago] is there a way to say render partially two node ids?

2007-10-05 Thread Volker Weber
Hi Zied,

currently this is only possible via javascript.

but there is already a request to enable this:
http://issues.apache.org/jira/browse/TOBAGO-348


Regards,
Volker

2007/10/5, Zied Hamdi <[EMAIL PROTECTED]>:
> Hello,
>
> I have a case where in the whole page there are two parts that have as a
> common parent node only tc:page (the left navigation panel and a component
> in the content). A change in the content affects this little part of the
> page and the left left navigation panel.
> Am I obliged to refresh all the page or is there a way (even programmatic
> eg. in a phase linstener) to say refresh this and that ids?
>
> Regards,
> Zied
>


Re: [Tobago] NullPointerException in AjaxResponseRenderer

2007-10-07 Thread Volker Weber
Hi Helmut,

i have seen this Exception in my log before, but because i did not see
any misbehavior in my app i don't bother too much. Now i take the time
to have a look
and found the reason. This is fixed in svn now.


Regards,
Volker



2007/10/5, Helmut Swaczinna <[EMAIL PROTECTED]>:
> Hi,
>
> when I return an outcome != null in an ajax action method to navigate to an
> other page I get this NullPointerException:
>
> java.lang.NullPointerException
> at
> org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer.writeResponse(AjaxResponseRenderer.java:213)
> at
> org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer.writeResponseReload(AjaxResponseRenderer.java:159)
> at
> org.apache.myfaces.tobago.ajax.api.AjaxResponseRenderer.renderResponse(AjaxResponseRenderer.java:115)
> 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)
>
> Regards,
> Helmut
>
>


Re: [Tobago] javascript libraries

2007-10-08 Thread Volker Weber
Hi Mario,

i don't know jquery.

prototype.js 1.4.0 is currently bundled with tobago, this may be the
problem when adding 1.5.0 also. But don't relay on the bundle, we plan
to remove prototype.js in favor to dojo.


Regards,
Volker

2007/10/8, Schröder, Mario <[EMAIL PROTECTED]>:
>
>
>
>
> Hi,
>
>
>
> I would like to do some fieldchecking of input fields with the
> prototype-library. I'm using the Version 1.5.0. In my first step I just want
> to find all input fields. It works with a simple html-page. So I designed a
> page containing two input fields and a button with Tobago. But the Mozilla
> Firefox throws an error: Prototype.BrowserFeatures has no properties.
> Another favourite of mine is the jquery library. But it neither works with
> Tobago.
>
> Has anyone tried to use a library like prototype or jquery with Tobago?
>
>
>
> Regards!
>
>


Re: [Tobago] javascript libraries

2007-10-14 Thread Volker Weber
Hi Mario,

if you use the updated prototype you may need to patch the
Prototype.ScriptFragment value, i did this in the bundled version.

> In which release can I expect dojo?

Definitively after the 1.0.12 release, i hope this will going into the 1.0.13.
This is related to the TOBAGO-348 jira issue. I'm currently looking
how dojo can replace the currently used prototype ajax functionality.

> Is there a way, that I can tell the rendered to include all files in the 
> script folder, no matter if they are already provided by Tobago?

No, tobago loads only the needed files which are registered by tags or
the component renderers.


Regards,
Volker



2007/10/9, Schröder, Mario <[EMAIL PROTECTED]>:
> Another question regarding javascript-libraries:
>
> When I place the prototype library Version 1.5.0 in the 
> Tobago-resource-folder.../script/... it will be found, no matter if there is 
> another library in the standard-theme jar. But when I place my own js-file in 
> the same folder it can only be found when I place the javascript tag with the 
> path to the file in the page like this:
> 
>
> Is there a way, that I can tell the rendered to include all files in the 
> script folder, no matter if they are already provided by Tobago?
>
> Regards, Mario
>
>
> -Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Volker Weber
> Gesendet: Montag, 8. Oktober 2007 14:38
> An: MyFaces Discussion
> Betreff: Re: [Tobago] javascript libraries
>
> Hi Mario,
>
> i don't know jquery.
>
> prototype.js 1.4.0 is currently bundled with tobago, this may be the
> problem when adding 1.5.0 also. But don't relay on the bundle, we plan
> to remove prototype.js in favor to dojo.
>
>
> Regards,
> Volker
>
> 2007/10/8, Schröder, Mario <[EMAIL PROTECTED]>:
> >
> >
> >
> >
> > Hi,
> >
> >
> >
> > I would like to do some fieldchecking of input fields with the
> > prototype-library. I'm using the Version 1.5.0. In my first step I just want
> > to find all input fields. It works with a simple html-page. So I designed a
> > page containing two input fields and a button with Tobago. But the Mozilla
> > Firefox throws an error: Prototype.BrowserFeatures has no properties.
> > Another favourite of mine is the jquery library. But it neither works with
> > Tobago.
> >
> > Has anyone tried to use a library like prototype or jquery with Tobago?
> >
> >
> >
> > Regards!
> >
> >
>


Re: [Tobago] renderPartially inside a Popup:: no effect

2007-10-24 Thread Volker Weber
Hi Yazid,

the leading ":" is missing in the value of the renderedPartially.

Absolute clientIds must start with a colon, or you can use the
relative id if no namingContainers between the Box and the command.
  


Regards,
Volker

2007/10/24, yazid <[EMAIL PROTECTED]>:
>
> Hi All;
> I'm using Tobago 1.0.11.
> I've a selectOnechoice Object inside a popup box.
>
>
> 
>   
> 
>name="renderedPartially" />
>
>   
>  
>
>
> searchBox is the Id of the bow inside the popup.
>
> 
> 
>
> ..
>
> When I click on the select object the action "modeChanged" is not invoked;
> if I remove the "renderPartially" attribute ; the select the action is
> invoked but the whole page is refreshed.
> PLease Help;
>
> --
> View this message in context: 
> http://www.nabble.com/-Tobago--renderPartially-inside-a-Popup%3A%3A-no-effect-tf4683214.html#a13382197
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: [Tobago] renderPartially inside a Popup:: no effect

2007-10-24 Thread Volker Weber
Hi,

is the checkbox located inside the reloaded Box?

Only the values inside the reloaded Component are processed by the server.


Regards,
Volker

2007/10/24, yazid <[EMAIL PROTECTED]>:
>
> Hi Volker;
> Thanks the refresh is applied exactly to the portion I need.
> But the value of bean.use is not submitted to the server. If I click on the
> selectBox, the method "modeChanged"  (immediate=false) is executed befor
> sending the changing the value of bean.use (to true)
> Is that any other parameter to set
>
> Volker Weber-5 wrote:
> >
> > Hi Yazid,
> >
> > the leading ":" is missing in the value of the renderedPartially.
> >
> > Absolute clientIds must start with a colon, or you can use the
> > relative id if no namingContainers between the Box and the command.
> >   
> >
> >
> > Regards,
> > Volker
> >
> > 2007/10/24, yazid <[EMAIL PROTECTED]>:
> >>
> >> Hi All;
> >> I'm using Tobago 1.0.11.
> >> I've a selectOnechoice Object inside a popup box.
> >>
> >>
> >> 
> >>   
> >> 
> >>>> name="renderedPartially" />
> >>
> >>   
> >>  
> >>
> >>
> >> searchBox is the Id of the bow inside the popup.
> >>
> >> 
> >> 
> >>
> >> ..
> >>
> >> When I click on the select object the action "modeChanged" is not
> >> invoked;
> >> if I remove the "renderPartially" attribute ; the select the action is
> >> invoked but the whole page is refreshed.
> >> PLease Help;
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/-Tobago--renderPartially-inside-a-Popup%3A%3A-no-effect-tf4683214.html#a13382197
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/-Tobago--renderPartially-inside-a-Popup%3A%3A-no-effect-tf4683214.html#a13384506
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>


Re: [Tobago] Weird problem with tc:link inside tc:sheet

2007-11-02 Thread Volker Weber
Hi Ramon,

i can't see any functional problem in your code fragment, just some
layouting issues.

Can you add the DebugPhaseListener [1] to see if the applicationPhase
is reached?

to the layouting:

you don't need the tc:cell if only one component is included.

if you want layout inside a sheet cell you should have a panel around
the content.
the layout facet of column did not do anything.
so your fragment should look like:

  
   
 
   
   
 
   
   
 



Regards,
Volker

[1]: http://wiki.apache.org/myfaces/Tobago_DebugPhaseListener

2007/11/2, Ramon Ziai <[EMAIL PROTECTED]>:
> Hi,
>
> I have a strange problem with links inside tc:sheet rows. I am new to
> Tobago and JSF in general, so please bear with me if this is an obvious
> problem. Consider the following fragment:
>
>  showHeader="false">
>
> ...
>
> 
>   
> 
>   
>   
>  actionListener="#{browseController.linkClicked}">
>   
> 
>   
>   
> 
>   
> 
>
> ...
>
> 
>
>
> Now if such a link is clicked, the page is just reloaded and empty,
> since the request-scoped data is gone. No attempt to even construct the
> controller is made, let alone call the actionListener method. If I place
> the link outside the sheet, things work as expected.
>
> The Tobago version is 1.0.12, MyFaces is 1.2 and I'm developing with
> Tomcat6 under Linux i386, if that's necessary info at all.
>
> I've found issues in the list archives that sound similar but were in
> fact mostly concerned with getting the selection index in the sheet, a
> point I cannot reach yet.
>
> Any hints would be most welcome.
>
> Best,
> Ramon
>
>


Re: Get Session Attributes Names

2007-11-05 Thread Volker Weber
Hi Daniel,

you can get the session from the externalContext:

HttpSession session = facesContext.getExternalContext().getSession();
Enumeration enumeration = session.getAttributeNames();

or you can also get the keys (attributeNames) from the Map:


Map sessionMap = facesContext.getExternalContext().getSessionMap();
Iterator attributeNames = sessionMap.keySet().iterator();


Regards,
Volker




2007/11/5, daniel ccss <[EMAIL PROTECTED]>:
> Hi all,
>
> In Struts I get the list of session attributes names like this:
>
>  HttpSession session = request.getSession();
>  Enumeration enumeration = session.getAttributeNames();
>
> How I can get the the session attributes names in JSF??? Actually I get the
> session like this:
>
> Map session =
> FacesContext.getCurrentInstance().getExternalContext().getSessionMap();
>
> And I can get the values of the attributes like this
>Collection collection = session.values ();
>
> But this give me the values of the attributes in session, not the attributes
> name, I need the attributes names because i need to delete or not some
> attributes depending of the name
>
> thanks
>
>
>


Re: Bug?

2007-11-22 Thread Volker Weber
Hi Daniel,

have you seen this links?

http://www.mail-archive.com/users%40myfaces.apache.org/msg21412.html

http://wiki.apache.org/myfaces/FAQ#Date


Regards,
Volker


2007/11/22, SEIDLER DANIEL <[EMAIL PROTECTED]>:
> HI,
>
> im using this tag this way:
> 
>  
> 
>
> So my date.start is in Database saved as September 2007, but outputText show
> me August 2007. If I convert days also, it will decrease my days by 1 and
> not the month.
>
> Im using MyFaces 1.1.5 with Tomahawk 1.1.5 and Facelets 1.1.11
>
>
> Thx. i. A.
>
> Daniel


Re: Getting all currently loaded managed beans in a phase listener

2007-11-29 Thread Volker Weber
Hi,

the properties of managed beans are set in the order they occur in the
faces-config.xml. This is in the spec, so you can use the last
property setter as
initMethod.


Regards,
Volker



2007/11/29, Todd Nine <[EMAIL PROTECTED]>:
> Hi all,
>   I'm using a combination of Spring and MyFaces for my project.  Since I use
> the managed bean properties to inject my Spring beans into my managed beans,
> I'm unable to do initialization in the constructor, and I really need to
> implement a callback in my managed beans to initialize values from the
> Spring business objects.  I have created something similar to the example on
> the following site.
>
> http://cagataycivici.wordpress.com/2006/06/06/managed_beans_aware_of_the/
>
> However, I'm dealing with a legacy application, and I can't depend on a
> standard naming convention as the example does, there is far too much code
> to refactor everything.  Is there any way I can get all currently loaded
> beans in the current thread instead of using something like the following to
> explicitly return it?
>
> event.getFacesContext().getApplication().createValueBinding(beanName).getValue(ctx);
>
> Thanks,
> Todd
>


Re: Tobago date/time tags in popups

2007-12-07 Thread Volker Weber
Hi Piotr,

tx:date should be no problem in popups.

tx:date is just a tx:in with attached calendar popup, so if tx:in
works tx:date did also.

I don't understand what you mean to date/time tags in menu, you can't
have tc:in in menu.
but you should be able to open a popup with a tc:calendar from a menuItem.


Regards,
Volker

2007/12/6, Malakis <[EMAIL PROTECTED]>:
> Hi.
>
> I wanted to ask how can I use Tobago tags tc:date and time in popups. In demo 
> is an example which presents tx:date in popup and value is remembered 
> properly in popup. But it isn't assigned to any JavaBean so it can not be 
> used in other parts of application.
>
> I tested saving tx:date values from popup in beans, but value was never 
> assigned to bean. Of course text and check box was assigned properly, exactly 
> as in demo.
>
> So mine question is: is there any possibility to get tc/tx date/time values 
> from popup?
>
> And second: I want to use date/time tags in menu, is there any other from 
> popup manner to do this?
>
> Cheers
> Piotr Baraniak
>


Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

2007-12-13 Thread Volker Weber
Hi Zied,

the form element with id="page::form" is rendered by the PageRenderer.
You have no tc:page in your source, so i can't see why this could happen.

What happens if you remove the  tags and replace the
h:form tag with a tc:page, and the div with a tc:panel?


Regards,
Volker

2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Again,
>
> Examining the generated code further I have found this problem:
>
> the call is made from cells like this one: "width: 100%;" onmouseover="return makeTrue(domTT_activate(this, event,
> 'caption', 'Menage', 'content', 'Alice du four', 'trail',
> true));"
> > > >18:49: Menage
>
> whereas my form's name is
>  "/IntoServicesWeb/contract/contract.jsf" id="page::form"
> method=
> "post" accept-charset="utf-8"
> >
> That's why the call document.forms[formId] with formId='page' returns null.
> Now that I know this, what do I have to do with it?
> Any ideas?
>
>
>
>
> 2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> >
> > Hi All,
> >
> > I have entred this problem earlier when I was in time evalution phasis.
> Today I'm concretely in dev mode and I don't have any solution (I was
> thinking ti was because of the context : tobago layouting etc.., so I
> simplified to the basis): here's my page it's the same one as in the
> tomahawk examples 1:
> >
> >
> > < html>
> >
> > < body>
> >
> > < f:view
> >
> >   xmlns= " http://www.w3.org/1999/xhtml";
> >
> >   xmlns:t= " http://myfaces.apache.org/tomahawk";
> >
> >   xmlns:tc= "
> http://myfaces.apache.org/tobago/component";
> >
> >   xmlns:tx= "
> http://myfaces.apache.org/tobago/extension";
> >
> >   xmlns:h= " http://java.sun.com/jsf/html";
> >
> >   xmlns:f= " http://java.sun.com/jsf/core";>
> >
> >   < h:form >
> >
> > 
> >
> > < div style ="position: absolute; left: 220px; top: 5px;
> right: 5px;" > >
> >   value
> ="#{contractCtrl.scheduleModel.model}"
> >
> >   id ="schedule1"
> >
> >   rendered ="true"
> >
> >   visibleEndHour ="18"
> >
> >   visibleStartHour ="8"
> >
> >   workingEndHour ="17"
> >
> >   workingStartHour ="9"
> >
> >   readonly ="false"
> >
> >   theme ="evolution"
> >
> >   tooltip ="true" />
> >
> >   
> >
> > 
> >
> > 
> >
> > 
> >
> >
> > It doesn't use anything more than facelets. What I receive is
> > Erreur : document.forms[formId] has no properties
> > Fichier source :
> http://localhost:8080/IntoServicesWeb/faces/myFacesExtensionResource/org.apache.myfaces.renderkit.html.util.MyFacesResourceLoader/11975349/schedule.HtmlSchedule/javascript/schedule.js
> > Ligne : 33
> >
> > I have the tomahawk example app
> myfaces-example-simple-1.1.7-SNAPSHOT.war  running on the
> same server without problems, so I think the only difference is the
> WEB-INF/lib directory: here's my app contents:
> > 02/10/2006  20:0363ÿ966 avalon-framework-4.1.3.jar
> > 03/09/2007  17:0548ÿ742 common-annotations.jar
> > 20/09/2006  17:30   188ÿ671 commons-beanutils-1.7.0.jar
> > 04/09/2007  14:21   188ÿ671 commons-beanutils.jar
> > 15/11/2006  10:1646ÿ725 commons-codec-1.3.jar
> > 20/09/2006  17:30   559ÿ366 commons-collections-3.1.jar
> > 04/09/2007  14:21   559ÿ366 commons-collections.jar
> > 20/09/2006  17:30   139ÿ966 commons-digester-1.7.jar
> > 04/09/2007  14:21   139ÿ966 commons-digester.jar
> > 31/12/2006  17:01   112ÿ341 commons-el-1.0.jar
> > 25/01/2007  18:3631ÿ909 commons-fileupload-1.1.1.jar
> > 20/09/2006  17:3561ÿ562 commons-io-1.1.jar
> > 20/09/2006  17:30   207ÿ723 commons-lang-2.1.jar
> > 20/09/2006  18:3552ÿ915 commons-logging-1.1.jar
> > 16/06/2007  23:1072ÿ009 el-impl-1.0.jar
> > 13/12/2007  09:49 0 info.txt
> > 18/12/2006  22:05   298ÿ368 jsf-facelets.jar
> > 03/09/2007  17:0530ÿ483 jsf-tlds.jar
> > 13/03/2007  17:03   367ÿ444 log4j-1.2.14.jar
> > 02/10/2006  20:0372ÿ150 logkit-1.0.1.jar
> > 16/06/2007  23:10 6ÿ882
> maven-repository-importer-1.1.jar
> > 19/10/2007  06:30   577ÿ125 tobago-core-1.0.12.jar
> > 07/10/2007  01:2562ÿ217
> tobago-facelets-1.0.12-SNAPSHOT.jar
> > 07/10/2007  01:2510ÿ728
> tobago-fileupload-1.0.12-SNAPSHOT.jar
> > 19/10/2007  06:5912ÿ540
> tobago-theme-charlotteville-1.0.12.jar
> > 19/10/2007  06:5635ÿ458
> tobago-theme-richmond-1.0.12.jar
> > 19/10/2007  06:45   254ÿ130
> tobago-theme-scarborough-1.0.12.jar
> > 19/10/2007  06:5160ÿ566
> tobago-theme-speyside-1.0.12.jar
> > 19/10/2007  06:3984ÿ940
> tobago-theme-standard-1.0.12.jar
> > 06/11/2007  13:44 2ÿ962ÿ674 tomahawk-1.1.7-SNAPSHOT.jar
> > 02/10/2007  14:23 9ÿ376 tomahawk-facelets-1.1.6.jar
> >

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

2007-12-13 Thread Volker Weber
Hi,

i think the t:schedule could not be used inside tobago.

it looks like the schedule component looks for the first parent UIForm
and takes this id as the id for a html form tag to submit. This can't
work in tobago, because there is only one html form tag surrounding
all content.
And nesting form tags is not allowed in html.

We can't fix this in tobago, to make the schedule work in tobago there
must added a workarround in the schedule's javascript to find the root
form tag.


Regards,
Volker




2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker,
>
> Thank you for your fast reply. I'm sorry the preceding mail was against
> another source code (as in my app).
>
> But what I noticed is that, because tc:page creates a form alone, the form
> id is always "pageId::form"
>
> The tomahawk schedule seams to search for a form with the same name as
> pageId when no explicit form is specified:
>
>
>
> < tc:page
>
>   xmlns=" http://www.w3.org/1999/xhtml";
>
>   xmlns:t=" http://myfaces.apache.org/tomahawk";
>
>   xmlns:tc="
> http://myfaces.apache.org/tobago/component";
>
>   xmlns:tx="
> http://myfaces.apache.org/tobago/extension";
>
>   xmlns:h=" http://java.sun.com/jsf/html";
>
>   xmlns:f=" http://java.sun.com/jsf/core";
>
>   id= "root">
>
>
>
>< div style ="position: absolute; left: 220px; top: 5px; right: 5px;"
> >
>  value ="#{contractCtrl.scheduleModel.model}"
>
>  id ="schedule1"
>
>  rendered ="true"
>
>  visibleEndHour ="18"
>
>  visibleStartHour ="8"
>
>  workingEndHour ="17"
>
>  workingStartHour ="9"
>
>  readonly ="false"
>
>  theme ="evolution"
>
>  tooltip= "true" />
>
> 
>
>
>
> Outputs this snippet:
>
>
>
>   
>  name ="root::form"
>
>  action ="/IntoServicesWeb/test/schedule.jsf"
>
>  id ="root::form"
>
>  method ="post"
>
>  accept-charset ="utf-8" >
>  type ="hidden"
>
>  name ="root::form-action"
>
>  id ="root::form-action"
>
>  value ="" >
>
>< div style ="position: absolute; left: 220px; top: 5px; right: 5px;"
> >
>  type ="hidden"
>
>  name ="root:schedule1" >
>  type ="hidden"
>
>  name ="root:schedule1_last_clicked_date"
> >
>  type= "hidden"
>
> name="root:schedule1_last_clicked_y" >
>
>   
> class="schedule-compact-evolution"
>
> style="border-style: none; overflow: hidden;" >
>
>   
>  class ="month"
>
>  style ="position: relative; left: 0px; top: 0px; width: 100%;"
>
>  cellpadding ="0"
>
>  cellspacing ="1"
>
>  border ="0"
>
>  width ="100%" >
>
>  < tbody>
>
>< tr>
>
>  < td
>
>   rowspan ="2"
>
>   class ="inactive-day workday"
>
>   style ="height: 121px; width: 16.66%;" >
>
>  < table
>
>   class ="day"
>
>   style ="height: 121px; width: 100%;"
>
>   cellpadding ="0"
>
>   cellspacing ="0" >
>
>   < tr>
>
> < td
>
>   class ="header"
>
>   style ="height:
> 18px; width: 100%; overflow: hidden"
>
>   id
> ="root:schedule1_header_20071126" >26 nov. 2007 
>
>   
>
>   < tr>
>
> < td
>
>   class ="content"
>
>   style ="height:
> 103px; width: 100%;" >
>
> < div
>
>   class
> ="contentview"
>
>   style ="width:
> 100%; height: 100%; overflow: auto; vertical-align: top;" >
>
> < div
>
>   style ="width:
> 100%; height: 100%; vertical-align: top;"
>
>   id
> ="root:schedule1_body_20071126" >
>
> < table style ="width:
> 100%;" >
>
>   < tr>
>
> < td
>
>   style
> ="width: 100%;"
>
>
> onmouseover ="return makeTrue(domTT_activate(this, event, 'caption',
> 'Menage', 'content', 'Alice du four (Pour Hedia)',
> 'trail', true));" >< a
>
>   h

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

2007-12-13 Thread Volker Weber
Hi,

try replace this function with

function fireEntrySelected(formId, scheduleId, entryId) {
var form = document.forms[formId];
if (form.tagName != "FORM") {
form = document.forms[formId + "::form"];
}
form[scheduleId].value = entryId;
form.submit();
return true;
}

this MAY work.


Regards,
Volker


2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker,
>
> I don't know if you have tested my page, in case not, this is the definition
> of the js method that fails on entry selection:
>
> function fireEntrySelected(formId, scheduleId, entryId) {
>  document.forms[formId][scheduleId].value = entryId;
>  document.forms[formId].submit();
>  return true;
> }
> Regrads,
>
>
> 2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> >
> >
> > Hi Volker,
> >
> > Thank you for your fast reply. I'm sorry the preceding mail was against
> another source code (as in my app).
> >
> > But what I noticed is that, because tc:page creates a form alone, the form
> id is always "pageId::form"
> >
> > The tomahawk schedule seams to search for a form with the same name as
> pageId when no explicit form is specified:
> >
> >
> >
> > < tc:page
> >
> >   xmlns= " http://www.w3.org/1999/xhtml";
> >
> >   xmlns:t= " http://myfaces.apache.org/tomahawk";
> >
> >   xmlns:tc= "
> http://myfaces.apache.org/tobago/component";
> >
> >   xmlns:tx= "
> http://myfaces.apache.org/tobago/extension";
> >
> >   xmlns:h= " http://java.sun.com/jsf/html";
> >
> >   xmlns:f= " http://java.sun.com/jsf/core";
> >
> >   id = "root">
> >
> >   
> >
> >   < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;" > >
> > value ="#{contractCtrl.scheduleModel.model}"
> >
> > id ="schedule1"
> >
> > rendered ="true"
> >
> > visibleEndHour ="18"
> >
> > visibleStartHour ="8"
> >
> > workingEndHour ="17"
> >
> > workingStartHour ="9"
> >
> > readonly ="false"
> >
> > theme ="evolution"
> >
> > tooltip = "true" />
> >
> > 
> >
> >
> >
> > Outputs this snippet:
> >
> >
> >
> >   < form
> >
> > name ="root::form"
> >
> > action ="/IntoServicesWeb/test/schedule.jsf"
> >
> > id ="root::form"
> >
> > method ="post"
> >
> > accept-charset ="utf-8" >< input
> >
> > type ="hidden"
> >
> > name ="root::form-action"
> >
> > id ="root::form-action"
> >
> > value ="" >
> >
> >   < div style ="position: absolute; left: 220px; top: 5px; right:
> 5px;" > >
> > type ="hidden"
> >
> > name ="root:schedule1" >< input
> >
> > type ="hidden"
> >
> > name ="root:schedule1_last_clicked_date" ><
> input
> >
> > type = "hidden"
> >
> > name= "root:schedule1_last_clicked_y" >
> >
> >>
> > class= "schedule-compact-evolution"
> >
> > style= "border-style: none; overflow: hidden;" >
> >
> >   < table
> >
> > class ="month"
> >
> > style ="position: relative; left: 0px; top: 0px; width: 100%;"
> >
> > cellpadding ="0"
> >
> > cellspacing ="1"
> >
> > border ="0"
> >
> > width ="100%" >
> >
> > < tbody>
> >
> >   < tr>
> >
> > < td
> >
> >  rowspan ="2"
> >
> >  class ="inactive-day workday"
> >
> >  style ="height: 121px; width: 16.66%;" >
> >
> > < table
> >
> >  class ="day"
> >
> >  style ="height: 121px; width: 100%;"
> >
> >  cellpadding ="0"
> >
> >  cellspacing ="0" >
> >
> >  < tr>
> >
> >< td
> >
> >  class ="header"
> >
> >  style ="height:
> 18px; width: 100%; overflow: hidden"
> >
> >  id
> ="root:schedule1_header_20071126" > 26 nov. 2007 
> >
> >  
> >
> >  < tr>
> >
> >< td
> >
> >  class ="content"
> >
> >  style ="height:
> 103px; width: 100%;" >
> >
> >< div
> >
> >  class
> ="contentview"
> >
> >  style ="width:
> 100%; height: 100%; overflow: auto; vertical-align: top;" >
> >
> >< div
> >
> >  style ="width:
> 100%; height: 100%; vertical-align: top;"

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

2007-12-13 Thread Volker Weber
Hi Simon,

case 1 is true:

The UIPage implements UIForm and renders the complete html
...

and



where ${pageId} is the clientId of the UIPage.



Regards,
Volker


2007/12/13, Simon Kitching <[EMAIL PROTECTED]>:
> I don't see why t:schedule is not usable in tobago.
>
> Yes, it looks for a parent UIForm. With tobago, is there one in the component 
> tree or not? I would certainly presume so..
>
> The schedule code does look for an ancestor form, but what is wrong with 
> that? There should always be exactly one..
>
> The only problem that I can see is that when the scheduler renderer finds a 
> UIForm, then emits its clientId into the javascript it outputs the right 
> value. In a tobago environment, it is emitting the value "root" (which is the 
> id property of the tobago component) rather than "root::form".
>
> Where does "root::form" come from?
>
> I don't know much about Tobago, but would guess that either:
> (1) the tc:page component implements UIForm, or
> (2) the tc:page automatically creates a child UIForm
>
> In the case of (1), perhaps the component should implement NamingContainer, 
> and override getClientId to return "root::form" or somesuch.
>
> In the case of (2), tc:page should implement NamingContainer, and set the id 
> of the child UIForm component to "form". Then its getClientId would return 
> "root:form".
>
> There is also the possibility that the t:schedule renderer is a little buggy, 
> and is outputting into the javascript the raw componentid of the UIForm it 
> finds, rather than its clientId. But if so, that is reasonably easily fixed.
>
> Regards,
>
> Simon
>
>  Zied Hamdi <[EMAIL PROTECTED]> schrieb:
> > That's exactly what I didn't want to hear :-). Thanks for the patch, I'll
> > give it a try and tell you if it works.
> >
> > Regards,
> > Zied
> >
> >
> >
> > 2007/12/13, Volker Weber <[EMAIL PROTECTED]>:
> > >
> > > Hi,
> > >
> > > i think the t:schedule could not be used inside tobago.
> > >
> > > it looks like the schedule component looks for the first parent UIForm
> > > and takes this id as the id for a html form tag to submit. This can't
> > > work in tobago, because there is only one html form tag surrounding
> > > all content.
> > > And nesting form tags is not allowed in html.
> > >
> > > We can't fix this in tobago, to make the schedule work in tobago there
> > > must added a workarround in the schedule's javascript to find the root
> > > form tag.
> > >
> > >
> > > Regards,
> > >Volker
> > >
> > >
> > >
> > >
> > > 2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> > > > Hi Volker,
> > > >
> > > > Thank you for your fast reply. I'm sorry the preceding mail was against
> > > > another source code (as in my app).
> > > >
> > > > But what I noticed is that, because tc:page creates a form alone, the
> > > form
> > > > id is always "pageId::form"
> > > >
> > > > The tomahawk schedule seams to search for a form with the same name as
> > > > pageId when no explicit form is specified:
> > > >
> > > >
> > > >
> > > > < tc:page
> > > >
> > > >   xmlns=" http://www.w3.org/1999/xhtml";
> > > >
> > > >   xmlns:t=" http://myfaces.apache.org/tomahawk";
> > > >
> > > >   xmlns:tc="
> > > > http://myfaces.apache.org/tobago/component";
> > > >
> > > >   xmlns:tx="
> > > > http://myfaces.apache.org/tobago/extension";
> > > >
> > > >   xmlns:h=" http://java.sun.com/jsf/html";
> > > >
> > > >   xmlns:f=" http://java.sun.com/jsf/core";
> > > >
> > > >   id= "root">
> > > >
> > > >
> > > >
> > > >< div style ="position: absolute; left: 220px; top: 5px; right:
> > > 5px;"
> > > > > > > >
> > > >  value ="#{contractCtrl.scheduleModel.model}"
> > > >
> > > >  id ="schedule1"
> > > >
> > > >  rendered ="true"
> > > >
> > > >  visi

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

2007-12-13 Thread Volker Weber
Hi Zied,

set org.apache.myfaces.tobago.util.DebugPhaseListener to trace to log
request parameters.
of cause you need also to configure this listener.


Regards,
Volker

2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker and Simon,
>
> replacing the method by
> function fireEntrySelected(formId, scheduleId, entryId) {
>var form = document.forms[formId];
>if (form == null || form.tagName != "FORM") {
>form = document.forms[formId + "::form"];
>}
>form[scheduleId].value = entryId;
>form.submit();
>return true;
> }
>
> seems to work fine (I don't have js erros any more, but I still don't have
> the element selected: maybe a misuse or sth) even though it can't be in the
> official build, it fulfills my needs to integrate it to a tobago app.
>
> By the way Volker, I want to verify the good selection value has been set. I
> remember I saw in the mailing list that activating the TRACE mode on a comp
> will show submitted request parameters values. I tried :
>
>
> log4j.logger.org.apache.myfaces.tobago.component.UIPage=TRACE
>
> log4j.logger.org.apache.myfaces.el.VariableResolverImpl=TRACEbut
> none shows the values. Can please remind me which one it is
>
>
> Simon,
>
> Thanks for your intervention. For me, the schedule was the component that
> had (the responsibility) to find in which form it is embedded in the tree
> structure(that's why I included [tomahawk] in the subject), do you think
> tobago renderers a form tag without having the UIForm in the structure(2)?
> or (1) tc:page is at the same time a representative of f:view and f:form
> (implements both interfaces)?
>
> I don't have any experience on developing JSF taglibs so sorry if what I say
> is nonsens.
>
>
>
> 2007/12/13, Simon Kitching <[EMAIL PROTECTED]>:
> > I don't see why t:schedule is not usable in tobago.
> >
> > Yes, it looks for a parent UIForm. With tobago, is there one in the
> component tree or not? I would certainly presume so..
> >
> > The schedule code does look for an ancestor form, but what is wrong with
> that? There should always be exactly one..
> >
> > The only problem that I can see is that when the scheduler renderer finds
> a UIForm, then emits its clientId into the javascript it outputs the right
> value. In a tobago environment, it is emitting the value "root" (which is
> the id property of the tobago component) rather than "root::form".
> >
> > Where does "root::form" come from?
> >
> > I don't know much about Tobago, but would guess that either:
> > (1) the tc:page component implements UIForm, or
> > (2) the tc:page automatically creates a child UIForm
> >
> > In the case of (1), perhaps the component should implement
> NamingContainer, and override getClientId to return "root::form" or
> somesuch.
> >
> > In the case of (2), tc:page should implement NamingContainer, and set the
> id of the child UIForm component to "form". Then its getClientId would
> return "root:form".
> >
> > There is also the possibility that the t:schedule renderer is a little
> buggy, and is outputting into the javascript the raw componentid of the
> UIForm it finds, rather than its clientId. But if so, that is reasonably
> easily fixed.
> >
> > Regards,
> >
> > Simon
> >
> >  Zied Hamdi <[EMAIL PROTECTED]> schrieb:
> > > That's exactly what I didn't want to hear :-). Thanks for the patch,
> I'll
> > > give it a try and tell you if it works.
> > >
> > > Regards,
> > > Zied
> > >
> > >
> > >
> > > 2007/12/13, Volker Weber <[EMAIL PROTECTED]>:
> > > >
> > > > Hi,
> > > >
> > > > i think the t:schedule could not be used inside tobago.
> > > >
> > > > it looks like the schedule component looks for the first parent UIForm
> > > > and takes this id as the id for a html form tag to submit. This can't
> > > > work in tobago, because there is only one html form tag surrounding
> > > > all content.
> > > > And nesting form tags is not allowed in html.
> > > >
> > > > We can't fix this in tobago, to make the schedule work in tobago there
> > > > must added a workarround in the schedule's javascript to find the root
> > > > form tag.
> > > >
> > > >
> > > > Regards,
> > > >Volker
> > > >
> &g

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

2007-12-14 Thread Volker Weber
Hi Zied,

try this:

function fireEntrySelected(formId, scheduleId, entryId) {
   var form = document.forms[formId];
   if (form.tagName != "FORM") {
   form = document.forms[formId + "::form"];
   form[scheduleId].value = entryId;
   Tobago.submitAction(scheduleId);
   return true;
   }
   form[scheduleId].value = entryId;
   form.submit();
   return true;
}


Regards,
Volker



2007/12/14, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker,
>
> Can you please tell me if I'm right, I hve only a restricted view of the API
> and I can't predict side effects as you'll surely do:
>
> I think the parameter expected by tobago (as the UIPage command) is as
> follows e.g: "page::form-action" = "page:intervenant"
>
> The problem is that a component with the id "page:intervenant" must exist in
> the tree and must be of type UIComponent (not necessairily a UICommand). By
> reading only the code of UIPage, all what is needed is the form holding the
> component with the given id.
>
> So do you think it's a good solution to fill onMouseUp (entry selection) the
> value : "page::form-action" = "scheduleId" ?
>
> this is my snippet:
>
>
> function fireEntrySelected(formId, scheduleId, entryId) {
>
>var form = document.forms[formId];
>
>// tobago handling
>
>if (form == null || form.tagName != "FORM ") {
>
>  form = document.forms[formId + "::form"];
>
>  tobagoActionComp = document.forms[formId + "::form-action"];
>
>  if( tobagoActionComp != null ) {
>
>tobagoActionComp.value = scheduleId;
>
>  } else {
>
>alert( "Unable to set '"+ formId + "::form-action'" );
>
>
>  }
>
>}
>
>form[scheduleId].value = entryId;
>
>form.submit();
>
>return true;
>
> }
>
> The problem is that tobagoActionComp is always null, sorry I'm bad in js. I
> verified that it is in the source
>
>
>   
>  name ="page::form"
>
>  action
> ="/IntoServicesWeb/contract/contract.jsf"
>
>  id ="page::form"
>
>  method ="post"
>
>  accept-charset ="utf-8" >
>
>  < input
>
>  type ="hidden"
>
>  name ="page::form-action"
>
>  id ="page::form-action"
>
>  value= "">
>
>
>
>  Is there sth wrong?
>
>
>
> Regards,
>
> Zied
>
> 2007/12/14, Zied Hamdi <[EMAIL PROTECTED]>:
> >
> > Hi again Volker,
> >
> > I wrote this in another thread, but for people who will search in this
> thread continuation I copy paste what I wrote:
> >
> > There seams to be a tobago problem :
> >
> org.apache.myfaces.tobago.component.UIPage.markSubmittedForm(FacesContext
> facesContext)  calls facesContext.renderResponse() if no "tobago" action is
> set (line 200). I think the schedule action attribute sends its own request
> param that is not interepreted by tobago as an action. This needs further
> looking, but this is my first impression.
> >
> > This happens directly in the Apply request values phase:
> >
> >
> > FacesContextImpl.renderResponse() line: 400
> >
> > UIPage.markSubmittedForm(FacesContext) line: 200
> >
> > UIPage.processDecodes(FacesContext) line: 138
> >
> > UIViewRoot(UIComponentBase).processDecodes(FacesContext)
> line: 1001
> >
> > UIViewRoot(UIViewRoot).processDecodes(FacesContext) line:
> 493
> >
> > Any idea on a workaround? (do I have to declare a hidden input with the
> expected action name?, maybe I should modify UIPage to extend its behaviour
> to schedule also) what do you think Volker?
> >
> >
> >
> > 2007/12/13, Zied Hamdi <[EMAIL PROTECTED]>:
> > >
> > > Thanks Volker,
> > >
> > > You saved me a lot of frustrations. I really appreciate your help.
> > >
> > >
> > > Regards,
> > > Zied
> > >
> > >
> > > 2007/12/13, Volker Weber <[EMAIL PROTECTED]>:
> > > > Hi Zied,
> > > >
> > > > set org.apache.myfaces.tobago.util.DebugPhaseListener
> to trace to log
> > > > request parameters.
> > > > of cause you need also to configure this listener.
> 

Re: [Tomahawk] [tobago] Schedule throws a js exception on entry selection

2007-12-17 Thread Volker Weber
Hi,

to ajax-reload a panel instead of submit the entire page replace the
submitAction(...) with

Tobago.reloadComponent(, scheduleId);

where  is the clientId of an ajax-enabled ancestor tobago
component (e.g. tc:box or tc:panel) of the schedule component.


Regards,
Volker

2007/12/16, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi Volker,
>
> Thanks for your patch, it gives ideas about making the submit ajax-enabled
> (this was a need I abandoned). What is the function to call to say "refresh
> only from this id node"?
>
> From that point, I think I have to make a decorator to t:schedule and add
> the rendered attribute (so that all this tobago js is encapsulaetd in a
> tobago adapter).
>
> p.s: does the Tobago.submitAction(scheduleId) really submit http (in async
> mode) or is it just a naming collision (it only prepares values for submit)?
>
> Regards,
> Zied
>
> 2007/12/14, Volker Weber <[EMAIL PROTECTED]>:
> > Hi Zied,
> >
> > try this:
> >
> > function fireEntrySelected(formId, scheduleId, entryId) {
> >   var form = document.forms[formId];
> >   if (form.tagName != "FORM") {
> >   form = document.forms[formId + "::form"];
> >   form[scheduleId].value = entryId;
> >   Tobago.submitAction(scheduleId);
> >   return true;
> >   }
> >   form[scheduleId].value = entryId;
> >   form.submit();
> >   return true;
> > }
> >
> >
> > Regards,
> >Volker
> >
> >
> >
> > 2007/12/14, Zied Hamdi < [EMAIL PROTECTED]>:
> > > Hi Volker,
> > >
> > > Can you please tell me if I'm right, I hve only a restricted view of the
> API
> > > and I can't predict side effects as you'll surely do:
> > >
> > > I think the parameter expected by tobago (as the UIPage command) is as
> > > follows e.g: "page::form-action" = "page:intervenant"
> > >
> > > The problem is that a component with the id "page:intervenant" must
> exist in
> > > the tree and must be of type UIComponent (not necessairily a UICommand).
> By
> > > reading only the code of UIPage, all what is needed is the form holding
> the
> > > component with the given id.
> > >
> > > So do you think it's a good solution to fill onMouseUp (entry selection)
> the
> > > value : "page::form-action" = "scheduleId" ?
> > >
> > > this is my snippet:
> > >
> > >
> > > function fireEntrySelected(formId, scheduleId, entryId) {
> > >
> > >var form = document.forms[formId];
> > >
> > >// tobago handling
> > >
> > >if (form == null || form.tagName != "FORM ") {
> > >
> > >  form = document.forms[formId + "::form"];
> > >
> > >  tobagoActionComp = document.forms[formId +
> "::form-action"];
> > >
> > >  if( tobagoActionComp != null ) {
> > >
> > >tobagoActionComp.value = scheduleId;
> > >
> > >  } else {
> > >
> > >alert( "Unable to set '"+ formId + "::form-action'"
> );
> > >
> > >
> > >  }
> > >
> > >}
> > >
> > >form[scheduleId].value = entryId;
> > >
> > >form.submit();
> > >
> > >return true;
> > >
> > > }
> > >
> > > The problem is that tobagoActionComp is always null, sorry I'm bad in
> js. I
> > > verified that it is in the source
> > >
> > >
> > >> >
> > >  name ="page::form"
> > >
> > >  action
> > > ="/IntoServicesWeb/contract/contract.jsf"
> > >
> > >  id ="page::form"
> > >
> > >  method ="post"
> > >
> > >  accept-charset ="utf-8" >
> > >
> > >  < input
> > >
> > >  type ="hidden"
> > >
> > >  name ="page::form-action"
> > >
> > >  id ="page::form-action"
> > >
> > >  value= "">
> > >
> > >
> > >
> > >  Is there sth wrong?
> >

Re: [tobago] Layouting problem

2007-12-19 Thread Volker Weber
Hi Zied,

i didn't know the ui:include (i know its facelets but thats all :-))
can you try to replace the
ui:include with the content of /contract/taskTable.xhtml to see what
happens then?

If the ui:include creates a UIComponent there may be a problem in tobago.

can you post the  /contract/taskTable.xhtml (you may remove the sheets
inner content, which is nor relevant here).


Regards,
Volker



2007/12/19, Zied Hamdi <[EMAIL PROTECTED]>:
> Hi island people :-)
>
> I have some trouble understanding how layouting works: (you can see the
> trouble in images (attached)).
>
> All the scrollbars you see result from the following simple snippet : (the
> orange background can even be removed: I tried to remove the outer scroll by
> enforcing the box to be smaller)
>
>
>   < tc:tabGroup>
>
>
>
>  < tc:tab label ="#{i18n.planning}" >
>
>   < f:facet name ="layout" >
>
> < tc:gridLayout rows
> ="160px" />
>
>   
>
>
>
>   < tc:box id ="taskTablePanel" >
>
> < f:facet name
> ="toolBar" >
>
>   < tc:toolBar>
>
> <
> tc:toolBarCommand
>
>   image
> ="image/new.GIF"
>
>
> action ="#{contractCtrl.newTaskCmd}"
>
>  tip=
> "|nouvelle tache">
>
> tc:toolBarCommand>
>
>   
>
> 
>
> < f:facet name
> ="layout" >
>
>   < tc:gridLayout
> rows ="130px" />
>
> 
>
>
>
> < ui:include src
> ="/contract/taskTable.xhtml" />
>
>
>
>   
>
> 
>
> In my include I have directly a tc:sheet. I've also attempted to use
> pagingLength="3" to have the table max size smaller, the table continues to
> show more than 3 rows at a time.
> Can you please send me to a doc where i can have a better understanding of
> how sizes are computed?
>
>
> Regards,
> Zied
>


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


Re:

2007-12-20 Thread Volker Weber
Hi,

try disabled instead of readonly.

In html readonly components are not submitted to the server.


Regards,
Volker

2007/12/19, Carlos Adolfo Ortiz Quiros <[EMAIL PROTECTED]>:
>
>
>
>
> Hi
>
>
>
> For some weird reason, when I put a 
> and with a JavaScript I put value on it, but no value is transmitted when I
> submit the form back to server.  Is there something wrong?
>
> Have somebody had this situation ever?
>
>
>
>
> CARLOS ADOLFO ORTIZ Q
>
> Ingeniero de Desarrollo
>
>
> axede
>
> Tel : (574)3110663 Fax : (574)3113474
>
> Dirección Cll 16 # 28-195
>
> Medellín - Colombia
>
> http://www.axede.com.co
>
>   La información de este mensaje y sus anexos son propiedad exclusiva
> de Axede S.A. Es únicamente para el uso del destinatario
> intencional y pueden contener información de carácter privado o
> confidencial. Le informamos que cualquier revisión, retransmisión,
> divulgación, copia o uso indebido del mismo está estrictamente
> prohibida y será sancionada legalmente.
>
>
>
> Information contained in this message and every attachment is property of
> Axede S.A. Only the destiny user is able to make use of the data here
> contained, which is private and/or confidential. Any revision, broadcasting,
> spreading, copy or illegal use of this information is strictly prohibited
> and will be sanctioned by legal means.
>


-- 
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 fixed lenght for tobago tag

2007-02-27 Thread Volker Weber

Hi,

can you explain what you want to archive? I don't think you need to redefine the
theme values, it's possible of cause, you just neet to overwrite the
relevant theme-config.properties.

It's better to let the layoutmanager do this.

Regards,
 Volker

2007/2/27, prantor <[EMAIL PROTECTED]>:


How can i set fixed length for tobago input text field. any one can explain
me pls
--
View this message in context: 
http://www.nabble.com/How-to-Set-fixed-lenght-for-tobago-%3Ctx%3Ain%3E-tag-tf3301732.html#a9184491
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: Change visibility dinamically

2007-02-27 Thread Volker Weber

Hi,

if you go the phase listener way: don't change the rendered value
beetween rendering and updateModel. I think the only correct place to
change this value is in before renderResponse.
And i think this should be done by updateing properties of a bean to
which the rendered attribute is bind via valueBinding, not by climbing
through the uitree.

Regards,
 Volker

2007/2/27, Simon Kitching <[EMAIL PROTECTED]>:

This does sound like a pretty weird scenario. You want to change the
behaviour of the application but don't want to change the application?

However I guess this could be done in a PhaseListener. After
restore-view, look in a database (for example) to see if there are any
"overrides" for the current view, and if so retrieve a set of
(component-id, el-expression) values. Then walk the current component
tree and for each component that has an id that matches one of the
"overrides", evaluate the EL-expression and update the component's
rendered state.

A custom UIViewRoot component might also work..

I can't really see *why* you would want to do this, though. Seems much
easier to just update the JSP/facelets file to add the rendered attribute.

A system like this might make more sense for "security" reasons, ie
ensure that every field that is not "authorised" for the current user is
automatically not rendered. Tomahawk does have the "visibleOnUserRole"
attribute for this but a PhaseListener approach also has appeal. of
course this depends on being able to somehow identify the components;
having the attribute on the component tag itself avoids that issue.

[EMAIL PROTECTED] wrote:
> Yes I know, using rendered, valueBinding and managed bean I can do it,
> but to use these options I have to project the application to managed
> this cases. Suppose I have developed an application and in a page I have
> a textbox that, at develop design, noone supposed this component could
> be hide in some situation...so the text box is always rendered. In this
> case I don't have no programmatic "if" and no EL expression. How can I
> hide this texbox without modify the code? I  was thinking to implement a
> my UIViewRoot, override the component in faces-config to force to use my
> UIViewRoot and put inside my UIViewRoot all the logic.is it
> possible? Is it correct?
>
> -Original Message-
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: 27 febbraio 2007 21.23
> To: MyFaces Discussion
> Subject: Re: Change visibility dinamically
>
> Oops.  You're right, Simon.   It could be set programmically.   I
> still think it's a bad design, but that's just my opinion.
>
> On 2/27/07, Simon Kitching <[EMAIL PROTECTED]> wrote:
>> Not sure what you mean, Mike.
>>
>> Every UIComponent has a setRendered(boolean) method that can be called
>> to specify whether that component is rendered or not. This method
> could
>> certainly be called from a PhaseListener.
>>
>> Note that there is a slight flaw in the design of this method in my
>> opinion; the rendered property can be specified as either an EL
>> expression (ie stored as a ValueBinding) or can be a literal value set
>> via setRendered(). If a value-binding is used then setRendered() can
>> later be used to override that; however once rendered has been set
> using
>>   setRendered, there is no way to go back to using an EL expression.
> In
>> other words, once you've decided to manually control the rendered
> state
>> you cannot go back to using the original EL rendered expression.
>>
>> One way around this would be to use
>>// create a ValueBinding for the expression #{true}
>>setValueBinding("rendered", vb);
>> rather than
>>setRendered(true);
>>
>> Cheers,
>>
>> Simon
>>
>> Mike Kienenberger wrote:
>>> You can only set the rendered property of a component from the
> values
>>> of a managed bean (unless you're using facelet functions or
> customized
>>> el resolvers).   Your managed bean can call whatever java code you
>>> want it to.
>>>
>>> If you give more specific details of what you're trying to
> accomplish,
>>> maybe we can help you more.
>>>
>>>
>>> On 2/27/07, [EMAIL PROTECTED]
>>> <[EMAIL PROTECTED]> wrote:



 I wanna change the behavior of my application changing the
> visibility of
 some component basing of specific rules but I don't wan put this
> logic
 in my
 Managed Bean but externally. May be implementing a Phase Listener
> can
 help
 me to do this? In wich Phase should I set the visible property of
> my
 components?

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




Re: Change visibility dinamically

2007-02-27 Thread Volker Weber

2007/2/27, Craig McClanahan <[EMAIL PROTECTED]>:

On 2/27/07, Volker Weber <[EMAIL PROTECTED]> wrote:

The places where the rendered flag is referenced are actually:

* In Apply Request Values ... decoding of request parameters
  will not occur if rendered (or visible) is set to false.


also in processValidations and processUpdates, both are skiped if
rendred is set to false.



* In Render Response ... rendering will be completely skipped
  if rendered is set to false.

In between these times, the rendered property is most likely not being
referenced, so changes are safe.


I don't think you get the expected results if you change on other
places than between after updateModel and before renderResponse.
In case of validation/conversion errors all of them exept before
renderResponse are skipped.

Regards,
 Volker


Re: Change visibility dinamically

2007-02-28 Thread Volker Weber

Hi,

in jsf 1.1 with jsp (don't know how it is in faclets) the component
creation is done while rendering, so there is no chance to hook in
between.

Regards,
 Volker

2007/2/28, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

I have tested before render response but does'nt work because, the first
time I call the page, in befer render response phase the view root is
empty.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Craig
McClanahan
Sent: 27 febbraio 2007 23.50
To: MyFaces Discussion
Subject: Re: Change visibility dinamically

On 2/27/07, Volker Weber <[EMAIL PROTECTED]> wrote:
> 2007/2/27, Craig McClanahan <[EMAIL PROTECTED]>:
> > On 2/27/07, Volker Weber <[EMAIL PROTECTED]> wrote:
> >
> > The places where the rendered flag is referenced are actually:
> >
> > * In Apply Request Values ... decoding of request parameters
> >   will not occur if rendered (or visible) is set to false.
>
> also in processValidations and processUpdates, both are skiped if
> rendred is set to false.
>
> >
> > * In Render Response ... rendering will be completely skipped
> >   if rendered is set to false.
> >
> > In between these times, the rendered property is most likely not
being
> > referenced, so changes are safe.
>
> I don't think you get the expected results if you change on other
> places than between after updateModel and before renderResponse.
> In case of validation/conversion errors all of them exept before
> renderResponse are skipped.
>

Good catch ... I forgot to check the processXxxx methods for those
phases.

So, the advice that before render response seems like the point to
change the value stands.

> Regards,
>   Volker
>

Craig


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



Re: Change visibility dinamically

2007-02-28 Thread Volker Weber

You can overwite encodeBegin AND encodeEnd doing the following:

in encodeBegin:
backup and replace the responseWriter

in encodeEnd:
throw away the replaced responseWriter,
do your rendered stuff
reset the backuped original responseWriter
do the original encodeBegin, encodeChildren(), and the original
encodeEnd() again.

This should do render and create the ComponentTree, discard the result
of rendering, do your stuff, rerender the uiTree.

Regards,
 Volker

2007/2/28, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:

Yes I agree. Could I have a chance to hook if I use a my implementation
of UIViewRoot overriding encodeBegin method?

Regards,
Mario

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Volker Weber
Sent: 28 febbraio 2007 09.48
To: MyFaces Discussion
Subject: Re: Change visibility dinamically

Hi,

in jsf 1.1 with jsp (don't know how it is in faclets) the component
creation is done while rendering, so there is no chance to hook in
between.

Regards,
  Volker

2007/2/28, [EMAIL PROTECTED]
<[EMAIL PROTECTED]>:
> I have tested before render response but does'nt work because, the
first
> time I call the page, in befer render response phase the view root is
> empty.
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Craig
> McClanahan
> Sent: 27 febbraio 2007 23.50
> To: MyFaces Discussion
> Subject: Re: Change visibility dinamically
>
> On 2/27/07, Volker Weber <[EMAIL PROTECTED]> wrote:
> > 2007/2/27, Craig McClanahan <[EMAIL PROTECTED]>:
> > > On 2/27/07, Volker Weber <[EMAIL PROTECTED]> wrote:
> > >
> > > The places where the rendered flag is referenced are actually:
> > >
> > > * In Apply Request Values ... decoding of request parameters
> > >   will not occur if rendered (or visible) is set to false.
> >
> > also in processValidations and processUpdates, both are skiped if
> > rendred is set to false.
> >
> > >
> > > * In Render Response ... rendering will be completely skipped
> > >   if rendered is set to false.
> > >
> > > In between these times, the rendered property is most likely not
> being
> > > referenced, so changes are safe.
> >
> > I don't think you get the expected results if you change on other
> > places than between after updateModel and before renderResponse.
> > In case of validation/conversion errors all of them exept before
> > renderResponse are skipped.
> >
>
> Good catch ... I forgot to check the processXxxx methods for those
> phases.
>
> So, the advice that before render response seems like the point to
> change the value stands.
>
> > Regards,
> >   Volker
> >
>
> Craig
>
>
> This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information.  If you have
received it in error, please notify the sender immediately and delete
the original.  Any other use of the email by you is prohibited.
>


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



Re: invoke JSP page from servlet - IllegalArgumentException

2007-02-28 Thread Volker Weber

Hi,

i don't know if it makes a difference, but the code from the wiki is
suposed to be in the service() method of the servlet. As it is in
http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/servlet/NonFacesRequestServlet.java?view=markup

Regards,
 Volker

2007/2/28, Michael Heinen <[EMAIL PROTECTED]>:





I want to forward a request from a servlet to a JSF page but I don't get it
working.

I read the article InvokingJsfPagesWithStandardUrls in the
WIKI
(http://wiki.apache.org/myfaces/InvokingJsfPagesWithStandardUrls?highlight=%28link%29%7C%28jsf%29)

but I get always following Exception:

java.lang.IllegalArgumentException: could not find
pathMapping for servletPath = /servlet/trustedlogin requestPathInfo = null

at
org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.getServletMapping(JspTilesViewHandlerImpl.java:288)

at
org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:120)

at
org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)

at
org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)

at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)

...



There must be something wrong with my mappings, or ?



Web.xml snippets:



  org.ajax4jsf.VIEW_HANDLERS


org.apache.myfaces.tomahawk.application.jsp.JspTilesViewHandlerImpl





  

Faces Servlet

/faces/*

  



  

TrustedLoginServlet

/servlet/trustedlogin

  



snippets in faces config:



  *

  

success

/startpage.jsp

  





Servlet:

  protected void forward(HttpServletRequest request, HttpServletResponse
response, String outcome,

  String comeFrom)

  {

LifecycleFactory lFactory = (LifecycleFactory)
FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);

Lifecycle lifecycle =
lFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);

FacesContextFactory fcFactory = (FacesContextFactory) FactoryFinder

.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);

FacesContext facesContext =
fcFactory.getFacesContext(getServletContext(), request, response,
lifecycle);

Application application = facesContext.getApplication();

ViewHandler viewHandler = application.getViewHandler();



if (comeFrom == null)

{

  comeFrom = "";

}

UIViewRoot view = viewHandler.createView(facesContext, comeFrom);

facesContext.setViewRoot(view);



NavigationHandler navigationHandler =
application.getNavigationHandler();

navigationHandler.handleNavigation(facesContext, null,
"success");

lifecycle.render(facesContext);

  }



I use:

myFacesCore 1.1.4

tomahawk snapshot 1.1.4

tiles

a4j 1.0.6



Any help is appreciated,

Michael


Re: [Solved] How to Set fixed lenght for tobago tag

2007-03-01 Thread Volker Weber

HI,

ok, this is another thing. Setting another value to 'fixed' woud
affect all tc:in int the app.
What you want is having tc:in (tx:in is a macro) of differend sizes.

the tx:in is a shortcut for:

 
   
 


where the '$label' in tc:label is replaced by the label attribure of
the tx:in, all other attributes are set at tc:in.

to get a text input with size of 30px instead of the default full
layout size you can use this:

 
   
 
 



Regards,
 Volker

2007/3/1, prantor <[EMAIL PROTECTED]>:


ok, I want to desing a form that has some text field which length are 3,7 etc
and some length is 45, 60 etc.
so how can i desin form for various text field. i dont want that they has
same size of view.


Volker Weber-5 wrote:
>
> Hi,
>
> can you explain what you want to archive? I don't think you need to
> redefine the
> theme values, it's possible of cause, you just neet to overwrite the
> relevant theme-config.properties.
>
> It's better to let the layoutmanager do this.
>
> Regards,
>   Volker
>
> 2007/2/27, prantor <[EMAIL PROTECTED]>:
>>
>> How can i set fixed length for tobago input text field. any one can
>> explain
>> me pls
>> --
>> View this message in context:
>> 
http://www.nabble.com/How-to-Set-fixed-lenght-for-tobago-%3Ctx%3Ain%3E-tag-tf3301732.html#a9184491
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: 
http://www.nabble.com/How-to-Set-fixed-lenght-for-tobago-%3Ctx%3Ain%3E-tag-tf3301732.html#a9244246
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: Where to report MyFaces 1.1.5 (major) bug? (problem with facet tag)

2007-03-01 Thread Volker Weber

Hi,

see
http://myfaces.apache.org/issue-tracking.html

Regards,
 Volker

2007/3/1, Lisa <[EMAIL PROTECTED]>:


Using a facet tag inside a datatable for a column header has been broken
(worked before, now does not).  I searched the wiki but did not see a place
I could post a bug.

If you do something like this:








you get a duplicate ID error.  the f:facet tag seems to be the culprit.

The page displays properly on load but if you come back to the page, there
will be an exception thrown citing duplicate ID's.  Notice there are no use
of id's.  The duplicate ID problem is due to MyFaces generated id's.

not sure how to fix this but you would be wise to not upgrade to 1.1.5 just
yet until this is fixed.
--
View this message in context: 
http://www.nabble.com/Where-to-report-MyFaces-1.1.5-%28major%29-bug--%28problem-with-facet-tag%29-tf3329824.html#a9258785
Sent from the MyFaces - Users mailing list archive at Nabble.com.




Re: how does UICommand execute the action binding?

2007-03-02 Thread Volker Weber

Hi Madhav,

the action methodBinding is handled in the defaultActionListener, which is
invoked also in
broadcast() from UICommand.

NavigationHandler.handleNavigation() is done in processAction of
defaultActionListener:
http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/ActionListenerImpl.java?view=markup

Regards,
 Volker





2007/3/2, Madhav Bhargava <[EMAIL PROTECTED] >:


 Hi All,



HtmlCommandLink and HtmlCommandButton extend UICommand component class.

UICommand creates 2 MethodBindings – action and actionListener.



I was looking at the code for UICommand class and I could locate where the
registered actionListeners were getting executed – *broadcast* method but
I was not able to figure out where the action method was getting invoked and
how does NavigationHandler takes control from there on.



In NavigationHandler javadoc the following is mentioned:

public abstract void *handleNavigation*(javax.faces.context.FacesContext 
context,

  java.lang.String fromAction,


  java.lang.String outcome)



*Parameters:*

context - The 
FacesContextfor
 the current request

fromAction - The action binding expression that was evaluated to retrieve
the specified outcome, or null if the outcome was acquired by some other
means

outcome - The logical outcome returned by a previous invoked application
action (which may be null)



Does it mean that if I create a MethodBinding out of an action EL
expression and then invoke the same, then will it execute the action method
and then automatically call the method specified above to navigate to next
view according to the navigation rules defined?



Any insight into this will be helpful.



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



Re: fields in between 2 radio button

2007-03-05 Thread Volker Weber

Hi,

see
http://myfaces.apache.org/tomahawk/tlddoc/t/radio.html
and
http://wiki.apache.org/myfaces/Radio?highlight=%28radio%29

regards,
 Volker


2007/3/5, Steve Torrefranca <[EMAIL PROTECTED]>:

hi,

we are trying to port an old app to JSF.  now one of the screens has
fields in between radio button.  how do we do this?

Example:
[o] radio1  [inputText]  outputText  [o] radio2

where radio1 and redio2 are select items of a component.

Thank you

-Steve



Re: Best pratices to set TimeZone

2007-03-06 Thread Volker Weber

Hi,

in sandbox is a s:convertDateTime
http://myfaces.apache.org/sandbox/tlddoc/s/convertDateTime.html
which uses server default timezone.

Regards,
 Volker

2007/3/6, Andrew Robinson <[EMAIL PROTECTED]>:

The convertDateTime converter from Seam uses the user's time zone
instead of UTC by default. If you use that it should always display
the correct time zone to the user.

On 3/6/07, Alexandre Jaquet <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>
> > I'm having problem displaying date converted with f:convertDateTime
> > because if I have the date value 2007-02-06 00:00:00.000 I show the
> > date minus one day. I think the problem is because I don't set the
> > TimeZone used and the converter use GMT Time Zone. What is the best
> > pratices to manage TimeZone setting?
> >
> > Regards
> >
> > Mario Buonopane
> >
> > This message is for the designated recipient only and may contain
> > privileged, proprietary, or otherwise private information. If you have
> > received it in error, please notify the sender immediately and delete
> > the original. Any other use of the email by you is prohibited.
> >
> Hi,
>
> You could create an application scope bean and define the correct value,
> then access it from
> your pages.
>



Re: from components to JSF tags

2007-03-07 Thread Volker Weber

Hi,


I don't know of any existing code to walk that tree and print out the
data in a useful format but it would be about 10 minutes work to write


here is one:
http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/ComponentUtil.java?view=markup

the "public static String toString(UIComponent component, int offset);" method
at line 553 today

Regards,
 Volker


Re: Regarding sandbox's

2007-03-07 Thread Volker Weber

Hi,

see
http://myfaces.apache.org/sandbox/tlddoc/s/focus.html

Regards,
 Volker

2007/3/7, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:


 Hi,

In my form I have one sandbox's input suggest Ajax filed and
"next" submit button.

When the page was displayed I want to focus the cursor to the sandbox's
input suggest Ajax filed.

Is there any way to do like that? If any then please let me know.



Regards,

Basha





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: [TOMAHAWK] inputSuggestAjax

2007-03-07 Thread Volker Weber

Hi Gerald,

if i got him right, the selection list renders in a layer under the
selectBoxes at the second time. I would guess the iframe is missing,
or whatever dojo does to hide this IE bug.

Regards,
 Volker

2007/3/7, Gerald Müllan <[EMAIL PROTECTED]>:

Hi,

if i got you correctly the same works to me on:

http://www.irian.at/myfaces-sandbox/inputSuggestAjax.jsf

I step into the first suggest-input, highlight a value from the list
and once it is highlighted i can tab out to the next input. If it
works on this page, is must also work on any select-menu page combined
with suggestAjax components. Or do i got something wrong?

To the second issue; You are choosing one value from the list, a few
moments after typing in. So why you want to avoid such a behaviour?

Thats not really an issue; You can only restrict the length of the pop-up-list..

cheers,

Gerald

On 3/7/07, Beelen, Marco <[EMAIL PROTECTED]> wrote:
>
>
>
> Hello,
>
> In my application I'm using the inputSuggestAjax-component from Tomahawk.
> There are two minor inconvienances with this component, which I would like
> to address.
> I'm not sure whether to report them here or to the DoJo-toolkit, but since
> I'm coding using the tomahawk-component, I will start here.
>
> On some form I have several h:selectOneMenu components aligned underneath
> each other. Most of my selectboxes have just a few options, but one has
> about 1700 and for that one I'm using the inputSuggestAjax-component. That
> component is about half way through the list of selectboxes.
>
> As a user I can use TAB to switch from 1 input to another and use the up-
> and down-arrow for selecting the proper option. This stops when I reach the
> inputSuggestAjax-component, because after I made my selection with the keys
> the focus does not get set to the next input-field in the form. I have got
> to use the mousepointer to give focus to the next form element.
>
> The selected issue is about layout.
> If I open the options for the inputSuggestAjax-component all options get
> rendered in a layer on top of the selectboxes which are located underneath
> it in the form. That's how I expect it should be have. Once I made a
> selection, entered some other field and then want to change the selection of
> the inputSuggestAjax-component, I will click on the text-field.
>
> Using the backspace I remove the last part of the text until the component
> starts to suggest all alternatives, which start with the text still
> remaining in the input-text-field. Those alternatives will rendered in the
> background compared to the 'normal' selectboxes also present in the form.
> This makes is quite hard to read the values of the options and thus select
> the proper one.
>
> IE 6.0 is the target-browser.
>
> Does anybody recognise this behaviour and know how to get around these
> issues?
>
> With kind regards,
> Marco Beelen
>
> --
>  Notice: This e-mail message, together with any attachments, contains
>  information of Merck & Co., Inc. (One Merck Drive, Whitehouse Station,
>  New Jersey, USA 08889), and/or its affiliates (which may be known
>  outside the United States as Merck Frosst, Merck Sharp & Dohme or MSD
>  and in Japan, as Banyu - direct contact information for affiliates is
>  available at http://www.merck.com/contact/contacts.html)
> that may be
>  confidential, proprietary copyrighted and/or legally privileged. It is
>  intended solely for the use of the individual or entity named on this
>  message. If you are not the intended recipient, and have received this
>  message in error, please notify us immediately by reply e-mail and then
>  delete it from your system.
>
> --


--
http://www.irian.at

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

Professional Support for Apache MyFaces



Re: [Tobago] tc:sheet and tc:selectManyListbox

2007-03-08 Thread Volker Weber

This was also my first thought, but then you neet to set the heigth on
the panel.
And the height attribute on panel is also marked as deprecated :-(

Afaik ther is no way to do this without use of deprecated api.

Regards,
 Volker

2007/3/8, Bernd Bohmann <[EMAIL PROTECTED]>:

Hello Michael,

I haven't try this, but can you enclose the listbox with a panel and a
layout manager that set the size of the row.

Bernd

Michał 'Gandalf' Stawicki wrote:
> Ok, so I used the height attribute of tc:selectManyListbox. But it is
> marked as deprecated, so what is the correct approach?
>
>
> On 07/03/07, Michał 'Gandalf' Stawicki <[EMAIL PROTECTED]> wrote:
>> Hello,
>>
>> how do I get selectManyListbox rendered properly inside tc:sheet? I
>> get listbox rendered as only one row, despite what layout I set
>>
>> regards,
>> michael
>>
>> --
>> [EMAIL PROTECTED]
>> http://stawicki.jasliska.pl
>> GG: 369
>> JID: [EMAIL PROTECTED]
>>
>
>



Re: [ Tobago ] Regarding PopUp's

2007-03-08 Thread Volker Weber

Hi Madan,

which implementation/version of jsf did you use?

afaik your last version should work with myfaces 1.1.5 and tobago
1.0.10[-SNAPSHOT].

But to be future proof i suggest to use Tobago.addEventListener() or
Tobago.bindAsEventListener() instead of prototype.js:Event.observe()
because we are going to remove prototype from tobago.

Regards,
 Volker

2007/3/8, madan chowdary <[EMAIL PROTECTED]>:


Hi All,

Please help me over this  I am in real need of this functionality and my
project deadline is ahead.

Thnx in adnvace,

Madan

- Original Message 
From: madan chowdary <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Wednesday, 7 March, 2007 1:01:50 PM
Subject: Re: [ Tobago ] Regarding PopUp's


Hi All,

After debugging this thing , at last was able to get the popup on mouseover
with the help of prototype.js.

The code is as such







































 



Event.observe(window, 'load', initCartSummary);

function initCartSummary(){

Event.observe($('page:cartSummary:viewCartContents'),
'mouseover',
showCartContents);


Event.observe($('page:cartSummary:viewCartContents'),
'mouseout',
showCartContents_mouseOut);


Event.observe($('page:cartSummary:viewCartContents'),
'click',
viewCartContents);
}

var delayhide = null;

function viewCartContents()
{
if (typeof delayhide!="undefined")
clearTimeout(delayhide);
}

function showCartContents(){
delayhide =
setTimeout("Tobago.openPopupWithAction('page:cartSummary:sheetConfigPopup',
'page:cartSummary:viewCartContents')",500);
}

function showCartContents_mouseOut(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide);
}


Used Event object in prototype.js to observe the id for  , and when
mouse over then fire this action "
Tobago.openPopupWithAction('page:cartSummary:sheetConfigPopup',
'page:cartSummary:viewCartContents') "

When clicked on the link, captured the event by "click" option.

Both the ' popup when mouseover ' and ' page navigation when clicked on the
link ' are working fine.

But was facing an issue like as such
-- When the mouse is placed on viewCartContents link, was able to get the
popup.
-- After closing the popup and click on any other link in the page( say top
navigation links) the page is being refreshed , so i have to click again to
go to my desired page which the link refers.
-- This makes me to click twice on the link.
-- when removed the action attribute in  for viewCartContents, and
place the mouse, close the popup and then click on the top links, then was
able to navigate to page which it refers.

Y does this page refresh occures after i close the popup and click on other
links.

how could i solve this issue ?

Regards,
Madan

- Original Message 
From: madan chowdary <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Tuesday, 6 March, 2007 1:14:27 AM
Subject: Re: [ Tobago ] Regarding PopUp's


Hi All,

Was trying to debug the application for popup when placed mouse over a link
with  JavaScript, but its a bit tedious to go through the JavaScript Ajax
frameworks and achieve this task.

Can u guyz please suggest me how to proceed for this case...

And i am desperately waiting for onMouseOver  attribute in  to
display the popup that i had when clicked the link...

Regards,
Madan

- Original Message 
From: madan chowdary <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Saturday, 3 March, 2007 12:33:20 PM
Subject: Re: [ Tobago ] Regarding PopUp's


Hi All,

Is there any means of doing this...

I am in real need of this fun

Re: [ Tobago ] Regarding PopUp's

2007-03-08 Thread Volker Weber

The problem is the action="viewCartContents".

a ajax action MUST return null as outcome. Otherwise the
uiComponentTree on server is replaced by a new one and the restore
fails.

Regards,
 Volker

2007/3/8, madan chowdary <[EMAIL PROTECTED]>:


Hi Volker,

Added MyFaces 1.1.5 and Tobago nightly build jars.

But there was no change in the behavior what i explained in my previous
mails.

Can u explain me how can i go ahead with Tobago.addEventListener() or
Tobago.bindAsEventListener() instead of prototype.js:Event.observe() ?

Thnx

Regards
Madan

- Original Message ----
From: Volker Weber <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Thursday, 8 March, 2007 3:19:17 PM
Subject: Re: [ Tobago ] Regarding PopUp's

Hi Madan,

which implementation/version of jsf did you use?

afaik your last version should work with myfaces 1.1.5 and tobago
1.0.10[-SNAPSHOT].

But to be future proof i suggest to use Tobago.addEventListener() or
Tobago.bindAsEventListener() instead of prototype.js:Event.observe()
because we are going to remove prototype from tobago.

Regards,
  Volker

2007/3/8, madan chowdary <[EMAIL PROTECTED]>:
>
> Hi All,
>
> Please help me over this  I am in real need of this functionality and
my
> project deadline is ahead.
>
> Thnx in adnvace,
>
> Madan
>
> - Original Message 
> From: madan chowdary <[EMAIL PROTECTED]>
> To: MyFaces Discussion 
> Sent: Wednesday, 7 March, 2007 1:01:50 PM
> Subject: Re: [ Tobago ] Regarding PopUp's
>
>
> Hi All,
>
> After debugging this thing , at last was able to get the popup on
mouseover
> with the help of prototype.js.
>
> The code is as such
>
> 
>  action="viewCartContents">
> 
>  id="sheetConfigPopup">
> 
> 
> 
> 
> 
> 
>  label="X">
>  name="popupClose" value="immediate"/>
> 
> 
> 
> 
> 
> value="#{shoppingCart.items}"
>
> columns="60px;350px;80px;100px"
>   var="cartItem"
>
showHeader="true"
>
> showDirectLinks="center"
>
> directLinkCount="10"
>   first="0"
>
> selectable="none">
>  label="#{bundle.quantity}" id="number" sortable="false" align="center">
>  value="#{cartItem.quantity}" id="p_quantity" />
> 
>
>  label="#{bundle.productName}" id="prdName">
>  value="#{cartItem.item.productCode}" id="p_code"/>
>  />
>  value="#{cartItem.item.productName}" id="p_name"/>
> 
>
>  label="#{bundle.unitPrice}" sortable="true" align="right">
>  value="#{cartItem.listPriceForQuantity}" id="p_unitprice"
>
> converter="CurrencyConverter" />
> 
>
>  label="#{bundle.extTotal}" sortable="true" align="right" >
>  value="#{cartItem.quantity * cartItem.listPriceForQuantity}" id="Ex_Total"
>
> converter="CurrencyConverter" />
> 
> 
> 
> 
> 
>  
> 
>
> 
> Event.observe(window, 'load', initCartSummary);
>
> function initCartSummary(){
>
> Event.observe($('page:cartSummary:viewCartContents'),
> 'mouseover',
> showCartContents);
>
>
> Event.observe($('page:cartSummary:viewCartContents'),
> 'mouseout',
> s

Re: [Solved] Question: Style for "Browse"-button of "inputFileUpload"?

2007-03-08 Thread Volker Weber

Hi,


Any further ideas how to trigger a "browse"-dialog of a browser (using jsf
only maybe)?


This is not possible for security reasons, and if you, ore somone
other, find a way to do this, than you, or he, found a bug which may
be fixed in the next update.

No html/javascript is allowed to access files on a system without user
action by pressing a well known standard browse button. This is the
reason why you can't modify this button.

regards,
 volker


Re: [ Tobago ] Regarding PopUp's

2007-03-08 Thread Volker Weber

If i understand this correct the action part navigates to another
view, but did not open the popup?
If so you should not put the popup into this link.
you can add a invisible link 
for the popup action after this link.

2007/3/8, madan chowdary <[EMAIL PROTECTED]>:


Hi Volker,

Am totally confused how to proceed, i need both the action part and the pop
box.

advice me how to go with this ?

Thnx

Madan

- Original Message 
From: Volker Weber <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Thursday, 8 March, 2007 4:24:37 PM
Subject: Re: [ Tobago ] Regarding PopUp's

The problem is the action="viewCartContents".

a ajax action MUST return null as outcome. Otherwise the
uiComponentTree on server is replaced by a new one and the restore
fails.

Regards,
  Volker

2007/3/8, madan chowdary <[EMAIL PROTECTED]>:
>
> Hi Volker,
>
> Added MyFaces 1.1.5 and Tobago nightly build jars.
>
> But there was no change in the behavior what i explained in my previous
> mails.
>
> Can u explain me how can i go ahead with Tobago.addEventListener() or
> Tobago.bindAsEventListener() instead of prototype.js:Event.observe() ?
>
> Thnx
>
> Regards
> Madan
>
> - Original Message 
> From: Volker Weber <[EMAIL PROTECTED]>
> To: MyFaces Discussion 
> Sent: Thursday, 8 March, 2007 3:19:17 PM
> Subject: Re: [ Tobago ] Regarding PopUp's
>
> Hi Madan,
>
> which implementation/version of jsf did you use?
>
> afaik your last version should work with myfaces 1.1.5 and tobago
> 1.0.10[-SNAPSHOT].
>
> But to be future proof i suggest to use Tobago.addEventListener() or
> Tobago.bindAsEventListener() instead of prototype.js:Event.observe()
> because we are going to remove prototype from tobago.
>
> Regards,
>   Volker
>
> 2007/3/8, madan chowdary <[EMAIL PROTECTED]>:
> >
> > Hi All,
> >
> > Please help me over this  I am in real need of this functionality
and
> my
> > project deadline is ahead.
> >
> > Thnx in adnvace,
> >
> > Madan
> >
> > - Original Message 
> > From: madan chowdary <[EMAIL PROTECTED]>
> > To: MyFaces Discussion 
> > Sent: Wednesday, 7 March, 2007 1:01:50 PM
> > Subject: Re: [ Tobago ] Regarding PopUp's
> >
> >
> > Hi All,
> >
> > After debugging this thing , at last was able to get the popup on
> mouseover
> > with the help of prototype.js.
> >
> > The code is as such
> >
> > 
> >  > action="viewCartContents">
> > 
> >  > id="sheetConfigPopup">
> > 
> > 
> > 
> > 
> > 
> > 
> >  > label="X">
> >  > name="popupClose" value="immediate"/>
> >

> > 
> > 
> > 
> >  id="checkOutSheetPopUp"
> >
> > value="#{shoppingCart.items}"
> >
> > columns="60px;350px;80px;100px"
> >
var="cartItem"
> >
> showHeader="true"
> >
> > showDirectLinks="center"
> >
> > directLinkCount="10"
> >   first="0"
> >
> > selectable="none">
> >  > label="#{bundle.quantity}" id="number" sortable="false" align="center">
> >  > value="#{cartItem.quantity}" id="p_quantity" />
> > 
> >
> >  > label="#{bundle.productName}" id="prdName">
> >  > value="#{cartItem.item.productCode}" id="p_code"/>
> >  > />
> >  > value="#{cartItem.item.productName}" id="p_name"/>
> > 
> >
> >  > label="#{bundle.unitPrice}" sortable="true" align="right">
> >  > value="#{cartIt

Re: [ Tobago ] Regarding PopUp's

2007-03-08 Thread Volker Weber


So i have to click twice on the links to go to my desired page.

Think u understood my case ?


Yes, and the reason is the action attribute in the link.

The links action should navigate to another view, but also open a
popup in the same view.
This can't work. As you wrote before if you remove the action you have
no problems with clicking after closing the popup.

Because of the action the navigationHandler is invoked, which results
in creating a new viewId, jsfState and sequence.
This state is included in the ajax response and set into the page.
Now the next request did not found a corrospondending saved
uiComponentTree, which results in just rerender the view.

Regards,
 Volker


Re: [ Tobago ] Regarding PopUp's

2007-03-08 Thread Volker Weber

Can u explain me how can i go ahead with Tobago.addEventListener() or
Tobago.bindAsEventListener() instead of prototype.js:Event.observe() ?


I just took a look in the sources: you can replace Event.observe()
with Tobago.addEventListener(). They take the same params.


  1   2   3   4   5   6   7   8   9   >