AW: Re: Start project?

2006-09-13 Thread Mosimann Matthias
Hi everyone

I hope I don't bother you.

So what is then you prefered development envirement? Eclipse don't have any 
support ... well it has but it is not working correct and the plugin is still 
in development. I'm interested using eclipse anyway. Should I start simply with 
a dynamic web project?

Regards
Matthias

-Ursprüngliche Nachricht-
Von: news [mailto:[EMAIL PROTECTED] Im Auftrag von Werner Punz
Gesendet: Mittwoch, 13. September 2006 18:00
An: users@myfaces.apache.org
Betreff: Re: Start project?

Christoph Lassner schrieb:
> Yes, it is possible, but connected to quite some bits of work (because 
> u have to use other components, etc.). You should have a closer look 
> at the components you need and then decide for a framework. However, 
> like I said, if you really want to change your framework in some time, 
> it will be possible.
> 
> Regards
> Chris
> 
> 
Besides that there is an ongoing work to reduce the incompatibilities between 
the two codebases, in most cases it now should be possible to mix both 
component sets without too much problems.

But you have to go for the nightly builds to be fully able to do it, the last 
stable versions still had major issues, which have been cleared up a few weeks 
ago.



Donwload war sandbox

2006-09-13 Thread Wdiaz

Where i can download the war of Sandbox to obtain the jar?

--
Cordialmente

William Diaz Pabón
Coordinador Técnico de Desarrollo
Vicerrectoría de Gestión y Desarrollo Tecnológico
Universidad de Pamplona



RE: Using personalized validation messages...

2006-09-13 Thread Jorge Vásquez
Thanks a lot Mike, it worked perfect!!!
Regards,
JV 

-Mensaje original-
De: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Enviado el: miércoles, 13 de septiembre de 2006 20:26
Para: MyFaces Discussion
Asunto: Re: Using personalized validation messages...

I added a message attribute to all of the tomahawk validators.



should work.


On 9/13/06, Jorge Vásquez <[EMAIL PROTECTED]> wrote:
>
>
>
>
> Regards to all,
>
> Is there a way to make validators return personalized message Strings that
> are not necessarily found in message Bundles?
>
>
>
> For example, in the following code I would like to be able to specify the
> validator to use any message that I wished:
>
>required="true">
> 
> 
>   styleClass="error" />
>
> But unfortunately, in this case the tag validateRegExpr only has the
pattern
> attribute.
>
> Note:  In the past I have used the method of creating a message String in
a
> messageBundle with the same Id as the one used by the component but in
this
> case we are not using messageBundles as internationalization strategy for
> our project.
>
> Any ideas?
>
> Thanks,
> Jorge Vásquez
>
>
>



Re: Using personalized validation messages...

2006-09-13 Thread Mike Kienenberger

I added a message attribute to all of the tomahawk validators.



should work.


On 9/13/06, Jorge Vásquez <[EMAIL PROTECTED]> wrote:





Regards to all,

Is there a way to make validators return personalized message Strings that
are not necessarily found in message Bundles?



For example, in the following code I would like to be able to specify the
validator to use any message that I wished:

  


 

But unfortunately, in this case the tag validateRegExpr only has the pattern
attribute.

Note:  In the past I have used the method of creating a message String in a
messageBundle with the same Id as the one used by the component but in this
case we are not using messageBundles as internationalization strategy for
our project.

Any ideas?

Thanks,
Jorge Vásquez





Using personalized validation messages...

2006-09-13 Thread Jorge Vásquez








Regards to all,

Is there a way to make validators return personalized
message Strings that are not necessarily found in message Bundles?

 

For example, in the following code I would like to be
able to specify the validator to use any message that I wished:

 

              But unfortunately, in this case the tag validateRegExpr only has the pattern attribute.  Note:  In the past I have used the method of creating a message String in a messageBundle with the same Id as the one used by the component but in this case we are not using messageBundles as internationalization strategy for our project. Any ideas? Thanks,Jorge Vásquez

 








Re: datatable with multiple images not interpretting rendered attribute

2006-09-13 Thread Mike Kienenberger

Try using the following elements inside your column.
I think it's possible that if you use a raw EL expression instead of
h:outputText, you might be getting that expression evaluated once at
build time rather than at render time.  Not sure about that though.

   
   
   

I also don't know what would happen if you subtract an Integer from an
int.   You could write a facelet function to do this for you to be
sure that's not causing the problem.

I've never used rowIndexVar, so it's possible that there's a bug in there.


On 9/13/06, Toppac <[EMAIL PROTECTED]> wrote:


An addition to this. Right now I am seeing the first image rendering for
every item in my list. This means that the index-currentVehicleIndex is
always 0. When I print index and currentVehicle index next to the image, it
shows that the expression before is not always true. This is again what
makes me think it is not evaluating that expression each time it renders a
row.



Toppac wrote:
>
> Mike thanks for the reply. Yes I am using facelets and I have a custom
> function that is being called in the render section of the image tag.
> Here is a simplified example of what I am trying to do.
>
>  scope="page"/>
>  cellspacing="0">
>   
>   
>    
>   
>   
>rendered="#{sf:isCompleteVehicle(curVehicle) and ((index -
> currentVehicleIndex) ne 0)}" value="snapc/images/icons/complete.gif" />
>rendered="#{!sf:isCompleteVehicle(curVehicle) and ((index -
> currentVehicleIndex) ne 0)}" value="snapc/images/icons/red_arrow.gif" />
> 
> 
>
> What I expect to see is the correct image displayed based on the rendered
> EL statements. What I end up seeing is the second image rendered for every
> item in my list. Sometimes I see 2 images rendered at the same time, when
> in reality they are mutually exclusive. It almost seems like the dataTable
> at render time is treating all the images as 1 component and either the
> first or last time it processes all the EL is the one that wins out for
> every row.
>
> The custom function returns a boolean, false by default. The
> currentVehicleIndex is an Integer and there is custom property resolver to
> get it. Would the fact that is an Integer and not an int cause any
> problems?
>
> Sorry to jump on this as a MyFaces problem, I am just very frustrated
> because the code looks like it should work. I've been pulling my hair out
> trying to figure out what is going on. I read the facelets wiki link you
> posted but I don't think that applies here.
>
>
>
> Mike Kienenberger wrote:
>>
>> Are you using facelets?  You talked about using JSTL tags, and as far
>> as I know these are only available with Facelets.  I also see
>> functions in there, which again  makes me think you're using facelets.
>>
>> If you define something with the c: tags, that only happens at compile
>> time, not at render time.
>>
>> 
http://wiki.java.net/bin/view/Projects/FaceletsFAQ#What_s_the_difference_between_c
>>
>> I recommend that you greatly simplify your example, and post the exact
>> page code here the expected results, and the actual results, so we're
>> better able to help you.   What you discussed earlier and what you
>> posted didn't match up, and there's so many references to index and
>> currentItemIndex in there that it's hard for us to guess which part
>> isn't working for you.
>>
>> I use el expressions in rendered statements inside dataTable column
>> children without problems (with facelets).
>>
>>
>> On 9/13/06, Toppac <[EMAIL PROTECTED]> wrote:
>>>
>>> Thanks for the response but it definately does not work. For some reason
>>> when
>>> it is rendering the dataTable, whatever the first or last evaluation of
>>> the
>>> expression is, gets applied to every instance of the image within the
>>> datatable. It seems to cache the result of the EL expression for render
>>> and
>>> then use that for all the images at render time, rather than each image
>>> having its own value. I think this is a bug with myfaces
>>>
>>>
>>>
>>> Mike Kienenberger wrote:
>>> >
>>> > Of the code you posted, it looks ok to me.
>>> >
>>> > However, id="#{index + 'working'}" is not legal.   id must be a static
>>> > value.
>>> >
>>> >
>>> >
>>> > On 9/12/06, Toppac <[EMAIL PROTECTED]> wrote:
>>> >>
>>> >> I am trying to use a datatable to render bunch of data and display an
>>> >> image
>>> >> next to each row rendered based on the rowIndex. My code is below.
>>> The
>>> >> problem I am seeing is that inside the graphicImage tag, the index
>>> >> doesn't
>>> >> have scope. I can print the index before and after the graphicImage,
>>> but
>>> >> when used inside the rendered attribute it always rendered to empty
>>> >> string.
>>> >> I tried to use the index as part of the id for the graphicImage,
>>> >> something
>>> >> like id="#{index

Re: Portlet examples needed by portlet/MyFaces users

2006-09-13 Thread Mike Kienenberger

I'm sure it's possible.  Facelets did it.  I use jstl functions in my
pages under facelets.

On 9/13/06, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]> wrote:

Hi,

Does anybody know whether it's possible and how to write a customer
variable resolver for the standard implementation of JSTL? That'll solve
another problem with portlets: JSF correctly puts managed beans in a
portlet session (via the external context I guess), but the JSTL EL
looks at the "servlet level" so you can't access JSF managed beans with
JSTL. This has probably been discussed at length and probably there is a
standard solution and probably it'll be dealt with in the upcoming
version of the specs, but in the meantime?

Thanks
Bolerio



RE: Portlet examples needed by portlet/MyFaces users

2006-09-13 Thread Iordanov, Borislav \(GIC\)
Hi,

Does anybody know whether it's possible and how to write a customer
variable resolver for the standard implementation of JSTL? That'll solve
another problem with portlets: JSF correctly puts managed beans in a
portlet session (via the external context I guess), but the JSTL EL
looks at the "servlet level" so you can't access JSF managed beans with
JSTL. This has probably been discussed at length and probably there is a
standard solution and probably it'll be dealt with in the upcoming
version of the specs, but in the meantime?

Thanks
Bolerio


Re: Implementing Printable View for dataTable: Problem with target="_blank"?

2006-09-13 Thread mjovanov



Paul Spencer-3 wrote:
> 
> Mjovanov,
> I just have time for short answers.  You will need to do the research.
> 
> 1) Media specific CSS Classes may be the answer.  This way the user 
> prints from the browser without the need of a "Printable Format" page.
> 
> 2) Shale Dialogs.  http://shale.apache.org.
> 
> 
> Paul Spencer
> 
> 
> 
> mjovanov wrote:
>> Hello,
>> 
>> Please consider the following scenario: a page with a dataTable component
>> and a backing bean with two DataModel properties, one for the rows
>> (binding
>> to the 'value' attribute of the dataTable) and one for columns (binding
>> to
>> the 'value' attribute of the nested t:columns tag).  The backing bean is
>> configured in faces-config.xml to 'request' scope, but is being
>> serialized
>> between requests by using the t:saveState tag (so that paging for example
>> would not require additional hits to the database).  So far everything is
>> working as expected.  However, problems arise when I try to implement a
>> link
>> on the page that allows a user to open the table in a new window, and
>> without paging (for printing purposes).  The catch is that I want to be
>> able
>> to still use the same backing bean so that the data doesn’t have to be
>> retrieved again, and also so that the sort would be preserved.  Could
>> anyone
>> suggest the approach to take?  I tried the following:
>> 
>> Define a commandLink component and bind it to an action method on the
>> backing bean, like this:
>> 
>> > class="linkCaption" rendered="#{workbenchForm.dataFound}">
>> > alt="#{msg.labelPrintQueueSumm}" width="21" height="14" /> 
>> 
>> 
>> 
>> The body of the action method would then look like something like this:
>> 
>>   public void forwardToPrintView() throws IOException, ServletException {
>>   HttpServletRequest request = (HttpServletRequest)getRequest();
>>   HttpServletResponse response = (HttpServletResponse)getResponse();
>>   request.setAttribute("rows", rows.getWrappedData());
>>   request.setAttribute("columns", columns.getWrappedData());
>>  
>> request.getRequestDispatcher("/workbenchPrint.faces").forward(request,
>> response);
>>   getFacesContext().responseComplete();
>>   }
>> 
>> However this only works one time; after that I start seeing some really
>> weird behavior, like all links on the original page that were previously
>> working correctly start opening content in a new window?!  At first I
>> though
>> there may be a problem with the target=”_blank” attribute, but when I
>> switched the commandLink component to an outputLink and had it point to
>> another page all together (without accessing the serialized backing bean)
>> the problem went away; could it be that the JSF state some how got
>> corrupted?  Any suggestions/clues would be greatly appreciated.
>> 
>> PS  I was able to get very similar functionality to work for "Exporting
>> to
>> Excel"; the action method for this looks like this:
>> 
>>   public void exportHtmlTableToExcel() throws IOException{
>> 
>>   /*Set the filename
>>   DateTime dt = new DateTime();
>>   DateTimeFormatter fmt =
>> DateTimeFormat.forPattern("-MM-dd_HHmmss");
>>   String filename = dt.toString(fmt) + ".xls";*/
>> 
>>   //Setup the output
>>   String contentType = "application/vnd.ms-excel";
>>   FacesContext fc = FacesContext.getCurrentInstance();
>>   String filename =
>> fc.getExternalContext().getUserPrincipal().getName()
>> + "-"+ System.currentTimeMillis() + ".xls";
>>   HttpServletResponse response =
>> (HttpServletResponse)fc.getExternalContext().getResponse();
>>   response.setHeader("Content-disposition", "attachment; filename=" +
>> filename);
>>   response.setContentType(contentType);
>> 
>>   //Write the table back out
>>   PrintWriter out = response.getWriter();
>>   //First write column headings
>>   List columnList = (List)columns.getWrappedData();
>>   for (Iterator it = columnList.iterator(); it.hasNext(); ) {
>>   out.print(((TableColumnDTO)it.next()).getLabel() + "\t");
>>   }
>>   out.println();
>>   List data = (List)rows.getWrappedData();
>>   for (Iterator i = data.iterator(); i.hasNext(); ) {
>>   List row = (List)i.next();
>>   for (Iterator j = row.iterator(); j.hasNext(); ) {
>>   Object value = j.next();
>>   out.print((value != null ? value : "") + "\t");
>>   }
>>   out.println();
>>   }
>>   out.close();
>>   fc.responseComplete();
>>   }
>> 
>> One important difference to note is that the link for "Exporting to
>> Excel"
>> does not have the target attribute set to '_blank' (since the content
>> type
>> would force another application to handle it, thus opening it in a new
>> window automatically).
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Implementing-Printable-View-for-dataTable%3A-Problem-with-target%3D%22_blank%

Re: datatable with multiple images not interpretting rendered attribute

2006-09-13 Thread Toppac

An addition to this. Right now I am seeing the first image rendering for
every item in my list. This means that the index-currentVehicleIndex is
always 0. When I print index and currentVehicle index next to the image, it
shows that the expression before is not always true. This is again what
makes me think it is not evaluating that expression each time it renders a
row.



Toppac wrote:
> 
> Mike thanks for the reply. Yes I am using facelets and I have a custom
> function that is being called in the render section of the image tag. 
> Here is a simplified example of what I am trying to do.
> 
>  scope="page"/> 
>  cellspacing="0">
>   
>   
>    
>   
>rendered="#{(index -
> currentVehicleIndex) eq 0}" value="snapc/images/icons/working.gif" />
>rendered="#{sf:isCompleteVehicle(curVehicle) and ((index -
> currentVehicleIndex) ne 0)}" value="snapc/images/icons/complete.gif" />
>rendered="#{!sf:isCompleteVehicle(curVehicle) and ((index -
> currentVehicleIndex) ne 0)}" value="snapc/images/icons/red_arrow.gif" />  
>   
> 
> 
> 
> What I expect to see is the correct image displayed based on the rendered
> EL statements. What I end up seeing is the second image rendered for every
> item in my list. Sometimes I see 2 images rendered at the same time, when
> in reality they are mutually exclusive. It almost seems like the dataTable
> at render time is treating all the images as 1 component and either the
> first or last time it processes all the EL is the one that wins out for
> every row.
> 
> The custom function returns a boolean, false by default. The
> currentVehicleIndex is an Integer and there is custom property resolver to
> get it. Would the fact that is an Integer and not an int cause any
> problems?
> 
> Sorry to jump on this as a MyFaces problem, I am just very frustrated
> because the code looks like it should work. I've been pulling my hair out
> trying to figure out what is going on. I read the facelets wiki link you
> posted but I don't think that applies here.
> 
> 
> 
> Mike Kienenberger wrote:
>> 
>> Are you using facelets?  You talked about using JSTL tags, and as far
>> as I know these are only available with Facelets.  I also see
>> functions in there, which again  makes me think you're using facelets.
>> 
>> If you define something with the c: tags, that only happens at compile
>> time, not at render time.
>> 
>> http://wiki.java.net/bin/view/Projects/FaceletsFAQ#What_s_the_difference_between_c
>> 
>> I recommend that you greatly simplify your example, and post the exact
>> page code here the expected results, and the actual results, so we're
>> better able to help you.   What you discussed earlier and what you
>> posted didn't match up, and there's so many references to index and
>> currentItemIndex in there that it's hard for us to guess which part
>> isn't working for you.
>> 
>> I use el expressions in rendered statements inside dataTable column
>> children without problems (with facelets).
>> 
>> 
>> On 9/13/06, Toppac <[EMAIL PROTECTED]> wrote:
>>>
>>> Thanks for the response but it definately does not work. For some reason
>>> when
>>> it is rendering the dataTable, whatever the first or last evaluation of
>>> the
>>> expression is, gets applied to every instance of the image within the
>>> datatable. It seems to cache the result of the EL expression for render
>>> and
>>> then use that for all the images at render time, rather than each image
>>> having its own value. I think this is a bug with myfaces
>>>
>>>
>>>
>>> Mike Kienenberger wrote:
>>> >
>>> > Of the code you posted, it looks ok to me.
>>> >
>>> > However, id="#{index + 'working'}" is not legal.   id must be a static
>>> > value.
>>> >
>>> >
>>> >
>>> > On 9/12/06, Toppac <[EMAIL PROTECTED]> wrote:
>>> >>
>>> >> I am trying to use a datatable to render bunch of data and display an
>>> >> image
>>> >> next to each row rendered based on the rowIndex. My code is below.
>>> The
>>> >> problem I am seeing is that inside the graphicImage tag, the index
>>> >> doesn't
>>> >> have scope. I can print the index before and after the graphicImage,
>>> but
>>> >> when used inside the rendered attribute it always rendered to empty
>>> >> string.
>>> >> I tried to use the index as part of the id for the graphicImage,
>>> >> something
>>> >> like id="#{index + 'working'}" and it always rendered to just
>>> "working".
>>> >> I
>>> >> have tried just using rowIndex, tried naming the rowIndexVar
>>> something
>>> >> other
>>> >> than index, and no luck. I am wondering how I can use the current
>>> index
>>> >> inside other tags. I have also tried using JSTL tags c:if to do the
>>> >> rendering and it looks like the index doesn't have scope inside there
>>> >> either.
>>> >>
>>> >> The only 

Re: datatable with multiple images not interpretting rendered attribute

2006-09-13 Thread Toppac

Mike thanks for the reply. Yes I am using facelets and I have a custom
function that is being called in the render section of the image tag.  Here
is a simplified example of what I am trying to do.

 



 








What I expect to see is the correct image displayed based on the rendered EL
statements. What I end up seeing is the second image rendered for every item
in my list. Sometimes I see 2 images rendered at the same time, when in
reality they are mutually exclusive. It almost seems like the dataTable at
render time is treating all the images as 1 component and either the first
or last time it processes all the EL is the one that wins out for every row.

The custom function returns a boolean, false by default. The
currentVehicleIndex is an Integer and there is custom property resolver to
get it. Would the fact that is an Integer and not an int cause any problems?

Sorry to jump on this as a MyFaces problem, I am just very frustrated
because the code looks like it should work. I've been pulling my hair out
trying to figure out what is going on. I read the facelets wiki link you
posted but I don't think that applies here.



Mike Kienenberger wrote:
> 
> Are you using facelets?  You talked about using JSTL tags, and as far
> as I know these are only available with Facelets.  I also see
> functions in there, which again  makes me think you're using facelets.
> 
> If you define something with the c: tags, that only happens at compile
> time, not at render time.
> 
> http://wiki.java.net/bin/view/Projects/FaceletsFAQ#What_s_the_difference_between_c
> 
> I recommend that you greatly simplify your example, and post the exact
> page code here the expected results, and the actual results, so we're
> better able to help you.   What you discussed earlier and what you
> posted didn't match up, and there's so many references to index and
> currentItemIndex in there that it's hard for us to guess which part
> isn't working for you.
> 
> I use el expressions in rendered statements inside dataTable column
> children without problems (with facelets).
> 
> 
> On 9/13/06, Toppac <[EMAIL PROTECTED]> wrote:
>>
>> Thanks for the response but it definately does not work. For some reason
>> when
>> it is rendering the dataTable, whatever the first or last evaluation of
>> the
>> expression is, gets applied to every instance of the image within the
>> datatable. It seems to cache the result of the EL expression for render
>> and
>> then use that for all the images at render time, rather than each image
>> having its own value. I think this is a bug with myfaces
>>
>>
>>
>> Mike Kienenberger wrote:
>> >
>> > Of the code you posted, it looks ok to me.
>> >
>> > However, id="#{index + 'working'}" is not legal.   id must be a static
>> > value.
>> >
>> >
>> >
>> > On 9/12/06, Toppac <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I am trying to use a datatable to render bunch of data and display an
>> >> image
>> >> next to each row rendered based on the rowIndex. My code is below. The
>> >> problem I am seeing is that inside the graphicImage tag, the index
>> >> doesn't
>> >> have scope. I can print the index before and after the graphicImage,
>> but
>> >> when used inside the rendered attribute it always rendered to empty
>> >> string.
>> >> I tried to use the index as part of the id for the graphicImage,
>> >> something
>> >> like id="#{index + 'working'}" and it always rendered to just
>> "working".
>> >> I
>> >> have tried just using rowIndex, tried naming the rowIndexVar something
>> >> other
>> >> than index, and no luck. I am wondering how I can use the current
>> index
>> >> inside other tags. I have also tried using JSTL tags c:if to do the
>> >> rendering and it looks like the index doesn't have scope inside there
>> >> either.
>> >>
>> >> The only other thing I can think may be wrong is that that the
>> rendered
>> >> attribute of the graphicImage is only calculated once or is calculated
>> >> and
>> >> applied to all the rows. The last c:if I have in my code below does
>> work,
>> >> so
>> >> it seems to only be something with the rowIndexVar inside a dataTable.
>> >>
>> >> Last thing, ignore typos in variable names, as I changed the names of
>> the
>> >> variables to hide the real function of this code (requirement). And
>> >> currentItemIndex is a c:set var defined earlier in the page.
>> >>
>> >> > >> value="#{someData.someItems}"
>> >> border="0" cellpadding="0" cellspacing="0">
>> >> 
>> >> 
>> >>  
>> >> 
>> >> #{index} and
>> #{currentItemIndex}
>> >> and #{(index - currentItemIndex) eq 0}
>> >>   

Re: varDetailToggler and DataTable

2006-09-13 Thread Murat Hazer
On 9/13/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
Do you want to create the HtmlDataTable manually?If not, then it should be sufficient for you to use a binding attribute.I don't wanna create HtmlDataTable manually but i  need to do for expandAllDetails work... 
Maybe you can submit a patch for t:dataTable to add anexpandAllDetails attribute if one is currently missing.
you're right, may be i should try to submit a patch...On 9/13/06, Murat Hazer <
[EMAIL PROTECTED]> wrote:> I solved the problem by following way;>> this.dataModel= new HtmlDataTable();> this.dataModel.setStyleClass("standardTable");
> this.dataModel.setHeaderClass("standardTable_SortHeader");> this.dataModel.setFooterClass("standardTable_Footer");>> this.dataModel.setRowClasses("standardTable_Row1,standardTable_Row2");
> this.dataModel.setValue(this.yuzdeInfoList );> this.dataModel.setVar("yuzdeInfo");> this.dataModel.setRowIndexVar("rowIndex");> this.dataModel.setRenderedIfEmpty
(true);> this.dataModel.setPreserveDataModel (false);> //expand all> this.dataModel.expandAllDetails();>> but i couldn't find a way to set expandAllDetails attribute from the view...
>> regards...>>> On 9/13/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:> > I have not looked at the code at all, but you might need to cycle
> > through the row indexes and call> >> > dataTable.setRowIndex(index)> >> > before calling whatever method expands a detail.> >> > I'm sure that if you read the code, you'll figure it out -- if it can
> > be done by clicking, it should be doable programmically.> >> > On 9/13/06, Martin Grotzke <[EMAIL PROTECTED]> wrote:
> > > Hello,> > >> > > On Mon, 2006-08-14 at 16:28 +0300, Murat Hazer wrote:> > > > Hi,> > > >> > > >  How can i define the default value of the detailStamp facets to true?
> > > > All of them are hidden (false) in the beggining.> > > >> > > >  Is there an attribute like expandAll and collapseAll?> > > does anybody know how this is possible?
> > >> > > I just tried to bind the datatable to the backing bean and invoke> > > expandAllDetails when the datatable is set, but this has not the> > > desired effect. Only when the detail toggler is clicked the first time
> > > the details cannot be collapsed any more after that.> > >> > > Any help on this topic?> > >> > > Thanx in advance,> > > Cheers,> > > Martin
> > >> > >> > > >> > > >  Can i override the toggleDetail action of the toggleDetail?> > > >> > > >> > > > regards
> > > >> > > >> > > > --> > > > Murat HAZER> > > > http://www.projedunyasi.org> > >
> > >> > >> > --> Murat HAZER>-- Murat HAZERhttp://www.projedunyasi.org



Re: datatable with multiple images not interpretting rendered attribute

2006-09-13 Thread Mike Kienenberger

Are you using facelets?  You talked about using JSTL tags, and as far
as I know these are only available with Facelets.  I also see
functions in there, which again  makes me think you're using facelets.

If you define something with the c: tags, that only happens at compile
time, not at render time.

http://wiki.java.net/bin/view/Projects/FaceletsFAQ#What_s_the_difference_between_c

I recommend that you greatly simplify your example, and post the exact
page code here the expected results, and the actual results, so we're
better able to help you.   What you discussed earlier and what you
posted didn't match up, and there's so many references to index and
currentItemIndex in there that it's hard for us to guess which part
isn't working for you.

I use el expressions in rendered statements inside dataTable column
children without problems (with facelets).


On 9/13/06, Toppac <[EMAIL PROTECTED]> wrote:


Thanks for the response but it definately does not work. For some reason when
it is rendering the dataTable, whatever the first or last evaluation of the
expression is, gets applied to every instance of the image within the
datatable. It seems to cache the result of the EL expression for render and
then use that for all the images at render time, rather than each image
having its own value. I think this is a bug with myfaces



Mike Kienenberger wrote:
>
> Of the code you posted, it looks ok to me.
>
> However, id="#{index + 'working'}" is not legal.   id must be a static
> value.
>
>
>
> On 9/12/06, Toppac <[EMAIL PROTECTED]> wrote:
>>
>> I am trying to use a datatable to render bunch of data and display an
>> image
>> next to each row rendered based on the rowIndex. My code is below. The
>> problem I am seeing is that inside the graphicImage tag, the index
>> doesn't
>> have scope. I can print the index before and after the graphicImage, but
>> when used inside the rendered attribute it always rendered to empty
>> string.
>> I tried to use the index as part of the id for the graphicImage,
>> something
>> like id="#{index + 'working'}" and it always rendered to just "working".
>> I
>> have tried just using rowIndex, tried naming the rowIndexVar something
>> other
>> than index, and no luck. I am wondering how I can use the current index
>> inside other tags. I have also tried using JSTL tags c:if to do the
>> rendering and it looks like the index doesn't have scope inside there
>> either.
>>
>> The only other thing I can think may be wrong is that that the rendered
>> attribute of the graphicImage is only calculated once or is calculated
>> and
>> applied to all the rows. The last c:if I have in my code below does work,
>> so
>> it seems to only be something with the rowIndexVar inside a dataTable.
>>
>> Last thing, ignore typos in variable names, as I changed the names of the
>> variables to hide the real function of this code (requirement). And
>> currentItemIndex is a c:set var defined earlier in the page.
>>
>> > value="#{someData.someItems}"
>> border="0" cellpadding="0" cellspacing="0">
>> 
>> 
>>  
>> 
>> #{index} and #{currentItemIndex}
>> and #{(index - currentItemIndex) eq 0}
>> > rendered="#{(index - currentItemIndex) eq
>> 0}" value="snapc/images/icons/working.gif" />
>> > rendered="#{sf:isCompleteItem(curItem)
>> and ((index - currentItemIndex) ne 0)}"
>> value="snapc/images/icons/complete.gif" />
>> > rendered="#{!sf:isCompleteItem(curItem) and ((index - currentItemIndex)
>> ne
>> 0)}" value="snapc/images/icons/red_arrow.gif" />
>> 
>>
>> 
>> 
>> 
>> 
>> #{curItem.currentlYear}
>> 
>>
>>
>> 
>>  
>> 
>> > test="#{fn:length(someData.someItems) > 1}">
>> > type="submit"
>> id="edit">
>>
>> #{bundle.usage_editdetails_label}
>> > value="#{index}"/>
>> 
>>
>>   |  
>> > id="delete" >
>> #{bundle.usage_delete_label}
>> > name="deleteIndex" value="#{index}"/>
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> 
http://www.nabble.com/datatable-with-multiple-images-not-interpretting-r

Re: varDetailToggler and DataTable

2006-09-13 Thread Mike Kienenberger

Do you want to create the HtmlDataTable manually?

If not, then it should be sufficient for you to use a binding attribute.

Maybe you can submit a patch for t:dataTable to add an
expandAllDetails attribute if one is currently missing.

On 9/13/06, Murat Hazer <[EMAIL PROTECTED]> wrote:

I solved the problem by following way;

this.dataModel= new HtmlDataTable();
this.dataModel.setStyleClass("standardTable");
this.dataModel.setHeaderClass("standardTable_SortHeader");
this.dataModel.setFooterClass("standardTable_Footer");

this.dataModel.setRowClasses("standardTable_Row1,standardTable_Row2");
this.dataModel.setValue(this.yuzdeInfoList );
this.dataModel.setVar("yuzdeInfo");
this.dataModel.setRowIndexVar("rowIndex");
this.dataModel.setRenderedIfEmpty(true);
this.dataModel.setPreserveDataModel (false);
//expand all
this.dataModel.expandAllDetails();

but i couldn't find a way to set expandAllDetails attribute from the view...

regards...


On 9/13/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
> I have not looked at the code at all, but you might need to cycle
> through the row indexes and call
>
> dataTable.setRowIndex(index)
>
> before calling whatever method expands a detail.
>
> I'm sure that if you read the code, you'll figure it out -- if it can
> be done by clicking, it should be doable programmically.
>
> On 9/13/06, Martin Grotzke <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > On Mon, 2006-08-14 at 16:28 +0300, Murat Hazer wrote:
> > > Hi,
> > >
> > >  How can i define the default value of the detailStamp facets to true?
> > > All of them are hidden (false) in the beggining.
> > >
> > >  Is there an attribute like expandAll and collapseAll?
> > does anybody know how this is possible?
> >
> > I just tried to bind the datatable to the backing bean and invoke
> > expandAllDetails when the datatable is set, but this has not the
> > desired effect. Only when the detail toggler is clicked the first time
> > the details cannot be collapsed any more after that.
> >
> > Any help on this topic?
> >
> > Thanx in advance,
> > Cheers,
> > Martin
> >
> >
> > >
> > >  Can i override the toggleDetail action of the toggleDetail?
> > >
> > >
> > > regards
> > >
> > >
> > > --
> > > Murat HAZER
> > > http://www.projedunyasi.org
> >
> >
> >
>



--
Murat HAZER



Re: varDetailToggler and DataTable

2006-09-13 Thread Murat Hazer
I solved the problem by following way;this.dataModel= new HtmlDataTable();        this.dataModel.setStyleClass("standardTable");        this.dataModel.setHeaderClass("standardTable_SortHeader");
        this.dataModel.setFooterClass("standardTable_Footer");        this.dataModel.setRowClasses("standardTable_Row1,standardTable_Row2");        this.dataModel.setValue(this.yuzdeInfoList
);        this.dataModel.setVar("yuzdeInfo");        this.dataModel.setRowIndexVar("rowIndex");        this.dataModel.setRenderedIfEmpty(true);        this.dataModel.setPreserveDataModel
(false);//expand all         this.dataModel.expandAllDetails();but i couldn't find a way to set expandAllDetails attribute from the view...regards...On 9/13/06, 
Mike Kienenberger <[EMAIL PROTECTED]> wrote:
I have not looked at the code at all, but you might need to cyclethrough the row indexes and calldataTable.setRowIndex(index)before calling whatever method expands a detail.I'm sure that if you read the code, you'll figure it out -- if it can
be done by clicking, it should be doable programmically.On 9/13/06, Martin Grotzke <[EMAIL PROTECTED]> wrote:> Hello,>> On Mon, 2006-08-14 at 16:28 +0300, Murat Hazer wrote:
> > Hi,> >> >  How can i define the default value of the detailStamp facets to true?> > All of them are hidden (false) in the beggining.> >> >  Is there an attribute like expandAll and collapseAll?
> does anybody know how this is possible?>> I just tried to bind the datatable to the backing bean and invoke> expandAllDetails when the datatable is set, but this has not the> desired effect. Only when the detail toggler is clicked the first time
> the details cannot be collapsed any more after that.>> Any help on this topic?>> Thanx in advance,> Cheers,> Martin>>> >> >  Can i override the toggleDetail action of the toggleDetail?
> >> >> > regards> >> >> > --> > Murat HAZER> > http://www.projedunyasi.org>>
>-- Murat HAZER


Re: datatable with multiple images not interpretting rendered attribute

2006-09-13 Thread Toppac

Thanks for the response but it definately does not work. For some reason when
it is rendering the dataTable, whatever the first or last evaluation of the
expression is, gets applied to every instance of the image within the
datatable. It seems to cache the result of the EL expression for render and
then use that for all the images at render time, rather than each image
having its own value. I think this is a bug with myfaces



Mike Kienenberger wrote:
> 
> Of the code you posted, it looks ok to me.
> 
> However, id="#{index + 'working'}" is not legal.   id must be a static
> value.
> 
> 
> 
> On 9/12/06, Toppac <[EMAIL PROTECTED]> wrote:
>>
>> I am trying to use a datatable to render bunch of data and display an
>> image
>> next to each row rendered based on the rowIndex. My code is below. The
>> problem I am seeing is that inside the graphicImage tag, the index
>> doesn't
>> have scope. I can print the index before and after the graphicImage, but
>> when used inside the rendered attribute it always rendered to empty
>> string.
>> I tried to use the index as part of the id for the graphicImage,
>> something
>> like id="#{index + 'working'}" and it always rendered to just "working". 
>> I
>> have tried just using rowIndex, tried naming the rowIndexVar something
>> other
>> than index, and no luck. I am wondering how I can use the current index
>> inside other tags. I have also tried using JSTL tags c:if to do the
>> rendering and it looks like the index doesn't have scope inside there
>> either.
>>
>> The only other thing I can think may be wrong is that that the rendered
>> attribute of the graphicImage is only calculated once or is calculated
>> and
>> applied to all the rows. The last c:if I have in my code below does work,
>> so
>> it seems to only be something with the rowIndexVar inside a dataTable.
>>
>> Last thing, ignore typos in variable names, as I changed the names of the
>> variables to hide the real function of this code (requirement). And
>> currentItemIndex is a c:set var defined earlier in the page.
>>
>> > value="#{someData.someItems}"
>> border="0" cellpadding="0" cellspacing="0">
>> 
>> 
>>  
>> 
>> #{index} and #{currentItemIndex}
>> and #{(index - currentItemIndex) eq 0}
>> > rendered="#{(index - currentItemIndex) eq
>> 0}" value="snapc/images/icons/working.gif" />
>> > rendered="#{sf:isCompleteItem(curItem)
>> and ((index - currentItemIndex) ne 0)}"
>> value="snapc/images/icons/complete.gif" />
>> > rendered="#{!sf:isCompleteItem(curItem) and ((index - currentItemIndex)
>> ne
>> 0)}" value="snapc/images/icons/red_arrow.gif" />
>> 
>>
>> 
>> 
>> 
>> 
>> #{curItem.currentlYear}
>> 
>>
>>
>> 
>>  
>> 
>> > test="#{fn:length(someData.someItems) > 1}">
>> > type="submit"
>> id="edit">
>>
>> #{bundle.usage_editdetails_label}
>> > value="#{index}"/>
>> 
>>
>>   |  
>> > id="delete" >
>> #{bundle.usage_delete_label}
>> > name="deleteIndex" value="#{index}"/>
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://www.nabble.com/datatable-with-multiple-images-not-interpretting-rendered-attribute-tf2261743.html#a6275415
>> Sent from the MyFaces - Users forum at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/datatable-with-multiple-images-not-interpretting-rendered-attribute-tf2261743.html#a6293762
Sent from the MyFaces - Users forum at Nabble.com.



overriding resource bundle keys

2006-09-13 Thread Rogerio Pereira
Hi guys!Can i override an resource bundle keys?I mean:menu.properties:login=Loginothermenu.properties:

login=Other Login
and then in my page:that will return the key value inside othermenu.properties, this is possible?-- Yours truly (Atenciosamente),
Rogério (_rogerio_)http://faces.eti.br


Re: Using t:jscookmenu results in "cmDraw is not defined" error

2006-09-13 Thread Mike Kienenberger

Are the elements in your web.xml file in the order you show them?

Web.xml elements must be in a specific order -- probably some of your
configuration options are being ignored.

filters, then filter-mappings, then listeners, then servlets, then
servlet-filters.


On 8/30/06, Wally Hartshorn <[EMAIL PROTECTED]> wrote:

Can someone explain to me the basics of how to setup t:jscookmenu? When
I try to use it, instead of a menu, I get this JavaScript error: "cmDraw
is not defined"

I'm using MyFaces 1.1.3, Java 1.5, and Tomcat 5.5. My browser is
Firefox 1.5

Here's the JSP code:







Here's part of the web.xml file:


Faces Servlet
javax.faces.webapp.FacesServlet
1



Faces Servlet
*.faces



extensionsFilter

org.apache.myfaces.webapp.filter.ExtensionsFilter




extensionsFilter
Faces Servlet



extensionsFilter
/faces/myFacesExtensionResource/*


The documentation at http://myfaces.apache.org/tomahawk/jscookmenu.html
isn't very helpful.

It says that I need to "Add jscookmenu directory containing css and
scripting code to your web directory (you can find it in the examples
application)". However, I've been unable to find any such thing. I've
downloaded the binary distribution of myfaces-1.1.1-examples.zip,
unzipped it, and deployed simple.war, but there is no trace of a
jscookmenu directory in there.

It also says that I need to "Add scripts and stylesheets for the theme
you would like to use to html-header (see also inc/header.inc in the
examples application)". Again, no sign of any of these files in
simple.war.

According to http://wiki.apache.org/myfaces/JSCook_Menu, "The offical
docs seem to be out of date. You no longer have to include the
javascript, as that is now handled by the extensions filter." That would
explain why I can't seem to find any of this stuff in simple.war, but it
doesn't explain why I can't get it to work.

Can anyone point me in the right direction?

Thanks,
Wally



Re: WebLogic precompile error on in Tomahawk 1.1.5

2006-09-13 Thread Mike Kienenberger

Are you using newspaperTable?  If so, switch to t:dataTable instead.
The two were merged.  Not sure if this will help or not.  I can't
remember when newspaperOrientation was added, but it may have been
after the merge, and that attribute may not be on newspaperTable.


On 8/30/06, THIEN PHAM <[EMAIL PROTECTED]> wrote:

Hi,

I'm using WebLogic's JSP compiler to precompile a JSF
page that contains something like this:


  
  


The compile fails with Tomahawk 1.1.5 with this error:

"Error in using tag library
uri='http://myfaces.apache.org/tomahawk' prefix='t':
The Tag class
'org.apache.myfaces.custom.newspaper.HtmlNewspaperTableTag'
has no setter method corresponding to TLD declared
attribute 'newspaperOrientation', (JSP 1.1 spec,
5.4.1)"

This problem does not happen with Tomahawk 1.1.3. Does
anyone have any idea? Thanks.

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com



Re: Portlet examples needed by portlet/MyFaces users

2006-09-13 Thread Mike Kienenberger

I can't address everything you've brought up, but thanks for
contributing to the discussion!

1)  If you don't have TLD listeners, add this line to web.xml at the
correct position:

   
   
   
org.apache.myfaces.webapp.StartupServletContextListener
   

This was the "old way" of initializing MyFaces.

I still use it for jetty 5.x because jetty does not support
tld-registered listeners.

2)

Source code in MyFaces is not easy to navigate,
it's not downloable,


You can check it out from svn or grab it from the maven repositories.
I believe it will also be included in future MyFaces releases.



you have this "shared" thing with package names that change during build time 
etc


The key to remember is that shared-core is the authorative source.

From that shared-tomahawk and shared-impl are built.   Source files in

all three formats are again available from maven.

http://people.apache.org/maven-snapshot-repository/org/apache/myfaces/shared/myfaces-shared-impl/


I remember or encounter other glitches, I'll post them.


Better than posting would be updating the portlet section of the
MyFaces wiki.   Things posted to the mailing list are only visible for
a short time period and are hard to maintain.


On 9/13/06, Iordanov, Borislav (GIC) <[EMAIL PROTECTED]> wrote:

Hi,

I'm one of those portlet users. I could only make some suggestions and
outline what has worked so far me. Then, committers could decide what
and how to incorporate in the code. Subsequently, I could test releases
of MyFaces that don't need workarounds. Here are a few things:

1) I reported a problem yesterday on initialization of the
SerialFactory. This is actually more general than portlets. It turns out
state serialization is initialized in a listener declared in the MyFaces
TLD. I'm not 100% sure about this, but it seems that this works because
of a side effect of the way servlet containers work: usually they are
also JSP containers and scan JARs for tag libraries etc. However, an
application that does not use JSPs or that (as was my case) deploys
myfaces as a shared, server-wide library, breaks those assumptions and
the startup listener declared in the TLD is not called. MyFaces
initialization should probably be exposed as a well-documented API and
it should all be in one place.

2) The main problem with portlets is the use of extended components
(file upload, and components that require client-side libraries). File
upload works with a servlet filter in standalone applications. But
servlet filters don't work on portals. In a portal environment,
multipart processing can be placed in a "generic portlet" base class.
This is not done in MyFacesGenericPortlet, so I created my own by
copying over source code. As for JavaScript stuff, this will depend on
portlet containers. I think all of them have some means to plug in
common client-side resources. In WebSphere for example, one writes
themes and skins as JSP pages so it's easy to manage client-side code
sort of manually. My suggestion would be to expose this in MyFaces as a
well-documented API. The portlet spec will evolve at some point to
handle this requirement in a standard way. Currently, I'm not using any
of the components that require a JS library because I don't know how
much time I would loose to make it work. Source code in MyFaces is not
easy to navigate, it's not downloable, you have this "shared" thing with
package names that change during build time etc., so I'm reluctant to
dig into it to much.

For file upload, the solution is pretty simple. Here is how it works for
me:

a) I'm using commons-fileupload
B) in the processAction portlet method of MyFacesGenericPortlet, I have:

public void processAction(ActionRequest request, ActionResponse
response)
throws PortletException, IOException
{
if (log.isTraceEnabled()) log.trace("called processAction");

if (sessionTimedOut(request)) return;

setPortletRequestFlag(request);

if (PortletFileUpload.isMultipartContent(request))
request = new MultipartActionRequestWrapper(request);

FacesContext facesContext = facesContext(request, response);

// etc...

MultipartActionRequestWrapper is a simple wrapper class I wrote for an
ActionRequest that does the multipart processing based on
commons-fileupload facilities. The rest of the code is the same, relying
on the ActionRequest interface.

I remember or encounter other glitches, I'll post them.

Best,
Bolerio

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 13, 2006 12:22 PM
To: MyFaces User mailing list
Subject: Portlet examples needed by portlet/MyFaces users

We've had a number of bugs posted by users of MyFaces who are also
using Portlets.

Would one of those users like to contribute some MyFaces portlet
examples to aid us in fixing and debugging your issues?   I don't
think any of the currently-active MyFaces committers are using
portlets, so it's hard for

Re: varDetailToggler and DataTable

2006-09-13 Thread Mike Kienenberger

I have not looked at the code at all, but you might need to cycle
through the row indexes and call

   dataTable.setRowIndex(index)

before calling whatever method expands a detail.

I'm sure that if you read the code, you'll figure it out -- if it can
be done by clicking, it should be doable programmically.

On 9/13/06, Martin Grotzke <[EMAIL PROTECTED]> wrote:

Hello,

On Mon, 2006-08-14 at 16:28 +0300, Murat Hazer wrote:
> Hi,
>
>  How can i define the default value of the detailStamp facets to true?
> All of them are hidden (false) in the beggining.
>
>  Is there an attribute like expandAll and collapseAll?
does anybody know how this is possible?

I just tried to bind the datatable to the backing bean and invoke
expandAllDetails when the datatable is set, but this has not the
desired effect. Only when the detail toggler is clicked the first time
the details cannot be collapsed any more after that.

Any help on this topic?

Thanx in advance,
Cheers,
Martin


>
>  Can i override the toggleDetail action of the toggleDetail?
>
>
> regards
>
>
> --
> Murat HAZER
> http://www.projedunyasi.org





Re: Tomahawk - panelNavigation2 with facelets

2006-09-13 Thread Mike Kienenberger

Note that with Myfaces 1.1.4 and higher, you're required to use h:form
tags around these components at all times.


On 8/31/06, Kumar, Abhilash (Gok) <[EMAIL PROTECTED]> wrote:

Hello :

  I have solved the problem. You have to add  tag around
 tag to make it work with facelets. Also, don't put
he form tag outside the div tags because then the style is not applied
correctly.

Thanks and regards,

-- Kannan

-Original Message-
From: Kumar, Abhilash (Gok)
Sent: Wednesday, August 30, 2006 9:55 PM
To: users@myfaces.apache.org
Subject: Tomahawk - panelNavigation2 with facelets

Hello:

   I am struggling to get the PanelNavigation with NavigationMenuItems
(Dynamic) example working with Facelets. The problem is that the
javascript function which will be called in the onclick of the div is
not generated in the page. This problem appear only when I use the
component with facelets. I have define the tomahawk.taglib.xml for
facelets which includes the navigationMenuItem and navigationMenuItems
tags.

I am using the following versions ;

tomahawk-1.1.3.jar
myfaces-impl-1.1.3.jar
myfaces-api-1.1.3.jar
jsf-facelets-1.1.11.jar

I have added the myfaces extensions filter in the web.xml also. I was
able to set up the file upload tomahawk component.
Below are my files.Can anyone pls tell what I have to do get this
working ?

Thanks and regards,

-- Kannan

1. template.xhtml - layout definition



http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";
  xmlns:ui="http://java.sun.com/jsf/facelets";
  xmlns:h="http://java.sun.com/jsf/html";
  xmlns:f="http://java.sun.com/jsf/core";>


Seam Generated Template









   




2. Navigation page

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
http://www.w3.org/1999/xhtml";
  xmlns:s="http://jboss.com/products/seam/taglib";
  xmlns:ui="http://java.sun.com/jsf/facelets";
  xmlns:f="http://java.sun.com/jsf";
  xmlns:h="http://java.sun.com/jsf/html";
  xmlns:t="http://myfaces.apache.org/tomahawk";>



  
   
   
   
   
   
   






3. Backing Bean


import java.util.ArrayList;
import java.util.List;
import org.apache.myfaces.custom.navmenu.NavigationMenuItem;

public class Menu {

public Menu(){ }


public List getPanelNavigationItems() {


List menu = new ArrayList();
NavigationMenuItem products = new NavigationMenuItem("Products",
"#{navigationMenu.getAction}");

menu.add(products);
products.add(new NavigationMenuItem("P1",
"#{navigationMenu.getAction}"));
products.add(new NavigationMenuItem("P3",
"#{navigationMenu.getAction}"));



NavigationMenuItem corporateInfo = new
NavigationMenuItem("Info", "#{navigationMenu.getAction}");
menu.add(corporateInfo);
corporateInfo.add(new NavigationMenuItem("I1",
"#{navigationMenu.getAction}"));
corporateInfo.add(new NavigationMenuItem("I2",
"#{navigationMenu.getAction}"));
menu.add(new NavigationMenuItem("help",
"#{navigationMenu.getAction}"));
return menu;
}

public String getAction()
{
return "go_panelnavigation_2";
}
}














Re: have t:dataTable, need to get the rowIndex into a javascript var

2006-09-13 Thread Mike Kienenberger

I don't know what the best way to do this is, but you're going to need
to put your outputText component inside a column of the dataTable in
order for the rowIndexAsString part to work.  Maybe stick it in as a
hidden field.   Then use javascript to read the value for that field.
Note that the id for each field in the table is going to be different.

On 8/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

we're running myfaces and tomahawk 1.1.3

I have a dataTable where I need to get the rowIndex of the first row
displayed on a page
(this table has many rows/pages).

I found this example on the web
var b = '';

I coded this
var index = '';

and put it within a script/function func()
on a jsp page, where the function is called by a command button.

The value of the property from outputText is displayed on the page,
which I don't want, and an alert in the js function shows nothing in the
var.

Is this the correct way to pull a value into js? Can you point me
to a reference or examples?

Thanks in advance for your help.
Tom




This message is intended for the recipient only and is not meant to be 
forwarded or distributed in any other format. This communication is for 
informational purposes only.  It is not intended as an offer or solicitation 
for the purchase or sale of any financial instrument, or security, or as an 
official confirmation of any transaction.  Putnam does not accept purchase or 
redemptions of securities, instructions, or authorizations that are sent via 
e-mail.   All market prices, data and other information are not warranted as to 
completeness or accuracy and are subject to change without notice.  Any 
comments or statements made herein do not necessarily reflect those of Putnam, 
LLC (DBA Putnam Investments) and its subsidiaries and affiliates.  If you are 
not the intended recipient of this e-mail, please delete the e-mail.



Re: varDetailToggler and DataTable

2006-09-13 Thread Martin Grotzke
Hello,

On Mon, 2006-08-14 at 16:28 +0300, Murat Hazer wrote:
> Hi,
> 
>  How can i define the default value of the detailStamp facets to true?
> All of them are hidden (false) in the beggining.
> 
>  Is there an attribute like expandAll and collapseAll?
does anybody know how this is possible?

I just tried to bind the datatable to the backing bean and invoke
expandAllDetails when the datatable is set, but this has not the
desired effect. Only when the detail toggler is clicked the first time
the details cannot be collapsed any more after that.

Any help on this topic?

Thanx in advance,
Cheers,
Martin


> 
>  Can i override the toggleDetail action of the toggleDetail? 
> 
> 
> regards
>   
> 
> -- 
> Murat HAZER
> http://www.projedunyasi.org


signature.asc
Description: This is a digitally signed message part


RE: Portlet examples needed by portlet/MyFaces users

2006-09-13 Thread Iordanov, Borislav \(GIC\)
Hi again,

Another thing I had to do to ease JSP development.

3) I wrote a replacement of the JSF link tag that works in both servlet
and portlet environments seamlessly (actually I develop most of the code
as plain standalone application and then portalize it). In a portlet
context, JSP are passed as "VIEW_ID" to the MyFaces portlet, so when if
you have a JSP and you want to link to another JSP in your application,
you need to construct the special portal URL. 

You might put something like this in tomahawk (if it's not already
there, but I didn't find anything).

Here is my code(ignore the ELSupport stuff, I just add JSTL EL
support to all my tags, I find it idiotic that almost none of the JSF
tag attributes accept runtime expressions ):

public class UILinkTag extends HtmlOutputLinkTag
{
private String target;

private String relativeToAbsolute(FacesContext ctx, String
value)
{
String relativePath = ctx.getViewRoot().getViewId();
relativePath = relativePath.substring(0,
relativePath.lastIndexOf('/'));
return relativePath + "/" + value;  
}

public void setValue(String value)
{
FacesContext context = FacesContext.getCurrentInstance();

if (UIComponentTag.isValueReference(value)) {
ValueBinding vb =
context.getApplication().createValueBinding(value);
value = (String)vb.getValue(context);
}
else if (ELSupport.isEL(value))
value = (String)ELSupport.eval(value, String.class,
pageContext);

if (value != null && value.length() > 0 &&
value.indexOf("://") == -1)
{
if (!value.startsWith("/")) 
value = relativeToAbsolute(context,
value);
if (context.getExternalContext() != null && 
context.getExternalContext().getResponse() instanceof
RenderResponse)
{
if (target == null)
{
PortletURL url =
((RenderResponse)context.getExternalContext().getResponse()).createRende
rURL();

url.setParameter(MDCPortlet.VIEW_ID, value);
value = url.toString();
}
else
value =
context.getExternalContext().encodeResourceURL(value);
}
else if (value != null && value.length() > 0)
value = "/faces" + value;
}
super.setValue(value);
}

public void setTarget(String target)
{
this.target = target;
if (target.length() == 0)
target = null;
super.setTarget(target);
}
}

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 13, 2006 12:22 PM
To: MyFaces User mailing list
Subject: Portlet examples needed by portlet/MyFaces users

We've had a number of bugs posted by users of MyFaces who are also
using Portlets.

Would one of those users like to contribute some MyFaces portlet
examples to aid us in fixing and debugging your issues?   I don't
think any of the currently-active MyFaces committers are using
portlets, so it's hard for us to see your problems or test patches.

Thanks!


RE: Portlet examples needed by portlet/MyFaces users

2006-09-13 Thread Iordanov, Borislav \(GIC\)
Hi,

I'm one of those portlet users. I could only make some suggestions and
outline what has worked so far me. Then, committers could decide what
and how to incorporate in the code. Subsequently, I could test releases
of MyFaces that don't need workarounds. Here are a few things:

1) I reported a problem yesterday on initialization of the
SerialFactory. This is actually more general than portlets. It turns out
state serialization is initialized in a listener declared in the MyFaces
TLD. I'm not 100% sure about this, but it seems that this works because
of a side effect of the way servlet containers work: usually they are
also JSP containers and scan JARs for tag libraries etc. However, an
application that does not use JSPs or that (as was my case) deploys
myfaces as a shared, server-wide library, breaks those assumptions and
the startup listener declared in the TLD is not called. MyFaces
initialization should probably be exposed as a well-documented API and
it should all be in one place. 

2) The main problem with portlets is the use of extended components
(file upload, and components that require client-side libraries). File
upload works with a servlet filter in standalone applications. But
servlet filters don't work on portals. In a portal environment,
multipart processing can be placed in a "generic portlet" base class.
This is not done in MyFacesGenericPortlet, so I created my own by
copying over source code. As for JavaScript stuff, this will depend on
portlet containers. I think all of them have some means to plug in
common client-side resources. In WebSphere for example, one writes
themes and skins as JSP pages so it's easy to manage client-side code
sort of manually. My suggestion would be to expose this in MyFaces as a
well-documented API. The portlet spec will evolve at some point to
handle this requirement in a standard way. Currently, I'm not using any
of the components that require a JS library because I don't know how
much time I would loose to make it work. Source code in MyFaces is not
easy to navigate, it's not downloable, you have this "shared" thing with
package names that change during build time etc., so I'm reluctant to
dig into it to much.

For file upload, the solution is pretty simple. Here is how it works for
me:

a) I'm using commons-fileupload
B) in the processAction portlet method of MyFacesGenericPortlet, I have:

public void processAction(ActionRequest request, ActionResponse
response)
throws PortletException, IOException
{
if (log.isTraceEnabled()) log.trace("called processAction");

if (sessionTimedOut(request)) return;

setPortletRequestFlag(request);

if (PortletFileUpload.isMultipartContent(request))
request = new MultipartActionRequestWrapper(request);

FacesContext facesContext = facesContext(request, response);

// etc...

MultipartActionRequestWrapper is a simple wrapper class I wrote for an
ActionRequest that does the multipart processing based on
commons-fileupload facilities. The rest of the code is the same, relying
on the ActionRequest interface.

I remember or encounter other glitches, I'll post them.

Best,
Bolerio

-Original Message-
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 13, 2006 12:22 PM
To: MyFaces User mailing list
Subject: Portlet examples needed by portlet/MyFaces users

We've had a number of bugs posted by users of MyFaces who are also
using Portlets.

Would one of those users like to contribute some MyFaces portlet
examples to aid us in fixing and debugging your issues?   I don't
think any of the currently-active MyFaces committers are using
portlets, so it's hard for us to see your problems or test patches.

Thanks!


[OT][ANN] REMINDER: JAVAWUG BOF 22 / Sun London / 20 Sept 2006 @ 18:30 / featuring Jason van Zyl, Maven 2.0

2006-09-13 Thread Peter . Pilgrim
Hi

``JAVAWUG'' (The Java Web User Group) is holding the twenty second 
Birds-of-Feather 22 at the Sun's London Office on Wednesday, 
20th September 2006 from 18:30 onwards.


For more information 
http://www.jroller.com/page/javawug?entry=announcement_javabof_xxii_jaso
n_van 

The confirmed speakers are:

Jason van Zyl - Architect  - Maven 2.0

Jason van Zyl presents the architecture and infrastructure
behind the declaration software construction framework called
``Maven''.

Jason van Zyl is the Chief Architect and co-founder of
``Mergere, Inc''. Jason co-founded Mergere to deliver an open
source-based build platform for dynamic, distributed,
enterprise-level Java(TM) projects requiring leading-edge
resource orchestration and build management. Jason has over 10
years of enterprise software development experience working
primarily for Fortune 500 companies. Jason is heavily involved
with open source: he is the lead in the development of several
open source projects including Plexus, Modello, and Continuum.


Afterwards members can retire to the nearby bar and restuarant (TBA) ...

(We will probably get started closer to 7pm to allow members who
are out of town to commute in)


The address is:

Sun Microsystems Ltd.
Customer Briefing Centre -- Cheapside Theatre
Regis House
45 King William Street
London
EC4R 9AN

Map (http://uk.sun.com/aboutsun/location/map-london-1.html)


If you would like to attend :

Please REGISTER so that you can be added to the Sun Security Detail.

Join the ``http://groups.google.com/group/javawug'' JAVAWUG at 
Google Groups and Send a mail to the list you are attending 

http://jroller.com/page/javawug

Thanks very much


--
Peter Pilgrim
UBS Investment Bank, 
PTS Portal / IT FIRC OPS LDN,
100 Liverpool Street, London EC2M 2RH, United Kingdom
+44 (0) 20 75 75692
:: Java EE / E-Commerce / Enterprise Integration / Development ::

Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.



Portlet examples needed by portlet/MyFaces users

2006-09-13 Thread Mike Kienenberger

We've had a number of bugs posted by users of MyFaces who are also
using Portlets.

Would one of those users like to contribute some MyFaces portlet
examples to aid us in fixing and debugging your issues?   I don't
think any of the currently-active MyFaces committers are using
portlets, so it's hard for us to see your problems or test patches.

Thanks!


RE: AJAX for JSF

2006-09-13 Thread Adam Brod

Avatar  / Dynamic Faces is not
production ready (see the website: jsf-extensions.dev.java.net).  However,
it does have the backing of many JSF spec members.  The Ajax4Jsf team
is working with the jsf-extensions team and they have committed to being
compatible in the future.  So Ajax4Jsf is a great place to start right
now.

Adam Brod
Product Development Team






"Frank Russo"
<[EMAIL PROTECTED]> 
09/12/2006 03:59 PM



Please respond to
"MyFaces Discussion" 





To
"MyFaces Discussion"



cc



Subject
RE: AJAX for JSF








What about the JSF-Extensions project? Isn't the Avatar
solution there
closer to what will be in the future spec? If so, I think it might be
better to start with that. Does anyone know if it is production ready,
though? That would be my only concern...

Frank Russo
Senior Developer
FX Alliance, LLC


-Original Message-
From: Aleksei Valikov [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 12, 2006 11:21 AM
To: MyFaces Discussion
Subject: Re: AJAX for JSF

Hi.

> AJAX and JSF can definitely work together, but it's tricky because

> AJAX can't be added incrementally; it has to be built into the JSF

> components themselves.

ajax4jsf is capable of adding AJAX functionality to the existing JSF
components. 
That's the incremental addition you talk about.

> You might also want to some commercial JSF frameworks that support
AJAX. 
>  I've looked at ICEfaces a little and it seemed like it was on
the 
> right track.  There may be something along those lines in Oracle
ADF 
> at some point as well.  And the status of the open-source ones
seem to

> change monthly if not weekly.

ICEFaces has a pretty nice idea that, I think, can be adapted. They hav
so-called direct-to-DOM render kit. That is, components are rendered not
as plain text but as a DOM tree. This allows easily identify subtrees
that have to be synchronized with the client. What client sees in his
browser is just a replication of the server-side DOM tree, synchronized
via AJAX.

ajax4jsf uses a different approach. When you use AJAX controls from
ajax4jsf or ajaxify existing controls with their a4j:support, you
provide (1) hook onto client-side event that triggers AJAX
synchronization and (2) (possibly via value
binding) a ids of the components which have to be rerender. Server-side
AJAX handler then renders selected components and sends the result back
to the browser.

The only problem with existing controls is that they need to be rendered
as valid XML in order to be transferrable and parseable on the client
side. 
ICEFaces solves this problem with own render kit (if you render DOM,
it's already valid XML after all), ajax4jsf uses JTidy filter to clean
up possibly malformed XML produced by components and their renderers.

By the way, requiring HTML but not XHTML was in my point of view an
awful decision. Otherwise all the JSF component were ajaxifiable out of
the box.

Bye.
/lexi




Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.


Re: Start project?

2006-09-13 Thread Werner Punz
Christoph Lassner schrieb:
> Yes, it is possible, but connected to quite some bits of work (because u
> have to use other components, etc.). You should have a closer look at the
> components you need and then decide for a framework. However, like I said,
> if you really want to change your framework in some time, it will be
> possible.
> 
> Regards
> Chris
> 
> 
Besides that there is an ongoing work to reduce the incompatibilities
between the two codebases, in most cases it now should be possible
to mix both component sets without too much problems.

But you have to go for the nightly builds to be fully able to do it,
the last stable versions still had major issues, which have been cleared
up a few weeks ago.



Re: How does RedirectTrackerManager

2006-09-13 Thread Aleksei Valikov

Hi.


I've got a bit of problem here with JSF. Somehow, i get my backing bean
linked to the session, while they should be request time only.


Here is my situation

engineBean (request scope) is created by JSF (coming from a 
section in config)
 it returns an array of AssignmentBean, using various information from
current user's account. Those bean are wrappers around a proprietary object
then a jsp page has a datatable showing those AssignmentBean (using a
value binding in form #{engineBean.assignments}) using HtmlOutput tags


Questions:
1) How comes those beans, which are supposed to have a request scope
only, end up stored in the session scope object
"org.apache.myfaces.custom.redirectTracker.RedirectTrackerManager"
2) How to prevent this, considering those AssignmentBean are not
serializable and will never be, and a such should never reach the
session level.

Thanks for information, currently this lead to bunch of exception when
stopping tomcat because user sessions can not be serialized anymore!


The probem with request scope beans is that they get lost during the redirect. 
If you have a request scoped bean and get redirected (for instance if you invoke 
an action that navigates you to another page and it's redirect in navigation), 
you will actually get two requests. Consequently all the request beans 
instantiated on the first request will not appear in the second request. This 
may be a problem for many applications.


The solution is to track down redirects. Every time a redirect is executed, a 
special token is appended to the target URL. Then, upon receiving the second 
request, this token may be used to identify the redirect transition. This allows 
saving request beans in the session using the token before redirect and restore 
them for the request scope right after the redirect.


This allows request scope beans survive the redirect (and answers your first 
question).


As for the second question. In order to avoid serialization problems you 
session-based storage of request beans should be transient. If it's not the case 
in MyFaces, then it's a bug. File it or try to correct it yourself.


Bye.
/lexi


Re: Implementing Printable View for dataTable: Problem with target="_blank"?

2006-09-13 Thread Paul Spencer

Mjovanov,
I just have time for short answers.  You will need to do the research.

1) Media specific CSS Classes may be the answer.  This way the user 
prints from the browser without the need of a "Printable Format" page.


2) Shale Dialogs.  http://shale.apache.org.


Paul Spencer



mjovanov wrote:

Hello,

Please consider the following scenario: a page with a dataTable component
and a backing bean with two DataModel properties, one for the rows (binding
to the 'value' attribute of the dataTable) and one for columns (binding to
the 'value' attribute of the nested t:columns tag).  The backing bean is
configured in faces-config.xml to 'request' scope, but is being serialized
between requests by using the t:saveState tag (so that paging for example
would not require additional hits to the database).  So far everything is
working as expected.  However, problems arise when I try to implement a link
on the page that allows a user to open the table in a new window, and
without paging (for printing purposes).  The catch is that I want to be able
to still use the same backing bean so that the data doesn’t have to be
retrieved again, and also so that the sort would be preserved.  Could anyone
suggest the approach to take?  I tried the following:

Define a commandLink component and bind it to an action method on the
backing bean, like this:


alt="#{msg.labelPrintQueueSumm}" width="21" height="14" /> 




The body of the action method would then look like something like this:

  public void forwardToPrintView() throws IOException, ServletException {
  HttpServletRequest request = (HttpServletRequest)getRequest();
  HttpServletResponse response = (HttpServletResponse)getResponse();
  request.setAttribute("rows", rows.getWrappedData());
  request.setAttribute("columns", columns.getWrappedData());
  request.getRequestDispatcher("/workbenchPrint.faces").forward(request,
response);
  getFacesContext().responseComplete();
  }


However this only works one time; after that I start seeing some really
weird behavior, like all links on the original page that were previously
working correctly start opening content in a new window?!  At first I though
there may be a problem with the target=”_blank” attribute, but when I
switched the commandLink component to an outputLink and had it point to
another page all together (without accessing the serialized backing bean)
the problem went away; could it be that the JSF state some how got
corrupted?  Any suggestions/clues would be greatly appreciated.

PS  I was able to get very similar functionality to work for "Exporting to
Excel"; the action method for this looks like this:

  public void exportHtmlTableToExcel() throws IOException{

  /*Set the filename
  DateTime dt = new DateTime();
  DateTimeFormatter fmt =
DateTimeFormat.forPattern("-MM-dd_HHmmss");
  String filename = dt.toString(fmt) + ".xls";*/

  //Setup the output

  String contentType = "application/vnd.ms-excel";
  FacesContext fc = FacesContext.getCurrentInstance();
  String filename = fc.getExternalContext().getUserPrincipal().getName()
+ "-"+ System.currentTimeMillis() + ".xls";
  HttpServletResponse response =
(HttpServletResponse)fc.getExternalContext().getResponse();
  response.setHeader("Content-disposition", "attachment; filename=" +
filename);
  response.setContentType(contentType);

  //Write the table back out

  PrintWriter out = response.getWriter();
  //First write column headings
  List columnList = (List)columns.getWrappedData();
  for (Iterator it = columnList.iterator(); it.hasNext(); ) {
  out.print(((TableColumnDTO)it.next()).getLabel() + "\t");
  }
  out.println();
  List data = (List)rows.getWrappedData();
  for (Iterator i = data.iterator(); i.hasNext(); ) {
  List row = (List)i.next();
  for (Iterator j = row.iterator(); j.hasNext(); ) {
  Object value = j.next();
  out.print((value != null ? value : "") + "\t");
  }
  out.println();
  }
  out.close();
  fc.responseComplete();
  }

One important difference to note is that the link for "Exporting to Excel"
does not have the target attribute set to '_blank' (since the content type
would force another application to handle it, thus opening it in a new
window automatically).




Re: Horizontal Panel Navigation - panelNavigation2

2006-09-13 Thread Rolf Mertig


janw wrote:
> 
> Hello,
> 
> I too don't get the navigationMenu to work.
> @Rolf: The horizontal navigation works for you? Which myfaces version?
> ...
> 

Yes, it works for me. I use some newer build from  
http://people.apache.org/builds/myfaces/nightly/
but I do not  think that it matters much.

There are two issues here, I think:
1.:  I changed the original posting such that it works (with the default
basic.css from the tomahawk simple examples):
   http://www.nabble.com/user-files/235993/menu.jsp menu.jsp 

2.:  However, the real issue is that the included HMenuIEHover.js java
script  (look at the HTML source to see:
  

Re: Start project?

2006-09-13 Thread Mike Kienenberger

On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:

I'm new to the Mailling List and I have two very easy questions, until I'm a
little bit confused about Tomahawk, ADF Faces from Oracle and Sandbox:

What is at the moment the best way to start a project? Should I use the ADF
Faces from Oracle an Myfaces together? Or instead of ADF Faces from Oracle,
Tomahawk and/or Sandbox?


I'd recommend you start with only MyFaces Core.

Don't add in Tomahawk, Tomahawk Sandbox, Trinidad (or ADFFaces),
Tobago, or Jenia4Faces until you need them.

Alternately, determine what you want your user interface to look like,
and see which of the libraries provide the (most) components you need.

Jenia4Faces, Tomahawk, and Tomahawk sandbox can be used with any
"standard" component library set.

Tobago cannot be used with any other rendering component set.
However, it's worth evaluating Tobago for its layout and skinning
features, and it may already do everything you need.

Trinidad also has some restrictions on what other rendering components
you can use with it, but they are far less restrictive than Tobago.
Some of those restrictions will also be addressed and removed as time
goes by.


Implementing Printable View for dataTable: Problem with target="_blank"?

2006-09-13 Thread mjovanov

Hello,

Please consider the following scenario: a page with a dataTable component
and a backing bean with two DataModel properties, one for the rows (binding
to the 'value' attribute of the dataTable) and one for columns (binding to
the 'value' attribute of the nested t:columns tag).  The backing bean is
configured in faces-config.xml to 'request' scope, but is being serialized
between requests by using the t:saveState tag (so that paging for example
would not require additional hits to the database).  So far everything is
working as expected.  However, problems arise when I try to implement a link
on the page that allows a user to open the table in a new window, and
without paging (for printing purposes).  The catch is that I want to be able
to still use the same backing bean so that the data doesn’t have to be
retrieved again, and also so that the sort would be preserved.  Could anyone
suggest the approach to take?  I tried the following:

Define a commandLink component and bind it to an action method on the
backing bean, like this:


 



The body of the action method would then look like something like this:

  public void forwardToPrintView() throws IOException, ServletException {
  HttpServletRequest request = (HttpServletRequest)getRequest();
  HttpServletResponse response = (HttpServletResponse)getResponse();
  request.setAttribute("rows", rows.getWrappedData());
  request.setAttribute("columns", columns.getWrappedData());
  request.getRequestDispatcher("/workbenchPrint.faces").forward(request,
response);
  getFacesContext().responseComplete();
  }

However this only works one time; after that I start seeing some really
weird behavior, like all links on the original page that were previously
working correctly start opening content in a new window?!  At first I though
there may be a problem with the target=”_blank” attribute, but when I
switched the commandLink component to an outputLink and had it point to
another page all together (without accessing the serialized backing bean)
the problem went away; could it be that the JSF state some how got
corrupted?  Any suggestions/clues would be greatly appreciated.

PS  I was able to get very similar functionality to work for "Exporting to
Excel"; the action method for this looks like this:

  public void exportHtmlTableToExcel() throws IOException{

  /*Set the filename
  DateTime dt = new DateTime();
  DateTimeFormatter fmt =
DateTimeFormat.forPattern("-MM-dd_HHmmss");
  String filename = dt.toString(fmt) + ".xls";*/

  //Setup the output
  String contentType = "application/vnd.ms-excel";
  FacesContext fc = FacesContext.getCurrentInstance();
  String filename = fc.getExternalContext().getUserPrincipal().getName()
+ "-"+ System.currentTimeMillis() + ".xls";
  HttpServletResponse response =
(HttpServletResponse)fc.getExternalContext().getResponse();
  response.setHeader("Content-disposition", "attachment; filename=" +
filename);
  response.setContentType(contentType);

  //Write the table back out
  PrintWriter out = response.getWriter();
  //First write column headings
  List columnList = (List)columns.getWrappedData();
  for (Iterator it = columnList.iterator(); it.hasNext(); ) {
  out.print(((TableColumnDTO)it.next()).getLabel() + "\t");
  }
  out.println();
  List data = (List)rows.getWrappedData();
  for (Iterator i = data.iterator(); i.hasNext(); ) {
  List row = (List)i.next();
  for (Iterator j = row.iterator(); j.hasNext(); ) {
  Object value = j.next();
  out.print((value != null ? value : "") + "\t");
  }
  out.println();
  }
  out.close();
  fc.responseComplete();
  }

One important difference to note is that the link for "Exporting to Excel"
does not have the target attribute set to '_blank' (since the content type
would force another application to handle it, thus opening it in a new
window automatically).
-- 
View this message in context: 
http://www.nabble.com/Implementing-Printable-View-for-dataTable%3A-Problem-with-target%3D%22_blank%22--tf2265822.html#a6287426
Sent from the MyFaces - Users forum at Nabble.com.



How does RedirectTrackerManager

2006-09-13 Thread David Delbecq
Hello,

I've got a bit of problem here with JSF. Somehow, i get my backing bean
linked to the session, while they should be request time only.


Here is my situation

engineBean (request scope) is created by JSF (coming from a 
section in config)
 it returns an array of AssignmentBean, using various information from
current user's account. Those bean are wrappers around a proprietary object
then a jsp page has a datatable showing those AssignmentBean (using a
value binding in form #{engineBean.assignments}) using HtmlOutput tags


Questions:
1) How comes those beans, which are supposed to have a request scope
only, end up stored in the session scope object
"org.apache.myfaces.custom.redirectTracker.RedirectTrackerManager"
2) How to prevent this, considering those AssignmentBean are not
serializable and will never be, and a such should never reach the
session level.

Thanks for information, currently this lead to bunch of exception when
stopping tomcat because user sessions can not be serialized anymore!


Re: initialization of state serialization within a portal environment

2006-09-13 Thread Dave Brondsema
Are you guys familiar with
http://issues.apache.org/jira/browse/MYFACES-1338 which I think is very
closely related?

Iordanov, Borislav (GIC) wrote:
> Hi,
> 
> Thanks for prompt response. 
> 
> MyFaces currently integrates with portlets with a MyFacesGenericPortlet
> which contains faces initialization code. I think this replaces some
> other listener usually declared in web.xml (don't remember anymore). In
> any case, why have is state serialization initialized separately from
> the rest of MyFaces init code at all?
> 
> I think the listener is not being called because it's declared in a TLD
> and myfaces-impl.jar is placed as a common, shared library on the
> server, i.e. not attached to a particular web context.
> 
> In general, it would be a good idea to place initialization stuff in
> classes that are not bound to a particular execution environment (e.g.
> have the startup listener, or the portlet init method call a
> "MyFacesBootstrap" class or something). It's a small refactoring task,
> but it'll avoid that duplication of the init program.
> 
> If I place the initialization code in the portlet (copied over and
> called handleSerialFactory from the startup listener), it works...
> 
> Best,
> Bolerio
> 
> -Original Message-
> From: Dennis Byrne [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, September 12, 2006 4:43 PM
> To: MyFaces Discussion
> Subject: Re: initialization of state serialization within a portal
> environment
> 
> Hi Borislav,
> 
> I am the author of your problem, but I am not a Portlet developer.
> Perhaps I can help you fix this and you can educate me more on portlets?
> 
> Why isn't StartupServletContextListener is called?
> 
> What happens if you can fire something like this as your application
> starts ...
> 
> if(servletContext.getInitParameter(StateUtils.INIT_SECRET) != null ||
> servletContext.getInitParameter(StateUtils.INIT_SECRET.toLowerCase()) !=
> null)
> StateUtils.initSecret(servletContext);
> 
> Which version of MyFaces are you using?
> 
> If anyone has ideas as to how MyFaces can fix this, be heard here.
> 
> Dennis Byrne
> 
>> -Original Message-
>> From: Iordanov, Borislav \(GIC\) [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, September 12, 2006 04:21 PM
>> To: users@myfaces.apache.org
>> Subject: initialization of state serialization within a portal
> environment
>> Hi,
>>
>>
>>
>> I get this in WebSphere Portal:
>>
>>
>>
>> Caused by: java.lang.NullPointerException: serialFactory
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> org.apache.myfaces.shared_impl.util.StateUtils.getAsByteArray(StateUtil
> s
>> .java:174)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> org.apache.myfaces.shared_impl.util.StateUtils.construct(StateUtils.jav
> a
>> :150)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> org.apache.myfaces.renderkit.html.HtmlResponseStateManager.writeState(H
> t
>> mlResponseStateManager.java:73)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> org.apache.myfaces.application.jsp.JspStateManagerImpl.writeState(JspSt
> a
>> teManagerImpl.java:430)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> org.apache.myfaces.taglib.core.ViewTag.doAfterBody(ViewTag.java:145)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> org.apache.jsp._srselect._jspService(_srselect.java:942)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.jav
> a
>> :89)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.servic
> e
>> (JspServlet.java:344)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServle
> t
>> .java:683)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:
> 7
>> 81)
>>
>> [9/12/06 16:00:33:839 EDT] 5fd004e0 SystemErr R   at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>
>>
>>
>> It's because the StartupServletContextListener is not called.
>> Initialization actually happens in the portlet itself (faces-config.xml
>> is parsed there etc.). Any suggestion of how to deal with this issue?
>> Just copy & paste the code from StartupServletContext in my portlet?
>> What would be a fix within myfaces?
>>
>>
>>
>> Regards,
>>
>> Bolerio
>>
>>
> 
> 


-- 
Dave Brondsema
Software Developer
Cornerstone University



signature.asc
Description: OpenPGP digital signature


myfaces + dojo = Error running scripts from content:[object Error].

2006-09-13 Thread Igor devor
Hi,
 
I have include some dojo in jsf page, an use some ajax.
But in internet explorer i have an error after dojo load an page : 
Error running scripts from content:[object Error].

I serach and i find why :
 
MyFace generate this javascript : 
 

Re: several tabbedPanes with several extended datatables: VM crash!

2006-09-13 Thread Gerald Müllan

The bugs are fixed more or less due to priorization, if they are major
bugs or not and if they affect working with myfaces in general.

There are also bugs which are not fixed at any time, because of lack
of interest.

In your case I don`t know, i can not remember any issue which goes
near the problem you have. So, don`t count to much on a solution to
this issue.

Maybe there is another problem, beyond a bug...

cheers,

Gerald

On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED]> wrote:

I'm going to do this.
But in which order the bugs will be fixed?
Via priorization?
Some months ago I added a bug but I don't know until yet at which time this
bug will be fixed.
Could you explain the system, please.


regards,
Steven

2006/9/13, Gerald Müllan <[EMAIL PROTECTED]>:
> Well, difficult in this case to meet the problem.
>
> If you got the exact hitch, would be good if you could add a jira issue.
>
> cheers,
>
> Gerald
>
> On 9/13/06, Stefan Gesigora < [EMAIL PROTECTED]> wrote:
> > Hi!
> >
> > Thanks for your answer!
> >
> > Not all dataTables should be displayed at once.
> > I've tried to set rendered attribute so that only the requested
dataTables
> > were rendered BUT
> > the problem was still the same!!
> >
> > Now I try another approach:
> > I use serverside tabs with 5 datatables. The content of the last 5
> > datatables were shown int the 6. datatable:
> > I switch the underlying model, the tab label and the shown columns
depending
> > of the selected tab pane.
> > It sounds awful but at this time it works (but work isn't still finished
> > yet).
> >
> > Although I think its a BUG !? Cause the problems shouldn't happen if
only
> > some of the datatables were rendered...
> >
> > What do you think?
> >
> > Regards,
> > Steven
> >
> > 2006/9/13, Gerald Müllan < [EMAIL PROTECTED]>:
> > > The nullpointers may come from the fact, that the underlying dataModel
> > > cannot be found.
> > > But this problem should be gone if setting preserveDataModel to true.
> > >
> > > Is it a need to display all dataTables at once?
> > >
> > > What about only displaying some table-headers, and only if the user
> > > whishes to see the entries, the tables are expanded. In this case the
> > > tables will not be rendered at once.
> > >
> > > regards,
> > >
> > > Gerald
> > >
> > > On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED] > wrote:
> > > > Hi Gerald!
> > > >
> > > > My extended dataTables holds DTOs with several attributes.
> > > > Every dataTable can have an empty list up to a list with n elements.
> > > > At my tests the lists are between 0 antd 15 elements.
> > > >
> > > > Yes, I've rendered everytime every table after trying the
> > preserveDataModel
> > > > attribute first.
> > > > The effect was the same...
> > > >
> > > > I've used the backing-bean in session mode and my jsp is composed
with
> > > > jsp:incluce and 4 different jsps.
> > > > At the last jsp there are the datatables and tabbedPanes...
> > > > The whole thing happened in a myfaces portlet.
> > > >
> > > > One or two times during my tests I've got a nullpointer
exception
> > > > Othertimes the VM creates a log like this:
> > > >
> > > >
> >

> > > >
> > > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred
at
> > > > PC=0x8055383
> > > > Function=[Unknown.]
> > > > Library=C:\bea\JDK142~2\jre\bin\client\jvm.dll
> > > >
> > > > NOTE: We are unable to locate the function name symbol for the error
> > > >   just occurred. Please refer to release documentation for
possible
> > > >   reason and solutions.
> > > >
> > > >
> > > > Current Java thread:
> > > > at
> > > >
> >
jsp_servlet._portlets._foo._jsp._consolidation.__conssubsecdata._jspService(
> > ConsSubSecData.jsp:984)
> > > > at weblogic.servlet.jsp.JspBase.service(
> > > > JspBase.java:33)
> > > > at
> > > >
> >
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1072)
> > > > at
> > > >
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
> > > > at
> > > >
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:526)
> > > > at
> > > >
> >
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> > > > at
> > > >
> > weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java
> > > > :27)
> > > > at
> > > > com.bea.p13n.servlets.PortalServletFilter.doFilter
> > (PortalServletFilter.java:293)
> > > > at
> > > >
> >
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> > > > at
> > > >
com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter
> > > > (PageFlowJspFilter.java :265)
> > > > at
> > > >
> >
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> > > > at
> > > >
> > weblogic.servlet.internal.RequestDispatcherImpl.include
(RequestDispatcherImpl.java:644)
> > > > at
> > > >
> >
weblogic.servlet.int

Re: several tabbedPanes with several extended datatables: VM crash!

2006-09-13 Thread Stefan Gesigora
I'm going to do this.But in which order the bugs will be fixed?Via priorization?Some months ago I added a bug but I don't know until yet at which time this bug will be fixed.Could you explain the system, please.
regards,Steven2006/9/13, Gerald Müllan <[EMAIL PROTECTED]>:
Well, difficult in this case to meet the problem.If you got the exact hitch, would be good if you could add a jira issue.cheers,GeraldOn 9/13/06, Stefan Gesigora <
[EMAIL PROTECTED]> wrote:> Hi!>> Thanks for your answer!>> Not all dataTables should be displayed at once.> I've tried to set rendered attribute so that only the requested dataTables
> were rendered BUT> the problem was still the same!!>> Now I try another approach:> I use serverside tabs with 5 datatables. The content of the last 5> datatables were shown int the 6. datatable:
> I switch the underlying model, the tab label and the shown columns depending> of the selected tab pane.> It sounds awful but at this time it works (but work isn't still finished> yet).>
> Although I think its a BUG !? Cause the problems shouldn't happen if only> some of the datatables were rendered...>> What do you think?>> Regards,> Steven>> 2006/9/13, Gerald Müllan <
[EMAIL PROTECTED]>:> > The nullpointers may come from the fact, that the underlying dataModel> > cannot be found.> > But this problem should be gone if setting preserveDataModel to true.
> >> > Is it a need to display all dataTables at once?> >> > What about only displaying some table-headers, and only if the user> > whishes to see the entries, the tables are expanded. In this case the
> > tables will not be rendered at once.> >> > regards,> >> > Gerald> >> > On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED]
> wrote:> > > Hi Gerald!> > >> > > My extended dataTables holds DTOs with several attributes.> > > Every dataTable can have an empty list up to a list with n elements.
> > > At my tests the lists are between 0 antd 15 elements.> > >> > > Yes, I've rendered everytime every table after trying the> preserveDataModel> > > attribute first.
> > > The effect was the same...> > >> > > I've used the backing-bean in session mode and my jsp is composed with> > > jsp:incluce and 4 different jsps.> > > At the last jsp there are the datatables and tabbedPanes...
> > > The whole thing happened in a myfaces portlet.> > >> > > One or two times during my tests I've got a nullpointer exception> > > Othertimes the VM creates a log like this:
> > >> > >> > > >> > > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred at> > > PC=0x8055383
> > > Function=[Unknown.]> > > Library=C:\bea\JDK142~2\jre\bin\client\jvm.dll> > >> > > NOTE: We are unable to locate the function name symbol for the error> > >   just occurred. Please refer to release documentation for possible
> > >   reason and solutions.> > >> > >> > > Current Java thread:> > > at> > >> jsp_servlet._portlets._foo._jsp._consolidation.__conssubsecdata._jspService(
> ConsSubSecData.jsp:984)> > > at weblogic.servlet.jsp.JspBase.service(> > > JspBase.java:33)> > > at> > >> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java:1072)> > > at> > >> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)> > > at> > >> weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:526)> > > at> > >> weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)> > > at> > >> weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java> > > :27)> > > at> > > com.bea.p13n.servlets.PortalServletFilter.doFilter> (PortalServletFilter.java:293)> > > at> > >
> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)> > > at> > > com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter> > > (PageFlowJspFilter.java :265)
> > > at> > >> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)> > > at> > >> weblogic.servlet.internal.RequestDispatcherImpl.include
(RequestDispatcherImpl.java:644)> > > at> > >> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423)> > > at> > >> 
weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)> > > at> > >> jsp_servlet._portlets._foo._jsp._consolidation.__consolidation._jspService(> > > Consolidation.jsp
:357)> > > at> > > weblogic.servlet.jsp.JspBase.service(JspBase.java:33)> > > at> > >> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
(ServletStubImpl.java> :1072)> > > at> > > weblogic.servlet.internal.ServletStubImpl.invokeServlet> > > (ServletStubImpl.java:465)> > > at> > >
> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)> > > at> > >> weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)> > > at
> weblogic.servlet.internal.FilterChainImpl.doFilter> > > (FilterChainImpl.ja

RE: Start project?

2006-09-13 Thread Christoph Lassner
Yes, it is possible, but connected to quite some bits of work (because u
have to use other components, etc.). You should have a closer look at the
components you need and then decide for a framework. However, like I said,
if you really want to change your framework in some time, it will be
possible.

Regards
Chris


"Mosimann Matthias" <[EMAIL PROTECTED]> schrieb am 13.09.2006
15:36:01:

> Just a last question. If I deciede to use Tomahawk/Sanbox instead of
> trinidad, will there be a way to switch to trinidad latter and vice
verca?
>
> Regards
> Matthias
>
> -Ursprüngliche Nachricht-
> Von: Christoph Lassner [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 13. September 2006 15:11
> An: MyFaces Discussion
> Betreff: Re: Start project?
>
> You won't find any because there are no links to these pages, but
> they are available. Matthias Wessendorf was so kind to provide me this
link:
>
>
> http://people.apache.org/repo/m2-snapshot-
> repository/org/apache/myfaces/trinidad/
>
>
> It saves you a lot of time. Load trinidad-api-m1-snapshot and
> trinidad-impl-m1-snapshot and copy them to your lib dir. After that,
> you'll have to follow some installation instructions, which can be found
here:
>
> http://incubator.apache.org/adffaces/installation.html
>
> If you plan to use the release with Facelets (which is a very
> powerful combination), also have a look at this page:
>
> http://wiki.apache.org/myfaces/Facelets_with_Trinidad
>
>
> Now you should be ready to go!
>
> Have fun with it!
> Chris
>
>
> "Gerald Müllan" <[EMAIL PROTECTED]> schrieb am 13.09.2006 15:03:01:
>
> > Hi,
> >
> > i could not find any builds to download, think you have to build them
> > on your own via maven after a fresh svn checkout. But this should not
> > take that much time.
> >
> > Checkout trinidad website for this:
> >
> > http://incubator.apache.org/adffaces/
> >
> > regards,
> >
> > Gerald
> >
> > On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
> > > Hi Gerald
> > >
> > >
> > > Thank you for your fast answer. Do I have to download from the
> > Oracle Website or do I have to checkout from den SVN Repository?
> > >
> > >
> > > Regards
> > > Matthias
> > >
> > > -Ursprüngliche Nachricht-
> > > Von: Gerald Müllan [mailto:[EMAIL PROTECTED]
> > > Gesendet: Mittwoch, 13. September 2006 14:38
> > > An: MyFaces Discussion
> > > Betreff: Re: Start project?
> > >
> > > Hi,
> > >
> > > at the moment, the best way not to run into any problems is to use
> > tomahawk and/or sandbox (this combination can be used without any
> > > problems) OR apache trinidad (former called ADF Faces).
> > >
> > > We are working on getting these two worlds collaborate well, but
> > at the moment it is not that quite stable.
> > >
> > > cheers,
> > >
> > > Gerald
> > >
> > > On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > > Hy Everyone
> > > >
> > > >
> > > > I'm new to the Mailling List and I have two very easy questions,
> until
> > > > I'm a little bit confused about Tomahawk, ADF Faces from Oracle
> > and Sandbox:
> > > >
> > > > What is at the moment the best way to start a project? Should I
> > > > use the ADF Faces from Oracle an Myfaces together? Or instead of
> > > > ADF
> Faces
> > > > from Oracle, Tomahawk and/or Sandbox?
> > > >
> > > > Can someone explain me? I think the ADF Faces should be merged ord
> not?
> > > >
> > > >
> > > >  regards
> > > > Matthias
> > > >
> > > >
> > >
> > >
> > > --
> > > http://www.irian.at
> > >
> > > Your JSF powerhouse -
> > > JSF Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
>



AW: Start project?

2006-09-13 Thread Mosimann Matthias
Just a last question. If I deciede to use Tomahawk/Sanbox instead of trinidad, 
will there be a way to switch to trinidad latter and vice verca?

Regards
Matthias

-Ursprüngliche Nachricht-
Von: Christoph Lassner [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 13. September 2006 15:11
An: MyFaces Discussion
Betreff: Re: Start project?

You won't find any because there are no links to these pages, but they are 
available. Matthias Wessendorf was so kind to provide me this link:


http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/


It saves you a lot of time. Load trinidad-api-m1-snapshot and 
trinidad-impl-m1-snapshot and copy them to your lib dir. After that, you'll 
have to follow some installation instructions, which can be found here:

http://incubator.apache.org/adffaces/installation.html

If you plan to use the release with Facelets (which is a very powerful 
combination), also have a look at this page:

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


Now you should be ready to go!

Have fun with it!
Chris


"Gerald Müllan" <[EMAIL PROTECTED]> schrieb am 13.09.2006 15:03:01:

> Hi,
>
> i could not find any builds to download, think you have to build them 
> on your own via maven after a fresh svn checkout. But this should not 
> take that much time.
>
> Checkout trinidad website for this:
>
> http://incubator.apache.org/adffaces/
>
> regards,
>
> Gerald
>
> On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
> > Hi Gerald
> >
> >
> > Thank you for your fast answer. Do I have to download from the
> Oracle Website or do I have to checkout from den SVN Repository?
> >
> >
> > Regards
> > Matthias
> >
> > -Ursprüngliche Nachricht-
> > Von: Gerald Müllan [mailto:[EMAIL PROTECTED]
> > Gesendet: Mittwoch, 13. September 2006 14:38
> > An: MyFaces Discussion
> > Betreff: Re: Start project?
> >
> > Hi,
> >
> > at the moment, the best way not to run into any problems is to use
> tomahawk and/or sandbox (this combination can be used without any
> > problems) OR apache trinidad (former called ADF Faces).
> >
> > We are working on getting these two worlds collaborate well, but
> at the moment it is not that quite stable.
> >
> > cheers,
> >
> > Gerald
> >
> > On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hy Everyone
> > >
> > >
> > > I'm new to the Mailling List and I have two very easy questions,
until
> > > I'm a little bit confused about Tomahawk, ADF Faces from Oracle
> and Sandbox:
> > >
> > > What is at the moment the best way to start a project? Should I 
> > > use the ADF Faces from Oracle an Myfaces together? Or instead of 
> > > ADF
Faces
> > > from Oracle, Tomahawk and/or Sandbox?
> > >
> > > Can someone explain me? I think the ADF Faces should be merged ord
not?
> > >
> > >
> > >  regards
> > > Matthias
> > >
> > >
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces



Re: ScheduleModel questions

2006-09-13 Thread Jurgen Lust
I think you will find that you can save a lot of time when you just
extend the AbstractScheduleModel. See the SimpleScheduleModel for an
example.
I suggest you look at the code for those 2 classes, all the answers are
in there :)

Jurgen


Op wo, 13-09-2006 te 07:53 -0500, schreef Stephen Osella:
> Jurgen,
> 
> Thank you for your answers.  I wanted to get a clarification on your answer 
> for question (2):
> 
> >> 2) When do you actually call ScheduleModel.refresh()?  What is its 
> >> purpose?
> >
> > It is used to reload the entries in the schedule model. When you add an
> > entry to the database, you have to call ScheduleModel.refresh() so that
> > it will be shown in the schedule.
> 
> I am trying to understand the model that underlies the ScheduleModel class. 
> I am not binding the ScheduleModel to a database, but rather managing the 
> relationship manually.  When the user selects a date, I am adding the 
> entries for that date (or dates if the mode is WEEK, etc.) and then calling 
> model.refresh().  It seems like I am doing duplicate work when I re-add the 
> entries for a date that has already been viewed (i.e., selected) by the 
> user; however, I am doing that and it seems to work.  I also do a 
> model.refresh() when I change the schedule mode.  Am I doing things remotely 
> correctly?
> 
> Thanks!
> 
> Steve 
> 



Re: several tabbedPanes with several extended datatables: VM crash!

2006-09-13 Thread Gerald Müllan

Well, difficult in this case to meet the problem.

If you got the exact hitch, would be good if you could add a jira issue.

cheers,

Gerald

On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED]> wrote:

Hi!

Thanks for your answer!

Not all dataTables should be displayed at once.
I've tried to set rendered attribute so that only the requested dataTables
were rendered BUT
the problem was still the same!!

Now I try another approach:
I use serverside tabs with 5 datatables. The content of the last 5
datatables were shown int the 6. datatable:
I switch the underlying model, the tab label and the shown columns depending
of the selected tab pane.
It sounds awful but at this time it works (but work isn't still finished
yet).

Although I think its a BUG !? Cause the problems shouldn't happen if only
some of the datatables were rendered...

What do you think?

Regards,
Steven

2006/9/13, Gerald Müllan <[EMAIL PROTECTED]>:
> The nullpointers may come from the fact, that the underlying dataModel
> cannot be found.
> But this problem should be gone if setting preserveDataModel to true.
>
> Is it a need to display all dataTables at once?
>
> What about only displaying some table-headers, and only if the user
> whishes to see the entries, the tables are expanded. In this case the
> tables will not be rendered at once.
>
> regards,
>
> Gerald
>
> On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED]> wrote:
> > Hi Gerald!
> >
> > My extended dataTables holds DTOs with several attributes.
> > Every dataTable can have an empty list up to a list with n elements.
> > At my tests the lists are between 0 antd 15 elements.
> >
> > Yes, I've rendered everytime every table after trying the
preserveDataModel
> > attribute first.
> > The effect was the same...
> >
> > I've used the backing-bean in session mode and my jsp is composed with
> > jsp:incluce and 4 different jsps.
> > At the last jsp there are the datatables and tabbedPanes...
> > The whole thing happened in a myfaces portlet.
> >
> > One or two times during my tests I've got a nullpointer exception
> > Othertimes the VM creates a log like this:
> >
> >

> >
> > Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred at
> > PC=0x8055383
> > Function=[Unknown.]
> > Library=C:\bea\JDK142~2\jre\bin\client\jvm.dll
> >
> > NOTE: We are unable to locate the function name symbol for the error
> >   just occurred. Please refer to release documentation for possible
> >   reason and solutions.
> >
> >
> > Current Java thread:
> > at
> >
jsp_servlet._portlets._foo._jsp._consolidation.__conssubsecdata._jspService(
ConsSubSecData.jsp:984)
> > at weblogic.servlet.jsp.JspBase.service(
> > JspBase.java:33)
> > at
> >
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
> > at
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
> > at
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)
> > at
> >
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> > at
> >
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java
> > :27)
> > at
> > com.bea.p13n.servlets.PortalServletFilter.doFilter
(PortalServletFilter.java:293)
> > at
> >
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> > at
> > com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter
> > (PageFlowJspFilter.java :265)
> > at
> >
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> > at
> >
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644)
> > at
> >
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423)
> > at
> >
weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)
> > at
> >
jsp_servlet._portlets._foo._jsp._consolidation.__consolidation._jspService(
> > Consolidation.jsp:357)
> > at
> > weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
> > at
> >
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java
:1072)
> > at
> > weblogic.servlet.internal.ServletStubImpl.invokeServlet
> > (ServletStubImpl.java:465)
> > at
> >
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)
> > at
> >
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
> > at
weblogic.servlet.internal.FilterChainImpl.doFilter
> > (FilterChainImpl.java:27)
> > at
> > com.bea.p13n.servlets.PortalServletFilter.doFilter
(PortalServletFilter.java:293)
> > at
> >
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> > at
> > com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter
> > (PageFlowJspFilter.java :265)
> > at
> >
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
> > at
> >
weblogic.servlet

Re: Start project?

2006-09-13 Thread Christoph Lassner
You won't find any because there are no links to these pages, but they are
available. Matthias Wessendorf was so kind to provide me this link:


http://people.apache.org/repo/m2-snapshot-repository/org/apache/myfaces/trinidad/


It saves you a lot of time. Load trinidad-api-m1-snapshot and
trinidad-impl-m1-snapshot and copy them to your lib dir. After that, you'll
have to follow some installation instructions, which can be found here:

http://incubator.apache.org/adffaces/installation.html

If you plan to use the release with Facelets (which is a very powerful
combination), also have a look at this page:

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


Now you should be ready to go!

Have fun with it!
Chris


"Gerald Müllan" <[EMAIL PROTECTED]> schrieb am 13.09.2006 15:03:01:

> Hi,
>
> i could not find any builds to download, think you have to build them
> on your own via maven after a fresh svn checkout. But this should not
> take that much time.
>
> Checkout trinidad website for this:
>
> http://incubator.apache.org/adffaces/
>
> regards,
>
> Gerald
>
> On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
> > Hi Gerald
> >
> >
> > Thank you for your fast answer. Do I have to download from the
> Oracle Website or do I have to checkout from den SVN Repository?
> >
> >
> > Regards
> > Matthias
> >
> > -Ursprüngliche Nachricht-
> > Von: Gerald Müllan [mailto:[EMAIL PROTECTED]
> > Gesendet: Mittwoch, 13. September 2006 14:38
> > An: MyFaces Discussion
> > Betreff: Re: Start project?
> >
> > Hi,
> >
> > at the moment, the best way not to run into any problems is to use
> tomahawk and/or sandbox (this combination can be used without any
> > problems) OR apache trinidad (former called ADF Faces).
> >
> > We are working on getting these two worlds collaborate well, but
> at the moment it is not that quite stable.
> >
> > cheers,
> >
> > Gerald
> >
> > On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Hy Everyone
> > >
> > >
> > > I'm new to the Mailling List and I have two very easy questions,
until
> > > I'm a little bit confused about Tomahawk, ADF Faces from Oracle
> and Sandbox:
> > >
> > > What is at the moment the best way to start a project? Should I use
> > > the ADF Faces from Oracle an Myfaces together? Or instead of ADF
Faces
> > > from Oracle, Tomahawk and/or Sandbox?
> > >
> > > Can someone explain me? I think the ADF Faces should be merged ord
not?
> > >
> > >
> > >  regards
> > > Matthias
> > >
> > >
> >
> >
> > --
> > http://www.irian.at
> >
> > Your JSF powerhouse -
> > JSF Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
>
>
> --
> http://www.irian.at
>
> Your JSF powerhouse -
> JSF Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces



Re: Start project?

2006-09-13 Thread Gerald Müllan

Hi,

i could not find any builds to download, think you have to build them
on your own via maven after a fresh svn checkout. But this should not
take that much time.

Checkout trinidad website for this:

http://incubator.apache.org/adffaces/

regards,

Gerald

On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:

Hi Gerald


Thank you for your fast answer. Do I have to download from the Oracle Website 
or do I have to checkout from den SVN Repository?


Regards
Matthias

-Ursprüngliche Nachricht-
Von: Gerald Müllan [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 13. September 2006 14:38
An: MyFaces Discussion
Betreff: Re: Start project?

Hi,

at the moment, the best way not to run into any problems is to use tomahawk 
and/or sandbox (this combination can be used without any
problems) OR apache trinidad (former called ADF Faces).

We are working on getting these two worlds collaborate well, but at the moment 
it is not that quite stable.

cheers,

Gerald

On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
>
>
> Hy Everyone
>
>
> I'm new to the Mailling List and I have two very easy questions, until
> I'm a little bit confused about Tomahawk, ADF Faces from Oracle and Sandbox:
>
> What is at the moment the best way to start a project? Should I use
> the ADF Faces from Oracle an Myfaces together? Or instead of ADF Faces
> from Oracle, Tomahawk and/or Sandbox?
>
> Can someone explain me? I think the ADF Faces should be merged ord not?
>
>
>  regards
> Matthias
>
>


--
http://www.irian.at

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

Professional Support for Apache MyFaces




--
http://www.irian.at

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

Professional Support for Apache MyFaces


Re: How to disable component caching when recompiling JSP-page?

2006-09-13 Thread Paul Devine
I ran into some things similar seeming to this early on with the default server-side component STATE_SAVING_METHOD.  I switched to javax.faces.STATE_SAVING_METHOD = client in web.xml for development and no problems since then.  (I've never had to change the `id`(s) by hand.)
- PaulOn 9/12/06, David Delbecq <[EMAIL PROTECTED]> wrote:
Hi,Same behaviour here, different solution. We just manually remove thesession cookie from the browser prior to reaccess the webpage as theforms are stored in user sessions. It takes 2 clicks and can be done
while the script is copying the new jsp to replace old ones.Thorbjørn Ravn Andersen a écrit :> I have found that during development I often have to manually> increment a id attribute on the h:form tag in order to have changes
> picked up in the view.  My gut feeling is that changing attributes is> not discovered.>> Is there a way to tell myfaces + tomahawk (both 1.1.3) to build a page> view completely from scratch when a JSP-page is recompiled?  I am
> willing to take the performance hit :)>> (I have looked at the Wiki and with google but do apparently not know> the correct lingo)>> Thanks in advance,>> Thorbjørn
>


Re: JSF validation are not getting displayed in Jboss Portal

2006-09-13 Thread Stefan Gesigora
Hi!I don't know spring until yet...So  I can't answer your question.But looking at your definition I'd like to remark the following thing:You are talking about application scope but in your bean definiton the managed-bean-scope is session and not application!
regards,Steven2006/9/13, Kelvin James <[EMAIL PROTECTED]>:
Thanks!I am using Stefan : I am facing some more problem when integrating spring and JSF I have written beans defination in application scope using spring-app.xml

 in web.xml        I have used faces-config file for managing this bean using managed-bean tag 

    Basic UserBean  user  org.jboss.portlet.hello.bean.User

  session                interfaceTest            #{InterfaceTest}
                   But when i am trying to use the object of interfaceTest it throws NullPointer Is there some configuration required for getting the object from application scope.. 
Thanks in Advance --James On 9/13/06, Stefan Gesigora
 <[EMAIL PROTECTED]
> wrote:Hi!I think there's a bug in the myfaces implementation if you are using instead of the global h:messages tag the local h:message tag!
They don't work together. Either you use always h:messages - then the validation errors should be displayed - or you map your validation errors to one of your h:message fields.
Regards, Steven2006/9/13, Kelvin James <[EMAIL PROTECTED]
>:
HI I have created a portal in JBOSS Portal 2.4 I am using JSF validation tags for mandatory fields in a JSF portlet.  But I am not able to see the validation messages on UI screen Is there some Integation settings required for JSF + Jboss portal 
or need to include any jar for the same. Same Problem I have seen with Welogic Portal 8.1 Thanks in Advance --James  








Re: several tabbedPanes with several extended datatables: VM crash!

2006-09-13 Thread Stefan Gesigora
Hi!Thanks for your answer!Not all dataTables should be displayed at once.I've tried to set rendered attribute so that only the requested dataTables were rendered BUT the problem was still the same!!
Now I try another approach:I use serverside tabs with 5 datatables. The content of the last 5 datatables were shown int the 6. datatable:I switch the underlying model, the tab label and the shown columns depending of the selected tab pane.
It sounds awful but at this time it works (but work isn't still finished yet).Although I think its a BUG !? Cause the problems shouldn't happen if only some of the datatables were rendered...What do you think?
Regards,Steven2006/9/13, Gerald Müllan <[EMAIL PROTECTED]>:
The nullpointers may come from the fact, that the underlying dataModelcannot be found.But this problem should be gone if setting preserveDataModel to true.Is it a need to display all dataTables at once?
What about only displaying some table-headers, and only if the userwhishes to see the entries, the tables are expanded. In this case thetables will not be rendered at once.regards,Gerald
On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED]> wrote:> Hi Gerald!>> My extended dataTables holds DTOs with several attributes.> Every dataTable can have an empty list up to a list with n elements.
> At my tests the lists are between 0 antd 15 elements.>> Yes, I've rendered everytime every table after trying the preserveDataModel> attribute first.> The effect was the same...>
> I've used the backing-bean in session mode and my jsp is composed with> jsp:incluce and 4 different jsps.> At the last jsp there are the datatables and tabbedPanes...> The whole thing happened in a myfaces portlet.
>> One or two times during my tests I've got a nullpointer exception> Othertimes the VM creates a log like this:>> >
> Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred at> PC=0x8055383> Function=[Unknown.]> Library=C:\bea\JDK142~2\jre\bin\client\jvm.dll>> NOTE: We are unable to locate the function name symbol for the error
>   just occurred. Please refer to release documentation for possible>   reason and solutions.>>> Current Java thread:> at> jsp_servlet._portlets._foo._jsp._consolidation.__conssubsecdata._jspService(
ConsSubSecData.jsp:984)> at weblogic.servlet.jsp.JspBase.service(> JspBase.java:33)> at> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
> at> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)> at> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)> at
> weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)> at> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java> :27)> at> com.bea.p13n.servlets.PortalServletFilter.doFilter
(PortalServletFilter.java:293)> at> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)> at> com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter> (PageFlowJspFilter.java
:265)> at> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)> at> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644)> at
> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423)> at> weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)> at> jsp_servlet._portlets._foo._jsp._consolidation.__consolidation._jspService(
> Consolidation.jsp:357)> at> weblogic.servlet.jsp.JspBase.service(JspBase.java:33)> at> weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java
:1072)> at> weblogic.servlet.internal.ServletStubImpl.invokeServlet> (ServletStubImpl.java:465)> at> weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)
> at> weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)> at weblogic.servlet.internal.FilterChainImpl.doFilter> (FilterChainImpl.java:27)> at> com.bea.p13n.servlets.PortalServletFilter.doFilter
(PortalServletFilter.java:293)> at> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)> at> com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter> (PageFlowJspFilter.java
:265)> at> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)> at> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644)> at
> weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423)> at> com.bea.portlet.container.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:133)
> at> org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch> (PortletExternalContextImpl.java:164)> at> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView
(JspViewHandlerImpl.java:195)> 

AW: Start project?

2006-09-13 Thread Mosimann Matthias
Hi Gerald


Thank you for your fast answer. Do I have to download from the Oracle Website 
or do I have to checkout from den SVN Repository?


Regards
Matthias 

-Ursprüngliche Nachricht-
Von: Gerald Müllan [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 13. September 2006 14:38
An: MyFaces Discussion
Betreff: Re: Start project?

Hi,

at the moment, the best way not to run into any problems is to use tomahawk 
and/or sandbox (this combination can be used without any
problems) OR apache trinidad (former called ADF Faces).

We are working on getting these two worlds collaborate well, but at the moment 
it is not that quite stable.

cheers,

Gerald

On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:
>
>
> Hy Everyone
>
>
> I'm new to the Mailling List and I have two very easy questions, until 
> I'm a little bit confused about Tomahawk, ADF Faces from Oracle and Sandbox:
>
> What is at the moment the best way to start a project? Should I use 
> the ADF Faces from Oracle an Myfaces together? Or instead of ADF Faces 
> from Oracle, Tomahawk and/or Sandbox?
>
> Can someone explain me? I think the ADF Faces should be merged ord not?
>
>
>  regards
> Matthias
>
>


--
http://www.irian.at

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

Professional Support for Apache MyFaces


RE: Start project?

2006-09-13 Thread Jesse Alexander \(KSFD 121\)



Hi
 
Parts of SDF Faces have been donated from Oracle to the 
MyFaces project and become hte Trinidad subproject.
 
Which to use? Difficult it completely depends on your 
UI-requirements. 
For complexity reasons it might be better to reduce the 
stack at the beginning to MyFaces and Tomahawk and only include Trinidad if you 
absolutely need some components from that set.
 
regards
Alexander


From: Mosimann Matthias 
[mailto:[EMAIL PROTECTED] Sent: Wednesday, September 13, 
2006 2:26 PMTo: users@myfaces.apache.orgSubject: Start 
project?

Hy 
Everyone
 
 
I'm new to the 
Mailling List and I have two very easy questions, until I'm a little bit 
confused about Tomahawk, ADF Faces from Oracle and Sandbox:
 
What is at the 
moment the best way to start a project? Should I use the ADF Faces from Oracle 
an Myfaces together? Or instead of ADF Faces from Oracle, Tomahawk and/or 
Sandbox?
 
Can someone explain 
me? I think the ADF Faces should be merged ord not?
 
 
 regardsMatthias
 


Re: Start project?

2006-09-13 Thread Gerald Müllan

Hi,

at the moment, the best way not to run into any problems is to use
tomahawk and/or sandbox (this combination can be used without any
problems) OR apache trinidad (former called ADF Faces).

We are working on getting these two worlds collaborate well, but at
the moment it is not that quite stable.

cheers,

Gerald

On 9/13/06, Mosimann Matthias <[EMAIL PROTECTED]> wrote:



Hy Everyone


I'm new to the Mailling List and I have two very easy questions, until I'm a
little bit confused about Tomahawk, ADF Faces from Oracle and Sandbox:

What is at the moment the best way to start a project? Should I use the ADF
Faces from Oracle an Myfaces together? Or instead of ADF Faces from Oracle,
Tomahawk and/or Sandbox?

Can someone explain me? I think the ADF Faces should be merged ord not?


 regards
Matthias





--
http://www.irian.at

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

Professional Support for Apache MyFaces


Start project?

2006-09-13 Thread Mosimann Matthias



Hy 
Everyone
 
 
I'm new to the 
Mailling List and I have two very easy questions, until I'm a little bit 
confused about Tomahawk, ADF Faces from Oracle and Sandbox:
 
What is at the 
moment the best way to start a project? Should I use the ADF Faces from Oracle 
an Myfaces together? Or instead of ADF Faces from Oracle, Tomahawk and/or 
Sandbox?
 
Can someone explain 
me? I think the ADF Faces should be merged ord not?
 
 
 regardsMatthias
 


Re: several tabbedPanes with several extended datatables: VM crash!

2006-09-13 Thread Gerald Müllan

The nullpointers may come from the fact, that the underlying dataModel
cannot be found.
But this problem should be gone if setting preserveDataModel to true.

Is it a need to display all dataTables at once?

What about only displaying some table-headers, and only if the user
whishes to see the entries, the tables are expanded. In this case the
tables will not be rendered at once.

regards,

Gerald

On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED]> wrote:

Hi Gerald!

My extended dataTables holds DTOs with several attributes.
Every dataTable can have an empty list up to a list with n elements.
At my tests the lists are between 0 antd 15 elements.

Yes, I've rendered everytime every table after trying the preserveDataModel
attribute first.
The effect was the same...

I've used the backing-bean in session mode and my jsp is composed with
jsp:incluce and 4 different jsps.
At the last jsp there are the datatables and tabbedPanes...
The whole thing happened in a myfaces portlet.

One or two times during my tests I've got a nullpointer exception
Othertimes the VM creates a log like this:



Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc005) occurred at
PC=0x8055383
Function=[Unknown.]
Library=C:\bea\JDK142~2\jre\bin\client\jvm.dll

NOTE: We are unable to locate the function name symbol for the error
  just occurred. Please refer to release documentation for possible
  reason and solutions.


Current Java thread:
at
jsp_servlet._portlets._foo._jsp._consolidation.__conssubsecdata._jspService(ConsSubSecData.jsp:984)
at weblogic.servlet.jsp.JspBase.service(
JspBase.java:33)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)
at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java
:27)
at
com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at
com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter
(PageFlowJspFilter.java:265)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423)
at
weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:154)
at
jsp_servlet._portlets._foo._jsp._consolidation.__consolidation._jspService(
Consolidation.jsp:357)
at
weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:465)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:526)
at
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
at weblogic.servlet.internal.FilterChainImpl.doFilter
(FilterChainImpl.java:27)
at
com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:293)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at
com.bea.wlw.netui.pageflow.PageFlowJspFilter.doFilter
(PageFlowJspFilter.java:265)
at
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:644)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:423)
at
com.bea.portlet.container.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:133)
at
org.apache.myfaces.context.portlet.PortletExternalContextImpl.dispatch
(PortletExternalContextImpl.java:164)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:195)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at
org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:395)
at
de.dsa.foo.web.controller.FooFacesPortlet.facesRender(FooFacesPortlet.java:58)
at
org.apache.myfaces.portlet.MyFacesGenericPortlet.doView
(MyFacesGenericPortlet.java:265)
at
de.dsa.foo.web.controller.FooFacesPortlet.doView(FooFacesPortlet.java:40)
at
javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
at de.dsa.foo.web.controller.FooFacesPortlet.doDispatch
(FooFacesPortlet.java:29)
at
javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
at
com.bea.portlet.container.PortletStub.render(PortletStub.java:380)
at com.bea.portlet.container.AppContainer.renderStub
(A

Re: JSF validation are not getting displayed in Jboss Portal

2006-09-13 Thread Kelvin James
Thanks!I am using Stefan : I am facing some more problem when integrating spring and JSF I have written beans defination in application scope using spring-app.xml
 in web.xml        I have used faces-config file for managing this bean using managed-bean tag 
    Basic UserBean  user  org.jboss.portlet.hello.bean.User
  session                interfaceTest            #{InterfaceTest}
                   But when i am trying to use the object of interfaceTest it throws NullPointer Is there some configuration required for getting the object from application scope.. 
Thanks in Advance --James On 9/13/06, Stefan Gesigora <[EMAIL PROTECTED]
> wrote:Hi!I think there's a bug in the myfaces implementation if you are using instead of the global h:messages tag the local h:message tag!
They don't work together. Either you use always h:messages - then the validation errors should be displayed - or you map your validation errors to one of your h:message fields.
Regards, Steven2006/9/13, Kelvin James <[EMAIL PROTECTED]
>:
HI I have created a portal in JBOSS Portal 2.4 I am using JSF validation tags for mandatory fields in a JSF portlet.  But I am not able to see the validation messages on UI screen Is there some Integation settings required for JSF + Jboss portal 
or need to include any jar for the same. Same Problem I have seen with Welogic Portal 8.1 Thanks in Advance --James  






RE: problems with popup when inside an accordion

2006-09-13 Thread Guy Katz
Hi;
I would really appreciate it if someone can tell me if my problem
(described in the original email below) is the same as
https://issues.apache.org/jira/browse/TOMAHAWK-461

The behavior seems the same. (See
http://img400.imageshack.us/img400/4053/popupyb4.gif for a picture) 
Thanks.

-Original Message-
From: Guy Katz 
Sent: Monday, September 11, 2006 6:42 PM
To: 'MyFaces Discussion'
Subject: problems with popup when inside an accordion

Hi all;
Using t:popup I get strange results when locating the popup inside an
accordion style component (not the myfaces accordion)
The popup window is displayed with another window in the background
(looks like an html input) See
http://img400.imageshack.us/img400/4053/popupyb4.gif 

The only thing I can think of regarding this is that the accordion
panels I use have a hidden html input rendered along with the other
children such as the popup window.

Note the outside the accordion there's no problem with the popup.

Any suggestions are welcomed.
Thanks in advance.


Re: Does myface supports jsf 1.2

2006-09-13 Thread David Delbecq
Too much work to convert our page to facelets, too much non standard
tags used
Matthias Wessendorf a écrit :
> middle term answer.
>
> use facelets instead of JSP.
> With that you don't run into the JSP 2.0 vs. JSF 1.1 issue
>
> -Matthias
>
> On 9/11/06, Martin Marinschek <[EMAIL PROTECTED]> wrote:
>> Longer answer: work is in progress, but we're not there yet.
>>
>> regards,
>>
>> Martin
>>
>> On 9/11/06, Gerald Müllan <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> >
>> > short answer: currently No :)
>> >
>> > cheers,
>> >
>> > Gerald
>> >
>> > On 9/11/06, David Delbecq <[EMAIL PROTECTED]> wrote:
>> > > Title says it all :) Does svn version of myfaces supports JSF
>> 1.2? There
>> > > are quite some interesting new tag properties to h:panelGroup i'd
>> like
>> > > to use, but it seems my tld is the 1.01 one.
>> > >
>> >
>> >
>> > --
>> > Gerald Müllan
>> > Schelleingasse 2/11
>> > 1040 Vienna, Austria
>> > 0043 699 11772506
>> > [EMAIL PROTECTED]
>> >
>>
>>
>> -- 
>>
>> http://www.irian.at
>>
>> Your JSF powerhouse -
>> JSF Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>
>



Re: Does myface supports jsf 1.2

2006-09-13 Thread Matthias Wessendorf

middle term answer.

use facelets instead of JSP.
With that you don't run into the JSP 2.0 vs. JSF 1.1 issue

-Matthias

On 9/11/06, Martin Marinschek <[EMAIL PROTECTED]> wrote:

Longer answer: work is in progress, but we're not there yet.

regards,

Martin

On 9/11/06, Gerald Müllan <[EMAIL PROTECTED]> wrote:
> Hi,
>
> short answer: currently No :)
>
> cheers,
>
> Gerald
>
> On 9/11/06, David Delbecq <[EMAIL PROTECTED]> wrote:
> > Title says it all :) Does svn version of myfaces supports JSF 1.2? There
> > are quite some interesting new tag properties to h:panelGroup i'd like
> > to use, but it seems my tld is the 1.01 one.
> >
>
>
> --
> Gerald Müllan
> Schelleingasse 2/11
> 1040 Vienna, Austria
> 0043 699 11772506
> [EMAIL PROTECTED]
>


--

http://www.irian.at

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

Professional Support for Apache MyFaces




--
Matthias Wessendorf

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


Re: Dynamic PanelNavigation2 - Items getting duplicated on post

2006-09-13 Thread Greg Reddin


On Sep 7, 2006, at 11:17 AM, Kumar, Abhilash (Gok) wrote:


  I have a dynamic panelnavigation2 in my application. I am using
faceletes for templating and the menu page is in the template. When I
request the template child, the menu and the template child page is
loading correclty. But when I submit the template child page, the menu
ites are getting duplicated. If I submit again, the menu items be
duplicated again. I have observed that before calling my value  
method of

the menu itself, the items are populated. This behaviour will appear
only when I submit the page. Am I missing something ? Any pointers  
will

be really helpful.


I don't have an answer to your question, but just to confirm you're  
not hallucinating I've seen the exact same behavior.  I was  
populating a panelNavigation2 with a list of NavigationMenuItem  
objects.  If I ever did a postback request (where the requesting page  
was re-rendered) the menu was duplicated.  My environment is the same  
as yours.  I fixed the problem by switching to a non-dynamic list of  
t:commandNavigation2 tags.


If I find a better answer I will let you know.

Greg




Re: JSF validation are not getting displayed in Jboss Portal

2006-09-13 Thread Stefan Gesigora
Hi!I think there's a bug in the myfaces implementation if you are using instead of the global h:messages tag the local h:message tag!They don't work together. Either you use always h:messages - then the validation errors should be displayed - or you map your validation errors to one of your h:message fields.
Regards, Steven2006/9/13, Kelvin James <[EMAIL PROTECTED]>:
HI I have created a portal in JBOSS Portal 2.4 I am using JSF validation tags for mandatory fields in a JSF portlet.  But I am not able to see the validation messages on UI screen Is there some Integation settings required for JSF + Jboss portal 
or need to include any jar for the same. Same Problem I have seen with Welogic Portal 8.1 Thanks in Advance --James  




JSF validation are not getting displayed in Jboss Portal

2006-09-13 Thread Kelvin James
HI I have created a portal in JBOSS Portal 2.4 I am using JSF validation tags for mandatory fields in a JSF portlet.  But I am not able to see the validation messages on UI screen Is there some Integation settings required for JSF + Jboss portal 
or need to include any jar for the same. Same Problem I have seen with Welogic Portal 8.1 Thanks in Advance --James  


RE: Problem with

2006-09-13 Thread Bieringer, Dominik
Well... it's like this:

There is a main page with about 5 different pages which can be included...
The last one of this includes of the main page is an Admin page...

The admin page itself can include about 15 different pages again
And some of the admin pages can include other pages... 

So at all there are about 15 different pages...


Thanks Jeff for your explanation. I have investigated my code for a few hours 
before and already thought that it must have something to do with the id's... 
But when I read your explanation, a new idea popped up in my head... I think I 
know where my problem is hidden... (My thought is that there is a problem with 
the  tag... this tag is always the same and has no id assigned...)

I am facing the problems with duplicate ID and with the wrong rendered 
components after my dynamic JSP include !?


Here is my example again:

<%@ page contentType="text/html; charset=Cp1252" %>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>

<%  long i = Math.round(Math.random());  %>


<[EMAIL PROTECTED] file="/res/inc/head.inc"%>

















The problems do not happen in the includes!!! No matter how many pages or how 
many components I include... even with s in s... 
Everything works fine...

The duplicate ID errors and rendering problems do happen on  level!!



Here is another example... This is the main page I am using on my real 
application:


<%@ page contentType="text/html; charset=Cp1252" %>
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>


<%
SessionTracker tracker = BeanResolver.getSessionTracker();
String tmp = tracker.getContentPage();
%>


<[EMAIL PROTECTED] file="/res/inc/head.inc"%>

















The problem that happens is that sometimes the footer.jsp get's rendered twice, 
... or three times ... or even four or more times... 

The footer itself is rendered without problems... but as I've said before, the 
problem happens on  level... because the include is rendered twice... 

I think I'll have to investigate this issue again today or tomorrow... 
Thanks for the help guys.

Dominik

-Original Message-
From: Jeff Bischoff [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 12, 2006 17:27
To: MyFaces Discussion
Subject: Re: Problem with 

Dominik said that he has about 50, yes.

In my application, we typically have 10-20 possibilities for each 
value-bound include.

 > 1 subview with maybe a value binding for the id of the subview and a
 > binding for the page source might do the trick?
 >
 > Then you could dynamically assign the id for the subview based on the
 > content page being shown.

You know, I think I tried something like this initially. Ran into some 
sort of problem where it wouldn't let me make the id attribute dynamic. 
I believe MyFaces actually threw an exception stating such, when I tried 
to view the page.

In any case, I do have a working solution. Hopefully dominik can get it 
to work too. If not, your solution (even on a large scale like 50 pages) 
is still much better than having to hard-code every single component id! 
So in any case we will save him from having to do that...

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

CD wrote:
> You have 50 different pages that can be included!?!?!?
>  
> Wow.
>  
> In that case, I would agree.my method is not the proper method for that.
>  
> 1 subview with maybe a value binding for the id of the subview and a 
> binding for the page source might do the trick?
>  
> Then you could dynamically assign the id for the subview based on the 
> content page being shown.
>  
> 
> 
>  
> On 9/12/06, *Jeff Bischoff* <[EMAIL PROTECTED] 
> > wrote:
> 
> CD,
> 
> Okay, this is an alternative way to do this. However, in your solution
> there must be a separate include for each possible content page. In
> your
> code snippet, there are 2, but in reality there would be 50. And each
> subview would need to point to a separate booleanShown1() method,
> resulting in 50 additional metho

RE: Problem with

2006-09-13 Thread Bieringer, Dominik








I don’t think that will work…
If you are trying to do that, you will get the value of the outputText in your
HTML code which is sent to the client…

But please tell me if I am wrong..

 

Dominik

 









From: CD
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 12, 2006
18:12
To: MyFaces Discussion
Subject: Re: Problem with




 



Perhaps this is another solution as well (kinda ugly but maybe it will
work)





 





"/>





 





Any thoughts?







 





On 9/12/06, Mike
Kienenberger <[EMAIL PROTECTED]>
wrote: 

On 9/12/06, Jeff Bischoff <[EMAIL PROTECTED]>
wrote:
> You know, I think I tried something like this initially. Ran into some
> sort of problem where it wouldn't let me make the id attribute dynamic.
> I believe MyFaces actually threw an exception stating such, when I tried 
> to view the page.

Well, the trick is that id="#{something}" is illegal -- this executes
at render time.   However, id="${something}" should work --
this one
will run at page compile time, I think. 

As long as you're not changing the id once the page has been built,
I'd think this could work.  You might also be able to change the id
at
pre-renderResponse without breaking something.



 








RE: Problem with

2006-09-13 Thread Bieringer, Dominik
Yeah... that's what I think too.

-Original Message-
From: Jeff Bischoff [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 12, 2006 17:05
To: MyFaces Discussion
Subject: Re: Problem with 

CD,

Okay, this is an alternative way to do this. However, in your solution 
there must be a separate include for each possible content page. In your 
code snippet, there are 2, but in reality there would be 50. And each 
subview would need to point to a separate booleanShown1() method, 
resulting in 50 additional methods.

If that works for you, great. I feel a value-binding expression is more 
flexible for my needs, since I don't have to modify the outer template 
pages to add new content pages.



One include, instead of 50. :)

Both approaches work, it's really a matter of taste.

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

CD wrote:
> To clarify on my post a bit...
>  
> I did not include full code as maybe I should have.  The way we 
> accomplish this task is
>  
> 
> 
> 
> 
> 
> 
>  
>  
>  
> This approach does work for our needs  however, maybe I don't 
> understand what is attempting to be done in this case.  I apologize for 
> the lack of good code snippet previously.  I will admit that it did look 
> bad and was not explained clearly.
>  
> Regards,
> CD
>  
> 
> 
>  
> On 9/12/06, *Jeff Bischoff* <[EMAIL PROTECTED] 
> > wrote:
> 
>  > So, using hard coded id's for every component on my included pages
> (And that are a lot.. I have about 50 pages or more) is the only
> solution? You are using hard coded ids for every component ??
>  >
> 
> Gladly, no... this is not the only solution. It's not what we are doing
> either! :)
> 
> Let me explain a little further...
> 
> When you don't specify an id for a component, it gets auto-generated an
> id like "_idJsp134". But the container ids are concatenated, so inside
> form MyForm, you get an id like MyForm:_idJsp134. The problem comes in
> when you include a new page, and e.g. something that maybe was a
> inputText before is now a selectOneMenu.
> 
> Subviews are the answer to this problem, but only if you use them in a
> certain way. If you following CD's pattern, the subview ID gets appended
> but it doesn't help. This is because both pages are being included
> from the same line. Using his pattern, you might get the following ids
> for the components on the two different pages:
> 
> MyForm:subviewID:_idJsp134
> MyForm:subviewID:_idJsp134
> 
> They are still not unique. If you instead follow the pattern I laid out
> in my last post, you will get the following ids:
> 
> MyForm:Payments:_idJsp134
> MyForm:Balances:_idJsp134
> 
> Now these IDs will not conflict. Even though they are not hard-coded,
> and get auto-assigned the same _idJsp134 id, the appending of a
> distinct
> subview ID differentiates them. Therefore, you are free to use
> components without a hard-coded id.
> 
> Hope this clarifies a bit?
> 
> Regards,
> 
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
> 
> Bieringer, Dominik wrote:
>  > Hi,
>  >
>  > Wow thanks for your answer!!! It's really great! You are
> totally right about the things you have said, ...
>  >
>  > I've tried assigning all my components in the subviews id=""
> attributes before (sorry for forgetting to mention that), and yes,
> it worked that way... But that's much work and it doesn't look good
> having an id attribute assigned on every component... but if there's
> no other way ?!?
>  >
>  > Thanks for the great approach to solve the problem with the
> initialization of the JSF managed bean... I've solved it with having
> code like that at the top of the main.jsp page:
>  >
>  > <%
>  >   SessionTracker tracker = BeanResolver.getSessionTracker();
>  >   String tmp = tracker.getContentPage();
>  > %>
>  >
>  > BeanResolver is using FacesContext to resolve the bean. And then
> using:
>  >
>  > 
>  >
>  > But your approach is much more straight forward... I think I will
> replace that part of my code.
>  >
>  > I'm having the  tags inside the pages which I am
> including... and yes, I was very very carefully with writing the
> pages (hehe)... I am not even using any html tags in my code...
>  >
>  > You are right... I am not including the same jsf page more than
> once, so there is no problem with having  tags with the
> same id...
>  >
>  > So, using hard coded id's for every component on my included
> pages (And that are a lot.. I have about 50 pages or more) is the
> only solution? You are using hard coded ids for every component ??
>  >
>  > Dominik
>  >
>  >
>  > -Original Message-
>  > From: Jeff Bischoff [mailto:[EMAIL PROTECTED]
>  

RE: Problem with

2006-09-13 Thread Bieringer, Dominik








Thanks for your help.. but I am afraid
this approach will not work in my case as I’ve explained earlier (Because
I don’t have Boolean properties and I don’t want to use them (There
would be about 50 boolean values… and they will get more ;D))

 

Thx anyway

 









From: CD
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 12, 2006
16:33
To: MyFaces Discussion
Subject: Re: Problem with




 



To clarify on my post a bit...





 





I did not include full code as maybe I should have.  The way we
accomplish this task is





 











    

















    











 





 





 





This approach does work for our needs  however, maybe I don't
understand what is attempting to be done in this case.  I apologize for
the lack of good code snippet previously.  I will admit that it did look
bad and was not explained clearly. 





 





Regards,





CD





 







 





On 9/12/06, Jeff
Bischoff <[EMAIL PROTECTED]>
wrote: 

> So, using hard coded
id's for every component on my included pages
(And that are a lot.. I have about 50 pages or more) is the only 
solution? You are using hard coded ids for every component ??
>

Gladly, no... this is not the only solution. It's not what we are doing
either! :)

Let me explain a little further...

When you don't specify an id for a component, it gets auto-generated an 
id like "_idJsp134". But the container ids are concatenated, so
inside
form MyForm, you get an id like MyForm:_idJsp134. The problem comes in
when you include a new page, and e.g. something that maybe was a 
inputText before is now a selectOneMenu.

Subviews are the answer to this problem, but only if you use them in a
certain way. If you following CD's pattern, the subview ID gets appended
but it doesn't help. This is because both pages are being included 
from the same line. Using his pattern, you might get the following ids
for the components on the two different pages:

MyForm:subviewID:_idJsp134
MyForm:subviewID:_idJsp134

They are still not unique. If you instead follow the pattern I laid out 
in my last post, you will get the following ids:

MyForm:Payments:_idJsp134
MyForm:Balances:_idJsp134

Now these IDs will not conflict. Even though they are not hard-coded,
and get auto-assigned the same _idJsp134 id, the appending of a distinct 
subview ID differentiates them. Therefore, you are free to use
components without a hard-coded id.

Hope this clarifies a bit?

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.

Bieringer, Dominik wrote:
> Hi,
>
> Wow thanks for your answer!!! It's really great! You are totally right
about the things you have said, ...
>
> I've tried assigning all my components in the subviews id=""
attributes before (sorry for forgetting to mention that), and yes, it worked
that way... But that's much work and it doesn't look good having an id
attribute assigned on every component... but if there's no other way ?!? 
>
> Thanks for the great approach to solve the problem with the initialization
of the JSF managed bean... I've solved it with having code like that at the top
of the main.jsp page:
>
> <%
>   SessionTracker tracker =
BeanResolver.getSessionTracker();
>   String tmp = tracker.getContentPage();
> %>
>
> BeanResolver is using FacesContext to resolve the bean. And then using:
>
>  
>
> But your approach is much more straight forward... I think I will replace
that part of my code.
>
> I'm having the  tags inside the pages which I am
including... and yes, I was very very carefully with writing the pages
(hehe)... I am not even using any html tags in my code... 
>
> You are right... I am not including the same jsf page more than once, so
there is no problem with having  tags with the same id...
>
> So, using hard coded id's for every component on my included pages (And
that are a lot.. I have about 50 pages or more) is the only solution? You are
using hard coded ids for every component ?? 
>
> Dominik
>
>
> -Original Message-
> From: Jeff Bischoff [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 11, 2006 19:08 
> To: MyFaces Discussion
> Subject: Re: Problem with 
>
> Dominik,
>
> Our web application has the same behaviour that you are trying to
> create. We have many different tabs, each of which dynamically includes 
> various pages depending on the menu buttons they click. (we even use the
> same method name, setContentPage() heh)
>
> We've been running such a way for over 6 months now, with no problems
> since the first few days. You have to be very careful about how you 
> manage your subviews. These problems you are seeing occur when
> components are using generated ids, and on a subsequent display a new
> component is getting the same id that was assigned to a different 
> component before. Hard-coding IDs can help, but this would be a severely
> painful solution in this case.
>
> CD told you to:
>
>  > subview tags go around the  in your
page i.e.
>  >
>  > 
>  > 
>  > 
>  >
>
> I'm sorry CD, but 

Re: ScheduleModel questions

2006-09-13 Thread Jurgen Lust
Op di, 12-09-2006 te 08:00 -0500, schreef Stephen Osella:
> 1) What does the containsDate(java.util.Date) actually main?  That is, when 
> is the Date set that this method considers it to be contained within the 
> ScheduleModel?  Is it when you use setSelectedDate() or when you use 
> addEntry()?
Excellent question actually: I didn't know the answer immediately, so I
checked in the code and it turns out that it isn't used anymore! I think
it was used at some point to determine whether or not to render an entry
in a day column/cell.

> 
> 2) When do you actually call ScheduleModel.refresh()?  What is its purpose?

It is used to reload the entries in the schedule model. When you add an
entry to the database, you have to call ScheduleModel.refresh() so that
it will be shown in the schedule.

> 
> 3) How are the java.util.Date's (i.e., in setStartTime & setEndTime) 
> considered?  Are they UTC or Local or Floating?  Is there a way to use a 
> converter such as when using  and  or do I 
> have to convert the dates to the internal representation (i.e., UTC or Local 
> or Floating)?

See TOMAHAWK-619 for this:
http://issues.apache.org/jira/browse/TOMAHAWK-619

> 
> 4) Is there any tutorial or more indepth documentation on ScheduleModel than 
> the javadoc's?

Aside from the examples, no... 




RE: Using Tomahawk panelNavigation2 with Facelets

2006-09-13 Thread Kumar, Abhilash (Gok)
commandnavigation2 is already defined in the tomahawk.taglib.xml. In the
wiki (http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk), just
below the example tomahawk.taglib and the inputDate control , there is
link to the complete taglib with link name "attachment". Pls download
that one and follow the instructions in the wiki itself. Or here is the
actual link 
 
http://wiki.apache.org/myfaces-data/attachments/Use_Facelets_with_Tomaha
wk/attachments/tomahawk.taglib.xml 

-Original Message-
From: Christoph Lassner [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 13, 2006 1:22 PM
To: users@myfaces.apache.org
Subject: Using Tomahawk panelNavigation2 with Facelets


Hello everybody,

I want to use (like the topic shows) a panelNavigation2 with Facelets. I
already downloaded the tomahawk.taglib.xml as described here
(http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk), but the
commandNavigation2 tag is not defined there. I need that one for
functionality. I tried to add it myself, but it didn't work! To do so, I
added this component to faces-config.xml:


org.apache.myfaces.HtmlCommandNavigation2

org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItem<
/
component-class>


and then added this to the tomahawk.taglib.xml:

commandNavigation2

org.apache.myfaces.HtmlCommandNavigation2



However, it still didn't work! Any ideas?

Thanks a lot
Chris



Re: Scheduler: Getting Clicked Entry

2006-09-13 Thread Jurgen Lust
Have you checked schedule example 5? In that example, the
getModel().getSelectedEntry() returns the correct entry when called from
the action method.

Are you using Facelets?

Jurgen

Op ma, 11-09-2006 te 09:15 -0700, schreef Julian Ray:
> Does anyone have any ideas on this? I've been pulling my hair out over it for
> two days now :)
> 
> Thanks
> Julian
> 
> 
> Julian Ray wrote:
> > 
> > I'm having problems getting the clicked entry from the scheduler. The
> > ScheduleMouseEvent is set to SCHEDULE_ENTRY_CLICKED but in the mouse
> > listener event and the action event the getModel().getSelectedEntry() is
> > always null and  isEntrySelected() always returns false.
> > 
> > Have I missed something? Do I ahve to select the entry somehow?
> > 
> > Thanks
> > Julian
> > 
> 



Using Tomahawk panelNavigation2 with Facelets

2006-09-13 Thread Christoph Lassner

Hello everybody,

I want to use (like the topic shows) a panelNavigation2 with Facelets. I
already downloaded the tomahawk.taglib.xml as described here
(http://wiki.apache.org/myfaces/Use_Facelets_with_Tomahawk), but the
commandNavigation2 tag is not defined there. I need that one for
functionality. I tried to add it myself, but it didn't work! To do so, I
added this component to faces-config.xml:


org.apache.myfaces.HtmlCommandNavigation2

org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlCommandNavigationItem


and then added this to the tomahawk.taglib.xml:

commandNavigation2

org.apache.myfaces.HtmlCommandNavigation2



However, it still didn't work! Any ideas?

Thanks a lot
Chris



Re: Why is jsf content separated from JSP?

2006-09-13 Thread David Delbecq
Thanks mike,

my problem being the correct display of some JSF based component inside
JSP pages containing other taglibs (some from the Slide jakarta project,
some from IBM, some from an internal project), facelets seems no go for
now :), unless perhaps we write a facelet tag that allow the inclusion
of another servlet's output. However, informations you pointed at me was
usefull to understand the problem, and we decided to go with 
to write our JSF forms layout.

Mike Kienenberger a écrit :
> Yes, if you are using a lot of non-standard jsp tags, then converting
> to facelets will require a lot of work to port those tags to JSF.
> And you cannot include a jsp file into a facelets xhtml file -- when
> facelets is processing an xhtml file, it doesn't use the jsp compiler.
>
> If you are only using a lot of non-standard jsf tags, then it's
> trivial to convert a JSF tld to a facelet taglib.xml file -- actually
> you'd convert the faces-config.xml data to the taglib.xml file --
> there are scripts out there that will do this for you automatically
> for JSF tags that don't already have publically-published taglib.xml
> files.
>
> If it's just a matter of wanting to use some JSP pages with some
> JSF/facelet pages, facelets can also support both page types at the
> same time.   xhtml files will be processed with facelets and .jsp(x)
> files can be processed with the standard view handler.
>
> On 9/12/06, David Delbecq <[EMAIL PROTECTED]> wrote:
>> Hello, and thank for pointing out this article on jsp/jsf flaws.
>> However, getting in the docs of facelets, i see to 2 points preventing
>> us to go facelets, maybe your experience can lighten this a bit, if am
>> not abusing your time.
>> 1) facelets use .taglib.xml taglib definition that are not the same as
>> the jsp's .tld file, unfortunately, requiring a new taglib for facelet,
>> the jsp taglib is not wrappable
>> 2) the ui:include tag can only include other facelets, templates or
>> plain XML/XHTML documents. It can not include a .jsp
>> As a matter of fact, it means
>> 1) all our struts based code is not usable in a facelets context as
>> there is no facelets based struts tags
>> 2) because there is no possibility to include a JSP in the result tree,
>> we can't keep our existing jsp part outside facelets and just include
>> them
>>
>> Am i right in my guess that JSPs can not be easily converted to
>> facelets, except if they were only using the jsp and jstl tags?
>>
>> Mike Kienenberger a écrit :
>> > If you want details on the JSF/JSP issues, see this article:
>> >
>> > http://www.onjava.com/pub/a/onjava/2004/06/09/jsf.html
>> >
>> >
>> > As for converting to facelets, facelets excels at templating.
>> >
>> >
>> >
>> > On 9/11/06, David Delbecq <[EMAIL PROTECTED]> wrote:
>> >> Thank you. It's strange, lots of docs i saw on the net about JSF
>> do such
>> >> things as  without problem, it looks very
>> >> curious to me :/ Or maybe i read mistakenly :(
>> >> I'll take a look at facelets, but not sure it will be easy to convert
>> >> all our jsp to facelets as it uses a templating system. :)
>> >> Martin Marinschek a écrit :
>> >> > Hi David,
>> >> >
>> >> > it's inherent to the JSP and JSF 1.1. interaction that this
>> happens -
>> >> > you could call it a bug by design.
>> >> >
>> >> > things you can do, easiest first:
>> >> >
>> >> > - use f:verbatim-tags around your HTML-Code you embed in JSF-tags
>> >> > (simple but ugly)
>> >> > - use the MyFaces htmlTag tag to emit some of the HTML-Tags
>> >> > - use the htmlTag-Library to emit HTML-tags
>> >> > - switch over to Facelets for view-definitions(relatively simple
>> and
>> >> > very recommendable)
>> >> > - switch over to JSF 1.2 (well, if you want to use Tomcat 5.5,
>> you'd
>> >> > still have to use facelets)
>> >> >
>> >> > regards,
>> >> >
>> >> > Martin
>> >> >
>> >> > On 9/11/06, David Delbecq <[EMAIL PROTECTED]> wrote:
>> >> >> Hello,
>> >> >>
>> >> >> I thought, in JSP, when i write
>> >> >> 
>> >> >> 
>> >> >> 
>> >> >>
>> >> >> I would get something like this
>> >> >>
>> >> >> 
>> >> >> ...
>> >> >>   test ... 
>> >> >> ...
>> >> >> 
>> >> >> that is, the content of outputText "test" is placed at same
>> >> position of
>> >> >> corresponding tag.
>> >> >>
>> >> >> However, running such a JSP, is get the following output
>> >> >>
>> >> >> 
>> >> >> ...test...
>> >> >> 
>> >> >> ...
>> >> >> 
>> >> >>
>> >> >> That is, the outputText is rendered immediatly inside the
>> h:form, and
>> >> >> not where is was designed in the JSP, is there a reason for this?
>> >> Am i
>> >> >> forbidden to use html tags inside an h:form?? Is that a bug?
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>>
>>