Re: dataTable and commandButton question

2005-04-13 Thread Brandon Goodin
okay i solved my own problem. 

I didn't realize that JSF magically retains my state even when my
managed bean is in request mode. Thanks JSF/MyFaces!

All i need to do is intialize my UIData value with a list from the
database the first time i access it.After that i update my UIData
value via the action that i call. Everytime UIData value is attempted
to be set it will see that it is not null and leave it alone. So, i
only hit my db once for the initial list and then after that only
intentionally. This allows me to be sure that the index object will be
what i am expecting it to be.

I think i am going to make this even easier by making sure that all
access to this page calls the #{categoryAdmin.init} action first. Then
i can even do away with the faux init wrapper.

...
  /**
   * @return Returns the categoryTable.
   */
  public UIData getCategoryTable() {
return initCategoryTable(categoryTable);
  }
  /**
   * @param categoryTable The categoryTable to set.
   */
  public void setCategoryTable(UIData categoryTable) {
this.categoryTable = initCategoryTable(categoryTable);
  }
  
  private UIData initCategoryTable(UIData categoryTable) {
if(categoryTable.getValue() == null) {
  categoryTable.setValue(catalogService.getChildCategories(category));
}
return categoryTable;
  }
...

On 4/13/05, Brandon Goodin <[EMAIL PROTECTED]> wrote:
> wow, after looking at all the proposed solutions i wound up coming
> back to what i was doing before. Which is exactly what Srikanth
> recommended. Is there a reason why the rest of you chose such obscure
> routes to the getRowData?
> 
> Also it seems that no matter what i do the UIData property that my
> dataTable is bound too on my backing bean get's called twice. Once
> before the action is called and once after the action method is
> called. When i select an item with the commandLink I am only
> interested in the id of that element. It seems that i HAVE to load the
> whole list back in just to get the id from the selected index of the
> list. I prefer not to keep lists in my session scope and so my managed
> bean is request scope and i load lists only as i need them. But, the
> auto loading that is performed by JSF does not make this easy. Is
> there a way around this?
> 
> I currently have an init boolean for my UIData so that the list will
> only load once from my service layer. I would prefer that the List not
> have to be loaded when i select the commandLink. Like i said i'm only
> interested in the id. Also, the odd thing about grabbing the selected
> object using the getRowData (which looks up the index) is that the
> list i grab from my service layer may have been updated. So, then the
> index would return the wrong object. Does everyone simply load up all
> their lists into their managedbeans and store them in session scope?
> 
> It doesn't seem that developing something as simple as this should be
> so difficult.
> 
> Following is my code.
> 
> ...
> 
>   private CatalogService catalogService = null;
> 
>   private Category category = new Category();
> 
>   private UIData  categoryTable = new UIData();
>   private boolean categoryTableInit = false;
> 
>   /**
>* no arg contructor
>*/
>   public CategoryAdminPresentation() {
> this.catalogService =
> (CatalogService)ServiceFactory.getInstance().getService(CatalogService.class);
>   }
> 
>   public String child() {
> 
> Category category = (Category)categoryTable.getRowData();
> 
> // create parent category template
> Category parentCategory = new Category();
> parentCategory.setParentCategoryId(category.getCategoryId());
> 
> categoryTable.setValue(catalogService.getChildCategories(parentCategory));
> 
> return "child";
>   }
> 
>   /**
>* @return Returns the categoryTable.
>*/
>   public UIData getCategoryTable() {
> return initCategoryTable(categoryTable);
>   }
>   /**
>* @param categoryTable The categoryTable to set.
>*/
>   public void setCategoryTable(UIData categoryTable) {
> this.categoryTable = initCategoryTable(categoryTable);
>   }
> 
>   private UIData initCategoryTable(UIData categoryTable) {
> 
> if(categoryTableInit==false) {
>   categoryTable.setValue(catalogService.getChildCategories(category));
>   categoryTableInit = true;
> }
> 
> return categoryTable;
> 
>   }
> 
>   /**
>* @return Returns the category.
>*/
>   public Category getCategory() {
> return category;
>   }
>   /**
>* @param category The category to set.
>*/
>   public void setCategory(Category category) {
> this.category = category;
>   }
> 
> ...
> 
> Thanks,
> Brandon
> 
> On 4/13/05, Brandon Goodin <[EMAIL PROTECTED]> wrote:
> > This rowData works okay, if you are using session... but there are
> > problems with this. Most of the time you want to query based on the ID
> > of your object. Not the index of the object location. If you database
> > changes behind the scenes and you query a list from the databa

Re: dataTable and commandButton question

2005-04-13 Thread Brandon Goodin
wow, after looking at all the proposed solutions i wound up coming
back to what i was doing before. Which is exactly what Srikanth
recommended. Is there a reason why the rest of you chose such obscure
routes to the getRowData?

Also it seems that no matter what i do the UIData property that my
dataTable is bound too on my backing bean get's called twice. Once
before the action is called and once after the action method is
called. When i select an item with the commandLink I am only
interested in the id of that element. It seems that i HAVE to load the
whole list back in just to get the id from the selected index of the
list. I prefer not to keep lists in my session scope and so my managed
bean is request scope and i load lists only as i need them. But, the
auto loading that is performed by JSF does not make this easy. Is
there a way around this?

I currently have an init boolean for my UIData so that the list will
only load once from my service layer. I would prefer that the List not
have to be loaded when i select the commandLink. Like i said i'm only
interested in the id. Also, the odd thing about grabbing the selected
object using the getRowData (which looks up the index) is that the
list i grab from my service layer may have been updated. So, then the
index would return the wrong object. Does everyone simply load up all
their lists into their managedbeans and store them in session scope?

It doesn't seem that developing something as simple as this should be
so difficult.

Following is my code.

...

  private CatalogService catalogService = null;
  
  private Category category = new Category();
  
  private UIData  categoryTable = new UIData();
  private boolean categoryTableInit = false;
  
  /**
   * no arg contructor
   */
  public CategoryAdminPresentation() {
this.catalogService =
(CatalogService)ServiceFactory.getInstance().getService(CatalogService.class);
  }

  public String child() {


Category category = (Category)categoryTable.getRowData();

// create parent category template
Category parentCategory = new Category();
parentCategory.setParentCategoryId(category.getCategoryId());

categoryTable.setValue(catalogService.getChildCategories(parentCategory));

return "child";
  }
  
  /**
   * @return Returns the categoryTable.
   */
  public UIData getCategoryTable() {
return initCategoryTable(categoryTable);
  }
  /**
   * @param categoryTable The categoryTable to set.
   */
  public void setCategoryTable(UIData categoryTable) {
this.categoryTable = initCategoryTable(categoryTable);
  }
  
  private UIData initCategoryTable(UIData categoryTable) {

if(categoryTableInit==false) {
  categoryTable.setValue(catalogService.getChildCategories(category));
  categoryTableInit = true;
}

return categoryTable;

  }
  
  /**
   * @return Returns the category.
   */
  public Category getCategory() {
return category;
  }
  /**
   * @param category The category to set.
   */
  public void setCategory(Category category) {
this.category = category;
  }

...

Thanks,
Brandon

On 4/13/05, Brandon Goodin <[EMAIL PROTECTED]> wrote:
> This rowData works okay, if you are using session... but there are
> problems with this. Most of the time you want to query based on the ID
> of your object. Not the index of the object location. If you database
> changes behind the scenes and you query a list from the database, the
> index may produce a different object. The important thing to me is to
> get the ID for the query. I don't like to keep lists of objects in
> session. That's weighty and pointless.  I appreciate the previous
> contributions. I'm going to try them out later this evening.
> 
> Please correct me if i'm wrong.
> 
> Thanks,
> Brandon
> 
> On 4/13/05, Srikanth Madarapu <[EMAIL PROTECTED]> wrote:
> > In your backing bean, you must have access to the model (of your table ), 
> > just call   yourModel.getRowData() to get the current row's data or 
> > yourModel.getRowIndex to the currenty row's index.
> >
> > -Original Message-
> > From: Ray Clark [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, April 06, 2005 10:46 PM
> > To: myfaces-user@incubator.apache.org
> > Subject: dataTable and commandButton question
> >
> > I'm sure this must have been asked before but I can't
> > find it in the archives.  So please forgive me if it
> > has been asked before.
> >
> > I have a dataTable with a commandButton rendered on
> > each row.  When the commandButton is pressed I need
> > it's managed bean method to know which row the button
> > was pressed for.  So how can the method know which row
> > to process?
> >
> > Thanks,
> > Ray
> >
> > __
> > Do you Yahoo!?
> > Take Yahoo! Mail with you! Get it on your mobile phone.
> > http://mobile.yahoo.com/maildemo
> >
>


OT: Possible to use Java 5 enum with h:selectOneRadio?

2005-04-13 Thread Jonathan Eric Miller
Does anyone know if it's possible to use a Java 5 type-safe enum with 
h:selectOneRadio? On first try I'm receiving an error of "Conversion Error 
setting value 'ISDN' for 'null Converter'." when using the JSF RI. I'm 
guessing that I would need to create custom converter?

Jon


Re: predefined form values

2005-04-13 Thread Heath Borders
Oh... ok.
 
You do it on the client with _javascript_.  The inputHidden is going to re-post that value back to the request when the form is submitted, so if you want to make changes to it, you need to do so behind the scenes i the client.  The easiest way would be with some kind of generic _javascript_ function.
 
On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
Not that Heath's answer didn't work...just that I'd like to explore an easier that thespec seems cover (I posted this to sun's jsf forums too).
Reading the JSF Specification section 5.1.4 Set Value Semantics I quote:When the setValue() method on a ValueBinding is called, the syntax of thevalue binding restriction is restricted as described above. The implementation must
perform the following processing to evaluate an _expression_ of the form "#{expra.value-b}" or "#{expr-a[value-b]}": Evaluate expr-a into value-a.{cases with null, lists, maps snipped} Otherwise (value-a is a JavaBean object):
 Coerce value-b to String. If value-b is a writeable property of value-a (as per the JavaBeansSpecification), call the setter method (passing new-value); throwingReferenceSyntaxException if an exception is thrown.
 Otherwise, throw PropertyNotFoundException.Hence,should evaluate to an instance of the managed-bean SearchBean.setCreated(String s).
The thing I'm missing is 'new-value'. Since value= is the value binding attributewhere do I put 'new-value'?--Rob@objectsource.org-- Original Message ---
From: Heath Borders <[EMAIL PROTECTED]>To: MyFaces Discussion 
Sent: Wed, 13 Apr 2005 15:30:57 -0500Subject: Re: predefined form values> Ok, then you write a single quickSearch(ActionEvent) method and inside it> you check for the quickSearch parameter(s). And use those to search.
>> On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:> >> >> > I don't want to write a java method for every quick search I want. I'd
> > like to be able> > to just add a new quick search to a jsp. Say I have 3 quick searches:> >> > Look for things from: Today, Yesterday, Last Week> >> > Then next month the boss says 'I want a quick search for tomorrow!'. It
> > would be> > easier for someone to add it to the jsp page than to have to write a new> > java method> > in the bean. It's a presentation detail.> >> > --> > Rob
> >> > @objectsource.org > >> > -- Original Message ---
> > From: Enrique Medina <[EMAIL PROTECTED]>> > To: MyFaces Discussion > > Sent: Wed, 13 Apr 2005 21:05:03 +0200> > Subject: Re: predefined form values> >> > > Why not simply call another method from the commandLink (say> > > searchQuick) where those values are set in code, and then call the
> > > search method?> > >> > > On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:> > > >> > > > Say I have a form to do a search and a backing bean called SearchBean:
> > > >> > > > > > > > > > > > > > > > > > > > > > > >> > > > Now say I want to have simple links with predefined values for the
> > search> > parameters,> > > > a quick search link:> > > >> > > > > > > > > > > > > > > > > > > > 
> > > > > > > > > > > >> > > > How do I associate the hidden input values with the search bean> > methods that holds
> > > > their values? It seems like in this case I have to id all the> > components, get the> > > > request, and populate the search bean myself or I have to create the> > search bean so
> > > > it binds components instead of values. Is there a simple way to do> > this that I'm> > > > missing?> > > >> > > > --> > > > Rob
> > > >> > > > @objectsource.org > > > >> > > >
> > --- End of Original Message ---> >> >>> --> -Heath Borders-Wing> [EMAIL PROTECTED]--- End of Original Message ---
-- -Heath Borders-Wing[EMAIL PROTECTED]

Re: predefined form values

2005-04-13 Thread Rob Decker
Not that Heath's answer didn't work...just that I'd like to explore an easier 
that the 
spec seems cover (I posted this to sun's jsf forums too).

Reading the JSF Specification section 5.1.4 Set Value Semantics I quote:

When the setValue() method on a ValueBinding is called, the syntax of the
value binding restriction is restricted as described above. The implementation 
must
perform the following processing to evaluate an expression of the form “#{expra.
value-b}” or “#{expr-a[value-b]}”:

 Evaluate expr-a into value-a.
{cases with null, lists, maps snipped}
 Otherwise (value-a is a JavaBean object):
 Coerce value-b to String.
 If value-b is a writeable property of value-a (as per the JavaBeans
Specification), call the setter method (passing new-value); throwing
ReferenceSyntaxException if an exception is thrown.
 Otherwise, throw PropertyNotFoundException.

Hence,

 

should evaluate to an instance of the managed-bean SearchBean.setCreated(String 
s). 
The thing I'm missing is 'new-value'. Since value= is the value binding 
attribute 
where do I put 'new-value'?



--
Rob

@objectsource.org


-- Original Message ---
From: Heath Borders <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Wed, 13 Apr 2005 15:30:57 -0500
Subject: Re: predefined form values

> Ok, then you write a single quickSearch(ActionEvent) method and inside it 
> you check for the quickSearch parameter(s). And use those to search.
> 
> On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote: 
> > 
> > 
> > I don't want to write a java method for every quick search I want. I'd 
> > like to be able
> > to just add a new quick search to a jsp. Say I have 3 quick searches:
> > 
> > Look for things from: Today, Yesterday, Last Week
> > 
> > Then next month the boss says 'I want a quick search for tomorrow!'. It 
> > would be
> > easier for someone to add it to the jsp page than to have to write a new 
> > java method
> > in the bean. It's a presentation detail.
> > 
> > --
> > Rob
> > 
> > @objectsource.org 
> > 
> > -- Original Message ---
> > From: Enrique Medina <[EMAIL PROTECTED]>
> > To: MyFaces Discussion 
> > Sent: Wed, 13 Apr 2005 21:05:03 +0200
> > Subject: Re: predefined form values
> > 
> > > Why not simply call another method from the commandLink (say
> > > searchQuick) where those values are set in code, and then call the
> > > search method?
> > >
> > > On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Say I have a form to do a search and a backing bean called SearchBean:
> > > >
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > Now say I want to have simple links with predefined values for the 
> > search
> > parameters,
> > > > a quick search link:
> > > >
> > > >  > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > > > How do I associate the hidden input values with the search bean 
> > methods that holds
> > > > their values? It seems like in this case I have to id all the 
> > components, get the
> > > > request, and populate the search bean myself or I have to create the 
> > search bean so
> > > > it binds components instead of values. Is there a simple way to do 
> > this that I'm
> > > > missing?
> > > >
> > > > --
> > > > Rob
> > > >
> > > > @objectsource.org 
> > > >
> > > >
> > --- End of Original Message ---
> > 
> >
> 
> -- 
> -Heath Borders-Wing
> [EMAIL PROTECTED]
--- End of Original Message ---



Re: DataTable and Scroller

2005-04-13 Thread Sean Schofield
I haven't experimented with checkboxes in dataTable yet but I did just
recently add a few new dataTable examples to the simple examples. 
They are in CVS now and should be in tonights "nightly."  They show
some functionality that was previously unknown to me and probably most
other people.

sean

On 4/13/05, Enrique Medina <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> No, I didn't mean to unbind your checkbox, but to do it, so every time
> the component gets rendered, it will look at that value to see whether
> it must be checked or not. Maybe the problem you are facing is the
> well-known problem with checkboxes about false ones not being
> submitted by the browser. I remember having that problem in Struts:
> 
> http://struts.apache.org/faqs/newbie.html#checkbox
> 
> With respect to the other functionality you need, I must say that the
> component does not provide it. Making a rapid think effort, you could
> get that behaviour using hidden fields, whose value is taken from the
> dataScroller attributes and binding them to one of your bean's
> property. Something like this:
> 
> for="data"
>rowsCountVar="rowsCount"
>displayedRowsCountVar="displayedRowsCountVar"
>firstRowIndexVar="firstRowIndex"
>lastRowIndexVar="lastRowIndex"
>pageCountVar="pageCount"
>pageIndexVar="pageIndex"
>>
> binding="#{myBean.myProperty}"/>
>
> 
> But I don't know if this would be the best approach...
> 
> Anyone can provide any ideas?
> 
> On 4/13/05, kin <[EMAIL PROTECTED]> wrote:
> >  Enrique
> >
> >  Thanks for answering.
> >
> >  I've got some doubts from your reply.
> >
> >  If I don't bind my checkbox how can I know in my backing bean whether
> > it's checked?
> >
> >  And about finding the page index where I'm in, I got the example and it
> > worked ok if I needed to display the value in my page, as the example. But
> > I'm wanting to get this value in my backing bean and this is what I'm not
> > getting. I'm sorry if I missed something from your reply.
> >
> >  Thanks.
> >
> >  Enrique Medina escreveu:
> >  Hi,
> >
> > The answer to your first problem is that you might have a checkbox not
> > bind to a model value, so it simply renders as previous.
> >
> > With respect to the second problem, you can use the attributes in the
> >  tag:
> >
> >   >  for="data"
> >  rowsCountVar="rowsCount"
> >  displayedRowsCountVar="displayedRowsCountVar"
> >  firstRowIndexVar="firstRowIndex"
> >  lastRowIndexVar="lastRowIndex"
> >  pageCountVar="pageCount"
> >  pageIndexVar="pageIndex"
> >  >
> >   > value="#{example_messages['dataScroller_pages']}"
> > styleClass="standard" >
> >  
> >  
> >  
> >  
> >  
> >  
> >  
> >  
> >
> > Take a look at webapp examples from MyFaces ;-)
> >
> > On 4/13/05, kin <[EMAIL PROTECTED]> wrote:
> >
> >
> >  Hi
> >
> >  I'm new to JSF and I'm trying MyFaces. I just made a page with
> > x:dataTable and x:scroller but I'm having some troubles.
> >
> >  The first one is that x:dataTable has a column with checkBox. If I
> > check a box, then all the same rows in all the diff. pages are going to
> > be checked. How to solve that?
> >
> >  The second is that I need to get the page index in my backing bean.
> > I thought binding it as pageIndexVar="#{bean.property}" would solve my
> > problem, but it's not working.
> >
> >  Any suggestions?
> >
> > Thanks, lkin.
> >
> >
> >
> >
> >
>


Re: predefined form values

2005-04-13 Thread Heath Borders
Actually, its even simpler than that.
 
The commandLink puts the param on the postback, so you should be able to reference it by calling:
FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("paramName"); 
On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
event.getComponent()comp.getChildren()while children.hasnextif child instanceof UIParameter
   set[child.getName]=child.value;I wonder if instead of returning void from the bean setter if I return the value I canconverter="
javax.faces.DateTime"/>--Rob@objectsource.org-- Original Message ---From: Heath Borders <
[EMAIL PROTECTED]>To: MyFaces Discussion Sent: Wed, 13 Apr 2005 15:30:57 -0500Subject: Re: predefined form values
> Ok, then you write a single quickSearch(ActionEvent) method and inside it> you check for the quickSearch parameter(s). And use those to search.>> On 4/13/05, Rob Decker <
[EMAIL PROTECTED]> wrote:> >> >> > I don't want to write a java method for every quick search I want. I'd> > like to be able> > to just add a new quick search to a jsp. Say I have 3 quick searches:
> >> > Look for things from: Today, Yesterday, Last Week> >> > Then next month the boss says 'I want a quick search for tomorrow!'. It> > would be> > easier for someone to add it to the jsp page than to have to write a new
> > java method> > in the bean. It's a presentation detail.> >> > --> > Rob> >> > @objectsource.org <
http://objectsource.org>> >> > -- Original Message ---> > From: Enrique Medina <[EMAIL PROTECTED]>> > To: MyFaces Discussion <
myfaces-user@incubator.apache.org>> > Sent: Wed, 13 Apr 2005 21:05:03 +0200> > Subject: Re: predefined form values> >> > > Why not simply call another method from the commandLink (say
> > > searchQuick) where those values are set in code, and then call the> > > search method?> > >> > > On 4/13/05, Rob Decker <[EMAIL PROTECTED]
> wrote:> > > >> > > > Say I have a form to do a search and a backing bean called SearchBean:> > > >> > > > > > > > > > > > > > > > > > > > > > > >> > > > Now say I want to have simple links with predefined values for the> > search> > parameters,> > > > a quick search link:
> > > >> > > > > > > > > > > > > > > > 
> > > > > > > > > > > > > > > >> > > > How do I associate the hidden input values with the search bean
> > methods that holds> > > > their values? It seems like in this case I have to id all the> > components, get the> > > > request, and populate the search bean myself or I have to create the
> > search bean so> > > > it binds components instead of values. Is there a simple way to do> > this that I'm> > > > missing?> > > >> > > > --
> > > > Rob> > > >> > > > @objectsource.org > > > >
> > > >> > --- End of Original Message ---> >> >>> --> -Heath Borders-Wing> [EMAIL PROTECTED]
--- End of Original Message - -Heath Borders-Wing[EMAIL PROTECTED]

Re: inputCalendar validator exception

2005-04-13 Thread Enrique Medina
This is a bug I discovered and was fixed here:

http://issues.apache.org/jira/browse/MYFACES-167

On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
> I added a custom validator on the inputCalendar component. In particular, the
> validator I used was the LaterThanValidator from Hans Bergsten's JSF book. 
> When there
> is no validation problem everything is fine. When there is a validation 
> problem the
> validator sets a faces message in a ValidatorException. I would like to 
> display that
> message next to the field in question so I have a  tag 
> there.
> 
> But the inputCalendar seems to swallow up the ValidatorException and throw a
> ServletException instead:
> 
> [13 Apr 2005 16:10:04,366] ERROR 
> InsertTag.java:920> [TP-Processor2] -
> ServletException in '/SearchHeader.jsp': Expected submitted value of 
> type Date
> for component : {Component-Path : [Class:
> javax.faces.component.UIViewRoot,ViewId: /search.jsp][Class:
> javax.faces.component.UINamingContainer,Id: header][Class:
> javax.faces.component.html.HtmlForm,Id: _id19][Class:
> org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: mend]}
> org.apache.jasper.JasperException: Expected submitted value of type Date for
> component : {Component-Path : [Class:
> javax.faces.component.UIViewRoot,ViewId: /search.jsp][Class:
> javax.faces.component.UINamingContainer,Id: header][Class:
> javax.faces.component.html.HtmlForm,Id: _id19][Class:
> org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: mend]}
> 
> The id of the component (mend) is correct. What happened to my 
> ValidationException?
> It's not in the stack trace and the message 'Expected submitted value of type 
> Data for
> component' is a message from inputCalendar component, not the message my 
> validator
> threw.
> 
> --
> Rob
> 
> @objectsource.org
> 
>


Re: predefined form values

2005-04-13 Thread Heath Borders
Ok, then you write a single quickSearch(ActionEvent) method and inside it you check for the quickSearch parameter(s).  And use those to search.
On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
I don't want to write a java method for every quick search I want. I'd like to be ableto just add a new quick search to a jsp. Say I have 3 quick searches:
Look for things from: Today, Yesterday, Last WeekThen next month the boss says 'I want a quick search for tomorrow!'. It would beeasier for someone to add it to the jsp page than to have to write a new java method
in the bean. It's a presentation detail.--Rob@objectsource.org-- Original Message ---From: Enrique Medina <
[EMAIL PROTECTED]>To: MyFaces Discussion Sent: Wed, 13 Apr 2005 21:05:03 +0200Subject: Re: predefined form values
> Why not simply call another method from the commandLink (say> searchQuick) where those values are set in code, and then call the> search method?>> On 4/13/05, Rob Decker <
[EMAIL PROTECTED]> wrote:> >> > Say I have a form to do a search and a backing bean called SearchBean:> >> > > > > > > > > > 
> >> > Now say I want to have simple links with predefined values for the searchparameters,> > a quick search link:> >> > > > > > > > > > > > 
> > > >> > How do I associate the hidden input values with the search bean methods that holds> > their values? It seems like in this case I have to id all the components, get the
> > request, and populate the search bean myself or I have to create the search bean so> > it binds components instead of values. Is there a simple way to do this that I'm> > missing?> >
> > --> > Rob> >> > @objectsource.org> >> >--- End of Original Message ---
-- -Heath Borders-Wing[EMAIL PROTECTED]

Re: Problems with MyFaces Tiles support

2005-04-13 Thread Rick Hightower
Correct. This is what I mean.

On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
> Looks alot like what I have. It's not really clear to me what you mean by 
> "buttons
> don't work" though. I'm assuming you mean h:commandButton action's aren't 
> being called?
> 
> I'm using 1.0.9.rc3.
> 
> --
> Rob
> 
> @objectsource.org
> 
> -- Original Message ---
> From: "rhightower" <[EMAIL PROTECTED]>
> To: "'MyFaces Discussion'" 
> Sent: Wed, 13 Apr 2005 13:10:56 -0700
> Subject: RE: Problems with MyFaces Tiles support
> 
> > Rob,
> >
> > Actually it is a good consolation. I was worried that I was barking up the
> > wrong tree. It sounds like it works. I'll probably take the example they
> > ship and add a form to it. Instead of trying to get my larger application to
> > work, I'll start with baby steps.
> >
> > Did you see any glaring mistakes in the code listings that I sent?
> > Are you using 1.0.9 RC3 or the last release?
> >
> > -Original Message-
> > From: Rob Decker [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, April 13, 2005 12:51 PM
> > To: MyFaces Discussion
> > Subject: Re: Problems with MyFaces Tiles support
> >
> > If it's any consolation I'm using myfaces on tomcat 5.0.30 with tiles
> > support and my
> > forms/commandButtons/commandLinks work.
> >
> > --
> > Rob
> >
> > @objectsource.org
> >
> > -- Original Message ---
> > From: "rhightower" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Wed, 13 Apr 2005 12:20:20 -0700
> > Subject: Problems with MyFaces Tiles support
> >
> > > When I use MyFaces tiles support, the buttons don't work. This is taken
> > from
> > > a small app where tiles was working with faces but not the myfaces
> > > integration.
> > >
> > > I setup tiles in the web.xml as follows:
> > >
> > > [web.xml partial]
> > >
> > >
> > >
> > > tiles-definitions
> > >
> > > /WEB-INF/tiles-def.xml
> > >
> > >
> > >
> > >   
> > >
> > >
> > org.apache.myfaces.webapp.StartupServletContextListener > > tener-class>
> > >
> > >   
> > >
> > >
> > >
> > >   Faces Servlet
> > >
> > >   javax.faces.webapp.FacesServlet
> > >
> > >   0
> > >
> > >
> > >
> > > 
> > >
> > > 
> > >
> > > Faces Servlet
> > >
> > > /backend/*
> > >
> > > 
> > >
> > > 
> > >
> > > Faces Servlet
> > >
> > > /cdstore/*
> > >
> > > 
> > >
> > > 
> > >
> > > Faces Servlet
> > >
> > > *.jsf
> > >
> > > 
> > >
> > > [faces-config.xml partial]
> > >
> > >   
> > >
> > >
> > org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl > > ew-handler>
> > >
> > >   
> > >
> > >   
> > >
> > > 
> > >
> > > /pages/nav_cdForm
> > >
> > > 
> > >
> > >   
> > >
> > >   #{CDManagerBean.addCD}
> > >
> > >   success
> > >
> > >   /pages/listing.jsp
> > >
> > > 
> > >
> > >   
> > >
> > >   
> > >
> > > /pages/nav_listing
> > >
> > > 
> > >
> > >   #{CDManagerBean.editCD}
> > >
> > >   success
> > >
> > >   /pages/cdForm.jsp
> > >
> > > 
> > >
> > > 
> > >
> > >   
> > >
> > >   #{CDManagerBean.addNew}
> > >
> > >   success
> > >
> > >   /pages/cdForm.jsp
> > >
> > > 
> > >
> > >   
> > >
> > >   
> > >
> > > 
> > >
> > > /pages/nav_cdForm
> > >
> > > 
> > >
> > >   
> > >
> > >   #{CDManagerBean.updateCD}
> > >
> > >   success
> > >
> > >   /pages/listing.jsp
> > >
> > > 
> > >
> > >   
> > >
> > >   
> > >
> > > /pages/nav_store
> > >
> > > 
> > >
> > >   viewCart
> > >
> > >   /pages/showCart.jsp
> > >
> > > 
> > >
> > >   
> > >
> > >   
> > >
> > > /pages/nav_showCart
> > >
> > > 
> > >
> > >   store
> > >
> > >   /pages/store.jsp
> > >
> > > 
> > >
> > >   
> > >
> > >   
> > >
> > > 
> > >
> > >   The "backing file" bean that backs up the CD application
> > >
> > > 
> > >
> > > CDManagerBean
> > >
> > > org.lmb.CDManagerBean
> > >
> > > session
> > >
> > >   
> > >
> > >   
> > >
> > > 
> > >
> > >   The "backing file" bean that backs up shopping cart
> > >
> > > 
> > >
> > > cart
> > >
> > > org.lmb.ShoppingCartBean
> > >
> > > session
> > >
> > >   
> > >
> > > [tiles-def.xml partial]
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > 
> > >
> > > I get no error message from MyFaces in the console. The log level is set
> > to
> > > INFO.
> > >
> > > Background:
> > >
> 

RE: Problems with MyFaces Tiles support

2005-04-13 Thread Rob Decker
Looks alot like what I have. It's not really clear to me what you mean by 
"buttons 
don't work" though. I'm assuming you mean h:commandButton action's aren't being 
called?

I'm using 1.0.9.rc3.

--
Rob

@objectsource.org


-- Original Message ---
From: "rhightower" <[EMAIL PROTECTED]>
To: "'MyFaces Discussion'" 
Sent: Wed, 13 Apr 2005 13:10:56 -0700
Subject: RE: Problems with MyFaces Tiles support

> Rob,
> 
> Actually it is a good consolation. I was worried that I was barking up the
> wrong tree. It sounds like it works. I'll probably take the example they
> ship and add a form to it. Instead of trying to get my larger application to
> work, I'll start with baby steps.
> 
> Did you see any glaring mistakes in the code listings that I sent?
> Are you using 1.0.9 RC3 or the last release?
> 
> -Original Message-
> From: Rob Decker [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 13, 2005 12:51 PM
> To: MyFaces Discussion
> Subject: Re: Problems with MyFaces Tiles support
> 
> If it's any consolation I'm using myfaces on tomcat 5.0.30 with tiles
> support and my 
> forms/commandButtons/commandLinks work.
> 
> --
> Rob
> 
> @objectsource.org
> 
> -- Original Message ---
> From: "rhightower" <[EMAIL PROTECTED]>
> To: 
> Sent: Wed, 13 Apr 2005 12:20:20 -0700
> Subject: Problems with MyFaces Tiles support
> 
> > When I use MyFaces tiles support, the buttons don't work. This is taken
> from
> > a small app where tiles was working with faces but not the myfaces
> > integration.
> > 
> > I setup tiles in the web.xml as follows:
> > 
> > [web.xml partial]
> > 
> >
> > 
> > tiles-definitions
> > 
> > /WEB-INF/tiles-def.xml
> > 
> >
> > 
> >   
> > 
> >
> org.apache.myfaces.webapp.StartupServletContextListener > tener-class>
> > 
> >   
> > 
> >
> > 
> >   Faces Servlet
> > 
> >   javax.faces.webapp.FacesServlet
> > 
> >   0
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > Faces Servlet
> > 
> > /backend/*
> > 
> > 
> > 
> > 
> > 
> > Faces Servlet
> > 
> > /cdstore/*
> > 
> > 
> > 
> > 
> > 
> > Faces Servlet
> > 
> > *.jsf
> > 
> > 
> > 
> > [faces-config.xml partial]
> > 
> >   
> > 
> >
> org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl > ew-handler>
> > 
> >   
> > 
> >   
> > 
> > 
> > 
> > /pages/nav_cdForm
> > 
> > 
> > 
> >   
> > 
> >   #{CDManagerBean.addCD}
> > 
> >   success
> > 
> >   /pages/listing.jsp
> > 
> > 
> > 
> >   
> > 
> >   
> > 
> > /pages/nav_listing
> > 
> > 
> > 
> >   #{CDManagerBean.editCD}
> > 
> >   success
> > 
> >   /pages/cdForm.jsp
> > 
> > 
> > 
> > 
> > 
> >   
> > 
> >   #{CDManagerBean.addNew}
> > 
> >   success
> > 
> >   /pages/cdForm.jsp
> > 
> > 
> > 
> >   
> > 
> >   
> > 
> > 
> > 
> > /pages/nav_cdForm
> > 
> > 
> > 
> >   
> > 
> >   #{CDManagerBean.updateCD}
> > 
> >   success
> > 
> >   /pages/listing.jsp
> > 
> > 
> > 
> >   
> > 
> >   
> > 
> > /pages/nav_store
> > 
> > 
> > 
> >   viewCart
> > 
> >   /pages/showCart.jsp
> > 
> > 
> > 
> >   
> > 
> >   
> > 
> > /pages/nav_showCart
> > 
> > 
> > 
> >   store
> > 
> >   /pages/store.jsp
> > 
> > 
> > 
> >   
> > 
> >   
> > 
> > 
> > 
> >   The "backing file" bean that backs up the CD application
> > 
> > 
> > 
> > CDManagerBean
> > 
> > org.lmb.CDManagerBean
> > 
> > session
> > 
> >   
> > 
> >   
> > 
> > 
> > 
> >   The "backing file" bean that backs up shopping cart
> > 
> > 
> > 
> > cart
> > 
> > org.lmb.ShoppingCartBean
> > 
> > session
> > 
> >   
> > 
> > [tiles-def.xml partial]
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I get no error message from MyFaces in the console. The log level is set
> to
> > INFO.
> > 
> > Background:
> > 
> > I got Tiles working with MyFaces tiles support, or at least I thought I
> did.
> > This took a bit of doing. The docs are non-existent, and the sample code
> has
> > some hidden mojo to get it to work. I'll document it later (assuming I get
> > past this next hump). I am more than willing to donate any documentation I
> > generate.
> > 
> > However, none of the buttons work running under Tomcat 5.5 anymore. I'll
> try
> > Tomcat 5.0. It does not work in Tomcat 5.0 either (there were some notes
> how
> > to get MyFaces to work on Tomcat 5.5 b/c of known issue

inputCalendar validator exception

2005-04-13 Thread Rob Decker
I added a custom validator on the inputCalendar component. In particular, the 
validator I used was the LaterThanValidator from Hans Bergsten's JSF book. When 
there 
is no validation problem everything is fine. When there is a validation problem 
the 
validator sets a faces message in a ValidatorException. I would like to display 
that 
message next to the field in question so I have a  tag 
there.

But the inputCalendar seems to swallow up the ValidatorException and throw a 
ServletException instead:

[13 Apr 2005 16:10:04,366] ERROR  
InsertTag.java:920> [TP-Processor2] - 
ServletException in '/SearchHeader.jsp': Expected submitted value of 
type Date 
for component : {Component-Path : [Class: 
javax.faces.component.UIViewRoot,ViewId: /search.jsp][Class: 
javax.faces.component.UINamingContainer,Id: header][Class: 
javax.faces.component.html.HtmlForm,Id: _id19][Class: 
org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: mend]}
org.apache.jasper.JasperException: Expected submitted value of type Date for 
component : {Component-Path : [Class: 
javax.faces.component.UIViewRoot,ViewId: /search.jsp][Class: 
javax.faces.component.UINamingContainer,Id: header][Class: 
javax.faces.component.html.HtmlForm,Id: _id19][Class: 
org.apache.myfaces.custom.calendar.HtmlInputCalendar,Id: mend]}


The id of the component (mend) is correct. What happened to my 
ValidationException? 
It's not in the stack trace and the message 'Expected submitted value of type 
Data for 
component' is a message from inputCalendar component, not the message my 
validator 
threw.

--
Rob

@objectsource.org



Re: Problems with MyFaces Tiles support

2005-04-13 Thread Duong BaTien
You may take a second look at it. The following site runs on tomcat 
5.0.28, myfaces 1.0.9 with its tiles viewHandler http://www.dbgroups.com

BaTien
DBGROUPS
rhightower wrote:
When I use MyFaces tiles support, the buttons don’t work. This is 
taken from a small app where tiles was working with faces but not the 
myfaces integration.

I setup tiles in the web.xml as follows:
[web.xml partial]

tiles-definitions
/WEB-INF/tiles-def.xml


org.apache.myfaces.webapp.StartupServletContextListener


Faces Servlet
javax.faces.webapp.FacesServlet
0



Faces Servlet
/backend/*


Faces Servlet
/cdstore/*


Faces Servlet
*.jsf

[faces-config.xml partial]

org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl



/pages/nav_cdForm


#{CDManagerBean.addCD}
success
/pages/listing.jsp



/pages/nav_listing

#{CDManagerBean.editCD}
success
/pages/cdForm.jsp



#{CDManagerBean.addNew}
success
/pages/cdForm.jsp




/pages/nav_cdForm


#{CDManagerBean.updateCD}
success
/pages/listing.jsp



/pages/nav_store

viewCart
/pages/showCart.jsp



/pages/nav_showCart

store
/pages/store.jsp




The "backing file" bean that backs up the CD application

CDManagerBean
org.lmb.CDManagerBean
session



The "backing file" bean that backs up shopping cart

cart
org.lmb.ShoppingCartBean
session

[tiles-def.xml partial]




























I get no error message from MyFaces in the console. The log level is 
set to INFO.

Background:
I got Tiles working with MyFaces tiles support, or at least I thought 
I did. This took a bit of doing. The docs are non-existent, and the 
sample code has some hidden mojo to get it to work. I'll document it 
later (assuming I get past this next hump). I am more than willing to 
donate any documentation I generate.

However, none of the buttons work running under Tomcat 5.5 anymore. 
I'll try Tomcat 5.0. It does not work in Tomcat 5.0 either (there were 
some notes how to get MyFaces to work on Tomcat 5.5 b/c of known 
issues so I thought I would take this out of the debate).

It does not seem to work with Tomcat 5.0. None of the buttons seem to 
go to the right place. It just stays on the current form.

The buttons and such do work when I am remove MyFaces Tiles support.
(MyFaces Tiles support page 
http://myfaces.apache.org/components/tiles.html)

When I add MyFaces Tiles support back, it is broke.
Time to ask the user group.
I noticed that the sample Tiles support project has pages with no 
forms. This is probably not a very good test.

-- r i c k h i g h t o w e r
-- [EMAIL PROTECTED]
-- http://www.arc-mind.com 
JSF vs. FUD
http://www-106.ibm.com/developerworks/library/j-jsf1/
http://www-106.ibm.com/developerworks/library/j-jsf2/
Spring is good
http://linuxworld.com/story/47735.htm
JSF is good
http://www.sys-con.com/story/?storyid=46402&DE=1 





RE: Problems with MyFaces Tiles support

2005-04-13 Thread rhightower
Rob,

Actually it is a good consolation. I was worried that I was barking up the
wrong tree. It sounds like it works. I'll probably take the example they
ship and add a form to it. Instead of trying to get my larger application to
work, I'll start with baby steps.

Did you see any glaring mistakes in the code listings that I sent?
Are you using 1.0.9 RC3 or the last release? 

-Original Message-
From: Rob Decker [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 13, 2005 12:51 PM
To: MyFaces Discussion
Subject: Re: Problems with MyFaces Tiles support

If it's any consolation I'm using myfaces on tomcat 5.0.30 with tiles
support and my 
forms/commandButtons/commandLinks work.

--
Rob

@objectsource.org


-- Original Message ---
From: "rhightower" <[EMAIL PROTECTED]>
To: 
Sent: Wed, 13 Apr 2005 12:20:20 -0700
Subject: Problems with MyFaces Tiles support

> When I use MyFaces tiles support, the buttons don't work. This is taken
from
> a small app where tiles was working with faces but not the myfaces
> integration.
> 
> I setup tiles in the web.xml as follows:
> 
> [web.xml partial]
> 
>
> 
> tiles-definitions
> 
> /WEB-INF/tiles-def.xml
> 
>
> 
>   
> 
>
org.apache.myfaces.webapp.StartupServletContextListener tener-class>
> 
>   
> 
>
> 
>   Faces Servlet
> 
>   javax.faces.webapp.FacesServlet
> 
>   0
> 
>
> 
> 
> 
> 
> 
> Faces Servlet
> 
> /backend/*
> 
> 
> 
> 
> 
> Faces Servlet
> 
> /cdstore/*
> 
> 
> 
> 
> 
> Faces Servlet
> 
> *.jsf
> 
> 
> 
> [faces-config.xml partial]
> 
>   
> 
>
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl ew-handler>
> 
>   
> 
>   
> 
> 
> 
> /pages/nav_cdForm
> 
> 
> 
>   
> 
>   #{CDManagerBean.addCD}
> 
>   success
> 
>   /pages/listing.jsp
> 
> 
> 
>   
> 
>   
> 
> /pages/nav_listing
> 
> 
> 
>   #{CDManagerBean.editCD}
> 
>   success
> 
>   /pages/cdForm.jsp
> 
> 
> 
> 
> 
>   
> 
>   #{CDManagerBean.addNew}
> 
>   success
> 
>   /pages/cdForm.jsp
> 
> 
> 
>   
> 
>   
> 
> 
> 
> /pages/nav_cdForm
> 
> 
> 
>   
> 
>   #{CDManagerBean.updateCD}
> 
>   success
> 
>   /pages/listing.jsp
> 
> 
> 
>   
> 
>   
> 
> /pages/nav_store
> 
> 
> 
>   viewCart
> 
>   /pages/showCart.jsp
> 
> 
> 
>   
> 
>   
> 
> /pages/nav_showCart
> 
> 
> 
>   store
> 
>   /pages/store.jsp
> 
> 
> 
>   
> 
>   
> 
> 
> 
>   The "backing file" bean that backs up the CD application
> 
> 
> 
> CDManagerBean
> 
> org.lmb.CDManagerBean
> 
> session
> 
>   
> 
>   
> 
> 
> 
>   The "backing file" bean that backs up shopping cart
> 
> 
> 
> cart
> 
> org.lmb.ShoppingCartBean
> 
> session
> 
>   
> 
> [tiles-def.xml partial]
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I get no error message from MyFaces in the console. The log level is set
to
> INFO.
> 
> Background:
> 
> I got Tiles working with MyFaces tiles support, or at least I thought I
did.
> This took a bit of doing. The docs are non-existent, and the sample code
has
> some hidden mojo to get it to work. I'll document it later (assuming I get
> past this next hump). I am more than willing to donate any documentation I
> generate.
> 
> However, none of the buttons work running under Tomcat 5.5 anymore. I'll
try
> Tomcat 5.0. It does not work in Tomcat 5.0 either (there were some notes
how
> to get MyFaces to work on Tomcat 5.5 b/c of known issues so I thought I
> would take this out of the debate).
> 
> It does not seem to work with Tomcat 5.0. None of the buttons seem to go
to
> the right place. It just stays on the current form.
> 
> The buttons and such do work when I am remove  MyFaces Tiles support.
> 
> (MyFaces Tiles support  page
> http://myfaces.apache.org/components/tiles.html)
> 
> When I add MyFaces Tiles support back, it is broke.
> 
> Time to ask the user group.
> 
> I noticed that the sample Tiles support project has pages with no forms.
> This is probably not a very good test.
> 
> -- r i c k h i g h t o w e r
> 
> -- [EMAIL PROTECTED]
> 
> --   http://www.arc-mind.com
> 
> JSF vs. FUD
> 
>  
> http://www-106.ibm.com/developerworks/library/j-jsf1/
> 
> http://www-106.ibm.com/developerworks/library/j-jsf2/
> 
> Spring is good
> 
>  
> http://linuxworld.com/story/47735.htm
> 
> JSF is good
> 
>  

Re: Problems with MyFaces Tiles support

2005-04-13 Thread Rob Decker
If it's any consolation I'm using myfaces on tomcat 5.0.30 with tiles support 
and my 
forms/commandButtons/commandLinks work.

--
Rob

@objectsource.org


-- Original Message ---
From: "rhightower" <[EMAIL PROTECTED]>
To: 
Sent: Wed, 13 Apr 2005 12:20:20 -0700
Subject: Problems with MyFaces Tiles support

> When I use MyFaces tiles support, the buttons don't work. This is taken from
> a small app where tiles was working with faces but not the myfaces
> integration.
> 
> I setup tiles in the web.xml as follows:
> 
> [web.xml partial]
> 
>
> 
> tiles-definitions
> 
> /WEB-INF/tiles-def.xml
> 
>
> 
>   
> 
> org.apache.myfaces.webapp.StartupServletContextListener tener-class>
> 
>   
> 
>
> 
>   Faces Servlet
> 
>   javax.faces.webapp.FacesServlet
> 
>   0
> 
>
> 
> 
> 
> 
> 
> Faces Servlet
> 
> /backend/*
> 
> 
> 
> 
> 
> Faces Servlet
> 
> /cdstore/*
> 
> 
> 
> 
> 
> Faces Servlet
> 
> *.jsf
> 
> 
> 
> [faces-config.xml partial]
> 
>   
> 
> org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl ew-handler>
> 
>   
> 
>   
> 
> 
> 
> /pages/nav_cdForm
> 
> 
> 
>   
> 
>   #{CDManagerBean.addCD}
> 
>   success
> 
>   /pages/listing.jsp
> 
> 
> 
>   
> 
>   
> 
> /pages/nav_listing
> 
> 
> 
>   #{CDManagerBean.editCD}
> 
>   success
> 
>   /pages/cdForm.jsp
> 
> 
> 
> 
> 
>   
> 
>   #{CDManagerBean.addNew}
> 
>   success
> 
>   /pages/cdForm.jsp
> 
> 
> 
>   
> 
>   
> 
> 
> 
> /pages/nav_cdForm
> 
> 
> 
>   
> 
>   #{CDManagerBean.updateCD}
> 
>   success
> 
>   /pages/listing.jsp
> 
> 
> 
>   
> 
>   
> 
> /pages/nav_store
> 
> 
> 
>   viewCart
> 
>   /pages/showCart.jsp
> 
> 
> 
>   
> 
>   
> 
> /pages/nav_showCart
> 
> 
> 
>   store
> 
>   /pages/store.jsp
> 
> 
> 
>   
> 
>   
> 
> 
> 
>   The "backing file" bean that backs up the CD application
> 
> 
> 
> CDManagerBean
> 
> org.lmb.CDManagerBean
> 
> session
> 
>   
> 
>   
> 
> 
> 
>   The "backing file" bean that backs up shopping cart
> 
> 
> 
> cart
> 
> org.lmb.ShoppingCartBean
> 
> session
> 
>   
> 
> [tiles-def.xml partial]
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> I get no error message from MyFaces in the console. The log level is set to
> INFO.
> 
> Background:
> 
> I got Tiles working with MyFaces tiles support, or at least I thought I did.
> This took a bit of doing. The docs are non-existent, and the sample code has
> some hidden mojo to get it to work. I'll document it later (assuming I get
> past this next hump). I am more than willing to donate any documentation I
> generate.
> 
> However, none of the buttons work running under Tomcat 5.5 anymore. I'll try
> Tomcat 5.0. It does not work in Tomcat 5.0 either (there were some notes how
> to get MyFaces to work on Tomcat 5.5 b/c of known issues so I thought I
> would take this out of the debate).
> 
> It does not seem to work with Tomcat 5.0. None of the buttons seem to go to
> the right place. It just stays on the current form.
> 
> The buttons and such do work when I am remove  MyFaces Tiles support.
> 
> (MyFaces Tiles support  page
> http://myfaces.apache.org/components/tiles.html)
> 
> When I add MyFaces Tiles support back, it is broke.
> 
> Time to ask the user group.
> 
> I noticed that the sample Tiles support project has pages with no forms.
> This is probably not a very good test.
> 
> -- r i c k h i g h t o w e r
> 
> -- [EMAIL PROTECTED]
> 
> --   http://www.arc-mind.com
> 
> JSF vs. FUD
> 
>  
> http://www-106.ibm.com/developerworks/library/j-jsf1/
> 
> http://www-106.ibm.com/developerworks/library/j-jsf2/
> 
> Spring is good
> 
>  
> http://linuxworld.com/story/47735.htm
> 
> JSF is good
> 
>  
> http://www.sys-con.com/story/?storyid=46402&DE=1
--- End of Original Message ---



Re: predefined form values

2005-04-13 Thread Rob Decker

I don't want to write a java method for every quick search I want. I'd like to 
be able 
to just add a new quick search to a jsp. Say I have 3 quick searches:

Look for things from: Today, Yesterday, Last Week

Then next month the boss says 'I want a quick search for tomorrow!'. It would 
be 
easier for someone to add it to the jsp page than to have to write a new java 
method 
in the bean. It's a presentation detail.

--
Rob

@objectsource.org


-- Original Message ---
From: Enrique Medina <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Wed, 13 Apr 2005 21:05:03 +0200
Subject: Re: predefined form values

> Why not simply call another method from the commandLink (say
> searchQuick) where those values are set in code, and then call the
> search method?
> 
> On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
> > 
> > Say I have a form to do a search and a backing bean called SearchBean:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Now say I want to have simple links with predefined values for the search 
parameters,
> > a quick search link:
> > 
> >  > 
> > 
> > 
> > 
> > 
> > 
> > 
> > How do I associate the hidden input values with the search bean methods 
> > that holds
> > their values? It seems like in this case I have to id all the components, 
> > get the
> > request, and populate the search bean myself or I have to create the search 
> > bean so
> > it binds components instead of values. Is there a simple way to do this 
> > that I'm
> > missing?
> > 
> > --
> > Rob
> > 
> > @objectsource.org
> > 
> >
--- End of Original Message ---



Re: predefined form values

2005-04-13 Thread Rob Decker
I was trying 's but I don't see how the name attribute gets the 
association 
with the searchBean.lastModified expression, in other words:



Won't I have to get this out of the request? In that case I'll need the second 
solution anyway at least in terms of a special action to populate the bean.


While defining action methods in the bean to deal with it would work it would 
be nicer 
if new 'quick links' could simply be created in a jsp page instead of having to 
write 
a new java method.


--
Rob

@objectsource.org


-- Original Message ---
From: Heath Borders <[EMAIL PROTECTED]>
To: MyFaces Discussion 
Sent: Wed, 13 Apr 2005 14:07:45 -0500
Subject: Re: predefined form values

> You can use 's inside the quick links, or you could have the 
> quick links fire different action events, and those action events could 
> contains the defaults instead of having them in your JSP.
> 
> On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote: 
> > 
> > 
> > Say I have a form to do a search and a backing bean called SearchBean:
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Now say I want to have simple links with predefined values for the search 
> > parameters,
> > a quick search link:
> > 
> >  > 
> > 
> > 
> > 
> > 
> > 
> > 
> > How do I associate the hidden input values with the search bean methods 
> > that holds
> > their values? It seems like in this case I have to id all the components, 
> > get the
> > request, and populate the search bean myself or I have to create the 
> > search bean so
> > it binds components instead of values. Is there a simple way to do this 
> > that I'm
> > missing?
> > 
> > --
> > Rob
> > 
> > @objectsource.org 
> > 
> >
> 
> -- 
> -Heath Borders-Wing
> [EMAIL PROTECTED]
--- End of Original Message ---



Re: predefined form values

2005-04-13 Thread Heath Borders
You can use 's inside the quick links, or you could have the quick links fire different action events, and those action events could contains the defaults instead of having them in your JSP.
On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
Say I have a form to do a search and a backing bean called SearchBean:
Now say I want to have simple links with predefined values for the search parameters,a quick search link:
How do I associate the hidden input values with the search bean methods that holds
their values? It seems like in this case I have to id all the components, get therequest, and populate the search bean myself or I have to create the search bean soit binds components instead of values. Is there a simple way to do this that I'm
missing?--Rob@objectsource.org-- -Heath Borders-Wing[EMAIL PROTECTED]


Re: predefined form values

2005-04-13 Thread Enrique Medina
Why not simply call another method from the commandLink (say
searchQuick) where those values are set in code, and then call the
search method?

On 4/13/05, Rob Decker <[EMAIL PROTECTED]> wrote:
> 
> Say I have a form to do a search and a backing bean called SearchBean:
> 
> 
> 
> 
> 
> 
> 
> Now say I want to have simple links with predefined values for the search 
> parameters,
> a quick search link:
> 
>  
> 
> 
> 
> 
> 
> 
> How do I associate the hidden input values with the search bean methods that 
> holds
> their values? It seems like in this case I have to id all the components, get 
> the
> request, and populate the search bean myself or I have to create the search 
> bean so
> it binds components instead of values. Is there a simple way to do this that 
> I'm
> missing?
> 
> --
> Rob
> 
> @objectsource.org
> 
>


Re: DataTable and Scroller

2005-04-13 Thread Enrique Medina
Hi,

No, I didn't mean to unbind your checkbox, but to do it, so every time
the component gets rendered, it will look at that value to see whether
it must be checked or not. Maybe the problem you are facing is the
well-known problem with checkboxes about false ones not being
submitted by the browser. I remember having that problem in Struts:

http://struts.apache.org/faqs/newbie.html#checkbox

With respect to the other functionality you need, I must say that the
component does not provide it. Making a rapid think effort, you could
get that behaviour using hidden fields, whose value is taken from the
dataScroller attributes and binding them to one of your bean's
property. Something like this:


   
   

But I don't know if this would be the best approach...

Anyone can provide any ideas?

On 4/13/05, kin <[EMAIL PROTECTED]> wrote:
>  Enrique
>  
>  Thanks for answering.
>  
>  I've got some doubts from your reply.
>  
>  If I don't bind my checkbox how can I know in my backing bean whether
> it's checked?
>  
>  And about finding the page index where I'm in, I got the example and it
> worked ok if I needed to display the value in my page, as the example. But
> I'm wanting to get this value in my backing bean and this is what I'm not
> getting. I'm sorry if I missed something from your reply.
>  
>  Thanks.
>  
>  Enrique Medina escreveu: 
>  Hi,
> 
> The answer to your first problem is that you might have a checkbox not
> bind to a model value, so it simply renders as previous.
> 
> With respect to the second problem, you can use the attributes in the
>  tag:
> 
>for="data"
>  rowsCountVar="rowsCount"
>  displayedRowsCountVar="displayedRowsCountVar"
>  firstRowIndexVar="firstRowIndex"
>  lastRowIndexVar="lastRowIndex"
>  pageCountVar="pageCount"
>  pageIndexVar="pageIndex"
>  >
>   value="#{example_messages['dataScroller_pages']}"
> styleClass="standard" >
>  
>  
>  
>  
>  
>  
>  
>  
> 
> Take a look at webapp examples from MyFaces ;-)
> 
> On 4/13/05, kin <[EMAIL PROTECTED]> wrote:
>  
>  
>  Hi
> 
>  I'm new to JSF and I'm trying MyFaces. I just made a page with
> x:dataTable and x:scroller but I'm having some troubles.
> 
>  The first one is that x:dataTable has a column with checkBox. If I
> check a box, then all the same rows in all the diff. pages are going to
> be checked. How to solve that?
> 
>  The second is that I need to get the page index in my backing bean.
> I thought binding it as pageIndexVar="#{bean.property}" would solve my
> problem, but it's not working.
> 
>  Any suggestions?
> 
> Thanks, lkin.
> 
>  
>  
>  
>


predefined form values

2005-04-13 Thread Rob Decker

Say I have a form to do a search and a backing bean called SearchBean:







Now say I want to have simple links with predefined values for the search 
parameters, 
a quick search link:








How do I associate the hidden input values with the search bean methods that 
holds 
their values? It seems like in this case I have to id all the components, get 
the
request, and populate the search bean myself or I have to create the search 
bean so
it binds components instead of values. Is there a simple way to do this that 
I'm 
missing?

--
Rob

@objectsource.org



Re: dataTable and commandButton question

2005-04-13 Thread Brandon Goodin
This rowData works okay, if you are using session... but there are
problems with this. Most of the time you want to query based on the ID
of your object. Not the index of the object location. If you database
changes behind the scenes and you query a list from the database, the
index may produce a different object. The important thing to me is to
get the ID for the query. I don't like to keep lists of objects in
session. That's weighty and pointless.  I appreciate the previous
contributions. I'm going to try them out later this evening.

Please correct me if i'm wrong.

Thanks,
Brandon

On 4/13/05, Srikanth Madarapu <[EMAIL PROTECTED]> wrote:
> In your backing bean, you must have access to the model (of your table ), 
> just call   yourModel.getRowData() to get the current row's data or 
> yourModel.getRowIndex to the currenty row's index.
> 
> -Original Message-
> From: Ray Clark [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 06, 2005 10:46 PM
> To: myfaces-user@incubator.apache.org
> Subject: dataTable and commandButton question
> 
> I'm sure this must have been asked before but I can't
> find it in the archives.  So please forgive me if it
> has been asked before.
> 
> I have a dataTable with a commandButton rendered on
> each row.  When the commandButton is pressed I need
> it's managed bean method to know which row the button
> was pressed for.  So how can the method know which row
> to process?
> 
> Thanks,
> Ray
> 
> __
> Do you Yahoo!?
> Take Yahoo! Mail with you! Get it on your mobile phone.
> http://mobile.yahoo.com/maildemo
>


Re: DataTable and Scroller

2005-04-13 Thread kin




Enrique

    Thanks for answering.

    I've got some doubts from your reply.

    If I don't bind my checkbox how can I know in my backing bean
whether it's checked?

    And about finding the page index where I'm in, I got the example
and it worked ok if I needed to display the value in my page, as the
example. But I'm wanting to get this value in my backing bean and this
is what I'm not getting. I'm sorry if I missed something from your
reply.

Thanks.

Enrique Medina escreveu:

  Hi,

The answer to your first problem is that you might have a checkbox not
bind to a model value, so it simply renders as previous.

With respect to the second problem, you can use the attributes in the
 tag:












Take a look at webapp examples from MyFaces ;-)

On 4/13/05, kin <[EMAIL PROTECTED]> wrote:
  
  
Hi

I'm new to JSF and I'm trying MyFaces. I just made a page with
x:dataTable and x:scroller but I'm having some troubles.

The first one is that x:dataTable has a column with checkBox. If I
check a box, then all the same rows in all the diff. pages are going to
be checked. How to solve that?

The second is that I need to get the page index in my backing bean.
I thought binding it as pageIndexVar="#{bean.property}" would solve my
problem, but it's not working.

Any suggestions?

Thanks, lkin.


  
  
  






Re: DataTable and Scroller

2005-04-13 Thread Enrique Medina
Hi,

The answer to your first problem is that you might have a checkbox not
bind to a model value, so it simply renders as previous.

With respect to the second problem, you can use the attributes in the
 tag:












Take a look at webapp examples from MyFaces ;-)

On 4/13/05, kin <[EMAIL PROTECTED]> wrote:
> Hi
> 
> I'm new to JSF and I'm trying MyFaces. I just made a page with
> x:dataTable and x:scroller but I'm having some troubles.
> 
> The first one is that x:dataTable has a column with checkBox. If I
> check a box, then all the same rows in all the diff. pages are going to
> be checked. How to solve that?
> 
> The second is that I need to get the page index in my backing bean.
> I thought binding it as pageIndexVar="#{bean.property}" would solve my
> problem, but it's not working.
> 
> Any suggestions?
> 
> Thanks, lkin.
>


RE: dataTable and commandButton question

2005-04-13 Thread Srikanth Madarapu
In your backing bean, you must have access to the model (of your table ), just 
call   yourModel.getRowData() to get the current row's data or 
yourModel.getRowIndex to the currenty row's index.

-Original Message-
From: Ray Clark [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 06, 2005 10:46 PM
To: myfaces-user@incubator.apache.org
Subject: dataTable and commandButton question


I'm sure this must have been asked before but I can't
find it in the archives.  So please forgive me if it
has been asked before.

I have a dataTable with a commandButton rendered on
each row.  When the commandButton is pressed I need
it's managed bean method to know which row the button
was pressed for.  So how can the method know which row
to process?

Thanks,
Ray



__ 
Do you Yahoo!? 
Take Yahoo! Mail with you! Get it on your mobile phone. 
http://mobile.yahoo.com/maildemo 


Re: Loading javascript files from jar?

2005-04-13 Thread Matt Fury
Ok, I got the filters turned on. There was an error
with conflicting jar files. We're actually just
mapping plain .jsp files w/ JSF content.

Unfortunately it still does not appear to resolve the
*.js javascript source files or the *.css files for
that matter. Is there anything else I should be doing
besides the filter? I tried checking out the examples
but I didn't see anything out of the ordinary that I
was doing either.

Thanks for the help.

-Matt


--- Sean Schofield <[EMAIL PROTECTED]> wrote:
> Yes the extensions filter is what you are looking
> for.  Sylvain added
> some excellent documentation on that the other day. 
> If that doesn't
> explain it then take a look at the tree2 source code
> and how it makes
> use of it in the simple examples.
> 
> sean
> 
> On Apr 12, 2005 12:19 PM, Matt Fury
> <[EMAIL PROTECTED]> wrote:
> > Hmm, have you had any experience with
> > MyFacesExtensionsFilter? This seems to be the
> answer
> > on the myfaces site but I cannot get it to work
> and/or
> > and not quite sure if it will work.
> > 
> > -Matt
> > 
> > --- Heath Borders <[EMAIL PROTECTED]> wrote:
> > > We had to hack the MyFaces resource servlet to
> get
> > > it going in our own
> > > component jar, but it works fine once we got it
> > > working.
> > >
> > > On Apr 12, 2005 9:57 AM, Matt Fury
> > > <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Has anyone had any luck loading javascript
> source
> > > > files or stylesheets from a jar file?
> > > >
> > > > I've been told there is an old trick to the
> tune
> > > of
> > > > something like this:
> > > >
> > > >  > > > src="jar:file:
> > > >
> > >
> >
>
myfaces.jar!/org/apache/myfaces/custom/navmenu/resource/jscookmenu/JSCookMenu.js
> > > > "
> > > > type="text/javascript">
> > > >  > > > src="jar:file:
> > > >
> > >
> >
>
myfaces.jar!/org/apache/myfaces/custom/navmenu/resource/jscookmenu/ThemeOffice/theme.js
> > > > ">
> > > >
> > > > But I am not having any luck. Any ideas?
> > > >
> > > > Thanks!
> > > >
> > > > -Matt
> > > >
> > > >
> > >
> > >
> > > --
> > > -Heath Borders-Wing
> > > [EMAIL PROTECTED]
> > >
> >
> 


Re: How to get component id in jsp

2005-04-13 Thread Heath Borders
The component is called 
 
You use it like this:
 



 
Then, you get your component in _javascript_ like this:
document.getElementById(document.getElementById('myInput').title);
 
We are using this tag all over our app because we needed a solution to the problem long before forceId came around.  As some point, hopefully we will convert ourselves over to forceId. 
On 4/13/05, Stefan Langer <[EMAIL PROTECTED]> wrote:
Galen Dunkleberger wrote:>Is there a good way to pull the client id of a particular component in
>the jsp? What I'm trying to do is pass the id to _javascript_ calls. I>know how to figure out the id manually but is would be nice to be able>to do something like this...>/>>>Anyone have any ideas how this might work?> Thanks,
> Galen>>A while back I found a component from someone else on jsfcentral.comthat provides a proxytag for ids. I think it was call _javascript_proxy
but I'm not sure and can't seem to find it at the moment. Basically itprovides a tag that can retrieve the id and assigns it to a defined_javascript_ variable. The nice thing about it, it can be used withstandard components also. The bad thing: more writing and it isn't as
nicely integrated as forceid is.Maybe myfaces could provide some component like this for means ofproviding ids for standard components.RegardsStefan-- -Heath Borders-Wing
[EMAIL PROTECTED]

Re: set properties of bean managed by dataTable tag

2005-04-13 Thread Heath Borders
You can set the property using an  inside your datatable.  As your datatable interates over the rows in the contactList, you can edit each contact bean independently.
 
   
  
  

  
     
 
Don't forget to define your datatable columns. 
On 4/13/05, Jan Bols <[EMAIL PROTECTED]> wrote:
I have a jsf-page containing the following:         
 
 
The allContacts bean is a managed bean and is specified in the web.xmlfile:
      allContacts   MyContacts   session
   The allContacts bean contains a list contactList containing contact-beans.The contact bean contains a property called myConnection that holds theconnection to the database.
I want to set that connection property from within the jsf-page or theweb.xml file but how do I do that? In jstl this can be done with or in jsp with  but how do I do this in jsf?
ThanksJan-- -Heath Borders-Wing[EMAIL PROTECTED]

DataTable and Scroller

2005-04-13 Thread kin
Hi
   I'm new to JSF and I'm trying MyFaces. I just made a page with 
x:dataTable and x:scroller but I'm having some troubles.

   The first one is that x:dataTable has a column with checkBox. If I 
check a box, then all the same rows in all the diff. pages are going to 
be checked. How to solve that?

   The second is that I need to get the page index in my backing bean. 
I thought binding it as pageIndexVar="#{bean.property}" would solve my 
problem, but it's not working.

   Any suggestions?
Thanks, lkin.


Re: Multiple time method is executing for tree2

2005-04-13 Thread Rob Decker
It gets called whenever setValue is called on the tree tag instance. You can
download the source code and look at that to determine exactly what's
happening.

- Original Message - 
From: "Mihir Solanki" <[EMAIL PROTECTED]>
To: "'MyFaces Discussion'" 
Sent: Wednesday, April 13, 2005 5:32 AM
Subject: RE: Multiple time method is executing for tree2


I have removed the actionListener from the commandLine and still the
"GetTreeDAta" is called two time initially and then three times whenever I
click on any tree node...

Mihir

-Original Message-
From: Conway. Fintan (IT Solutions) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 13, 2005 2:49 PM
To: MyFaces Discussion
Subject: RE: Multiple time method is executing for tree2

Hi Mihir,

Is it because your commandLink has both an action and an actionListener?

Regards,

Fintan

-Original Message-
From: Mihir Solanki [mailto:[EMAIL PROTECTED]
Sent: 13 April 2005 10:10
To: 'MyFaces Discussion'; 'Enrique Medina'
Subject: RE: Multiple time method is executing for tree2


Enrique,

As per your suggestion I have gone through the JSF request processing
life cycle.

But still I am not 100% clear on the things. Could you please give me
some idea that during which phases the backing beans method will be
called and why?

Mihir

-Original Message-
From: Enrique Medina [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 13, 2005 1:46 PM
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: Re: Multiple time method is executing for tree2

Take a look at the JSF LifeCycle and you'll understand ;-)

On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
>
>
>
> Hi all,
>
>
>
> I am having a tree2 component (only one component) in my JSF page.
>
>
>
>  cellspacing="1" align="left">
>
> 
varNodeToggler="t" clientSideToggle="false">
>
> 
>
>  actionListener="#{CabinetTree.processAction}">
>
>  rendered="#{t.nodeExpanded}" border="0"/>
>
>  rendered="#{!t.nodeExpanded}" border="0"/>
>
> 
>
> 
rendered="#{!empty node.children}"/>
>
> 
>
> 
>
> 
>
> 
>
>
>
> Now when I load this page, I have noticed that the "getTreeData"
> method of "TreeBean" is called two times. Further whenever I click on
> the tree node (or navigation icons), the same methods gets called
> three times.
>
>
>
> Can anybody tell me what is happening behind the scenes? Why this
> method
is
> called multiple times?
>
>
>
> Mihir
>
>
>  
>
>
>
> Patni Computer Systems Ltd.
>
>
> Tel : 91 79 23240905 Ext : 413
>
>
> http://www.patni.com
>  World-Wide Partnerships. World-Class Solutions.
> _
>
>  This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to
> whom
this
> message was originally addressed. Any review, e-transmission
> dissemination or other use of or taking of any action in reliance upon

> this information
by
> persons or entities other than the intended recipient is prohibited.
> If
you
> have received this e-mail in error kindly delete this e-mail from your

> records. If it appears that this mail has been forwarded to you
> without proper authority, please notify us immediately at
> [EMAIL PROTECTED] and delete this mail.
> _



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to whom
this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail.
_


* ** *** ** * ** *** ** * ** *** ** *
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed.
Any views or opinions presented are solely those of the author, and do not
necessarily
represent those of ESB.
If you have received this email in error please notify the sender.

Although ESB scans e-mail and attachments for viruses, it does not guarantee

that either are virus-free and accepts no liability for any damage sustained

as a result of viruses.

* ** *** ** * ** *** ** * ** *** ** *




http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information

FW: Refreshing the view/component/page (Can anybody focus this out)

2005-04-13 Thread Mihir Solanki








 

Hi,

 

I have two components in my JSF page

 

1. 
select
one list box

2. 
tree2

 

Now based on the selection changes in the
select box I want to updated the whole tree (basically selected item should
come as a root node of the tree whenever selection change event occurs in the
select one list box).

 

I have two backing beans implemented for
select one box and tree2. I am also getting selection change event and so I am
updating the tree data in that event.

 

The problem is when I change the selection
in the list box, my tree is not showing the updated data, but when I click on
the root node of the tree it is showing me the updated data then further. 

 

So my question is, is there any way so I
can update the view/Page/component from backing bean so I can always be rest
assure that whatever I have set I will get in UI.

 

Thanks

Mihir Solanki

 

 









Patni Computer Systems Ltd.





Tel : 91 79 23240905 Ext : 413



 



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.

_
 
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_





set properties of bean managed by dataTable tag

2005-04-13 Thread Jan Bols
I have a jsf-page containing the following:





The allContacts bean is a managed bean and is specified in the web.xml  
file:

	
		allContacts
		MyContacts
		session
	


The allContacts bean contains a list contactList containing contact-beans.  
The contact bean contains a property called myConnection that holds the  
connection to the database.

I want to set that connection property from within the jsf-page or the  
web.xml file but how do I do that? In jstl this can be done with   
or in jsp with  but how do I do this in jsf?

Thanks
Jan


Re: Multiple time method is executing for tree2

2005-04-13 Thread Enrique Medina
Hi again,

I cannot assure if I don't have your code with me, but you can try
putting a breakpoint into the getTreeData method of your bean, and
then see on the Debug window who is calling it (see whether it is the
render, the update model, etc.).

Obviously you need the source code, but that's a minor issue ;-)

On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
> Enrique,
> 
> As per your suggestion I have gone through the JSF request processing life
> cycle.
> 
> But still I am not 100% clear on the things. Could you please give me some
> idea that during which phases the backing beans method will be called and
> why?
> 
> Mihir
> 
> -Original Message-
> From: Enrique Medina [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 13, 2005 1:46 PM
> To: MyFaces Discussion; [EMAIL PROTECTED]
> Subject: Re: Multiple time method is executing for tree2
> 
> Take a look at the JSF LifeCycle and you'll understand ;-)
> 
> On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > Hi all,
> >
> >
> >
> > I am having a tree2 component (only one component) in my JSF page.
> >
> >
> >
> >  > cellspacing="1" align="left">
> >
> >  > varNodeToggler="t" clientSideToggle="false">
> >
> > 
> >
> >  > actionListener="#{CabinetTree.processAction}">
> >
> >  > rendered="#{t.nodeExpanded}" border="0"/>
> >
> >  > rendered="#{!t.nodeExpanded}" border="0"/>
> >
> > 
> >
> >  > rendered="#{!empty node.children}"/>
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> > Now when I load this page, I have noticed that the "getTreeData" method of
> > "TreeBean" is called two times. Further whenever I click on the tree node
> > (or navigation icons), the same methods gets called three times.
> >
> >
> >
> > Can anybody tell me what is happening behind the scenes? Why this method
> is
> > called multiple times?
> >
> >
> >
> > Mihir
> >
> >
> >  
> >
> >
> >
> > Patni Computer Systems Ltd.
> >
> >
> > Tel : 91 79 23240905 Ext : 413
> >
> >
> > http://www.patni.com
> >  World-Wide Partnerships. World-Class Solutions.
> > _
> >
> >  This e-mail message may contain proprietary, confidential or legally
> > privileged information for the sole use of the person or entity to whom
> this
> > message was originally addressed. Any review, e-transmission dissemination
> > or other use of or taking of any action in reliance upon this information
> by
> > persons or entities other than the intended recipient is prohibited. If
> you
> > have received this e-mail in error kindly delete this e-mail from your
> > records. If it appears that this mail has been forwarded to you without
> > proper authority, please notify us immediately at [EMAIL PROTECTED] and
> > delete this mail.
> > _
> 
> http://www.patni.com
> World-Wide Partnerships. World-Class Solutions.
> _
> 
> This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to
> whom this message was originally addressed. Any review, e-transmission
> dissemination or other use of or taking of any action in reliance upon
> this information by persons or entities other than the intended
> recipient is prohibited. If you have received this e-mail in error
> kindly delete  this e-mail from your records. If it appears that this
> mail has been forwarded to you without proper authority, please notify
> us immediately at [EMAIL PROTECTED] and delete this mail.
> _
> 
>


RE: Multiple time method is executing for tree2

2005-04-13 Thread Mihir Solanki
I have removed the actionListener from the commandLine and still the
"GetTreeDAta" is called two time initially and then three times whenever I
click on any tree node...

Mihir

-Original Message-
From: Conway. Fintan (IT Solutions) [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 13, 2005 2:49 PM
To: MyFaces Discussion
Subject: RE: Multiple time method is executing for tree2

Hi Mihir,

Is it because your commandLink has both an action and an actionListener?

Regards,

Fintan

-Original Message-
From: Mihir Solanki [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2005 10:10
To: 'MyFaces Discussion'; 'Enrique Medina'
Subject: RE: Multiple time method is executing for tree2


Enrique,

As per your suggestion I have gone through the JSF request processing
life cycle.

But still I am not 100% clear on the things. Could you please give me
some idea that during which phases the backing beans method will be
called and why?

Mihir

-Original Message-
From: Enrique Medina [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 13, 2005 1:46 PM
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: Re: Multiple time method is executing for tree2

Take a look at the JSF LifeCycle and you'll understand ;-)

On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> Hi all,
> 
>   
> 
> I am having a tree2 component (only one component) in my JSF page.
> 
>   
> 
>  cellspacing="1" align="left">
> 
> 
varNodeToggler="t" clientSideToggle="false">
> 
> 
> 
>  actionListener="#{CabinetTree.processAction}">
> 
>  rendered="#{t.nodeExpanded}" border="0"/>
> 
>  rendered="#{!t.nodeExpanded}" border="0"/>
> 
> 
> 
> 
rendered="#{!empty node.children}"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> Now when I load this page, I have noticed that the "getTreeData" 
> method of "TreeBean" is called two times. Further whenever I click on 
> the tree node (or navigation icons), the same methods gets called 
> three times.
> 
>   
> 
> Can anybody tell me what is happening behind the scenes? Why this 
> method
is
> called multiple times?
> 
>   
> 
> Mihir
> 
>   
>  
>  
>  
> 
> Patni Computer Systems Ltd.
>  
> 
> Tel : 91 79 23240905 Ext : 413
> 
>   
> http://www.patni.com
>  World-Wide Partnerships. World-Class Solutions.
> _
>  
>  This e-mail message may contain proprietary, confidential or legally 
> privileged information for the sole use of the person or entity to 
> whom
this
> message was originally addressed. Any review, e-transmission 
> dissemination or other use of or taking of any action in reliance upon

> this information
by
> persons or entities other than the intended recipient is prohibited. 
> If
you
> have received this e-mail in error kindly delete this e-mail from your

> records. If it appears that this mail has been forwarded to you 
> without proper authority, please notify us immediately at 
> [EMAIL PROTECTED] and delete this mail. 
> _



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to whom
this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_


* ** *** ** * ** *** ** * ** *** ** * 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. 
Any views or opinions presented are solely those of the author, and do not
necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not guarantee

that either are virus-free and accepts no liability for any damage sustained

as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *




http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited

RE: Multiple time method is executing for tree2

2005-04-13 Thread Conway. Fintan \(IT Solutions\)
Hi Mihir,

Is it because your commandLink has both an action and an actionListener?

Regards,

Fintan

-Original Message-
From: Mihir Solanki [mailto:[EMAIL PROTECTED] 
Sent: 13 April 2005 10:10
To: 'MyFaces Discussion'; 'Enrique Medina'
Subject: RE: Multiple time method is executing for tree2


Enrique,

As per your suggestion I have gone through the JSF request processing
life cycle.

But still I am not 100% clear on the things. Could you please give me
some idea that during which phases the backing beans method will be
called and why?

Mihir

-Original Message-
From: Enrique Medina [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 13, 2005 1:46 PM
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: Re: Multiple time method is executing for tree2

Take a look at the JSF LifeCycle and you'll understand ;-)

On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> Hi all,
> 
>   
> 
> I am having a tree2 component (only one component) in my JSF page.
> 
>   
> 
>  cellspacing="1" align="left">
> 
>  
> varNodeToggler="t" clientSideToggle="false">
> 
> 
> 
>  actionListener="#{CabinetTree.processAction}">
> 
>  rendered="#{t.nodeExpanded}" border="0"/>
> 
>  rendered="#{!t.nodeExpanded}" border="0"/>
> 
> 
> 
>  
> rendered="#{!empty node.children}"/>
> 
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> Now when I load this page, I have noticed that the "getTreeData" 
> method of "TreeBean" is called two times. Further whenever I click on 
> the tree node (or navigation icons), the same methods gets called 
> three times.
> 
>   
> 
> Can anybody tell me what is happening behind the scenes? Why this 
> method
is
> called multiple times?
> 
>   
> 
> Mihir
> 
>   
>  
>  
>  
> 
> Patni Computer Systems Ltd.
>  
> 
> Tel : 91 79 23240905 Ext : 413
> 
>   
> http://www.patni.com
>  World-Wide Partnerships. World-Class Solutions.
> _
>  
>  This e-mail message may contain proprietary, confidential or legally 
> privileged information for the sole use of the person or entity to 
> whom
this
> message was originally addressed. Any review, e-transmission 
> dissemination or other use of or taking of any action in reliance upon

> this information
by
> persons or entities other than the intended recipient is prohibited. 
> If
you
> have received this e-mail in error kindly delete this e-mail from your

> records. If it appears that this mail has been forwarded to you 
> without proper authority, please notify us immediately at 
> [EMAIL PROTECTED] and delete this mail. 
> _



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to whom
this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_


* ** *** ** * ** *** ** * ** *** ** * 
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they 
are addressed. 
Any views or opinions presented are solely those of the author, and do not 
necessarily 
represent those of ESB. 
If you have received this email in error please notify the sender. 
 
Although ESB scans e-mail and attachments for viruses, it does not guarantee 
that either are virus-free and accepts no liability for any damage sustained 
as a result of viruses. 
 
* ** *** ** * ** *** ** * ** *** ** *



Mail archive > spam problem

2005-04-13 Thread Adrien FOURES
Hello!
I subscribed to the mailling list in october 2004, since january 2005 i 
have recevide a lot of spam. And finally i try in google my e mail 
adress . and google found it three time uncrypted

mail-archives.eu.apache.org/mod_mbox/incubator-myfaces-user/ 
200501.mbox/[EMAIL PROTECTED]
mail-archives.eu.apache.org/mod_mbox/incubator-myfaces-user/ 
200501.mbox/[EMAIL PROTECTED]
incubator.apache.org/mail/myfaces-user/200503

Please can you delete this mail, or encrypted my e mail adress.
Thank a lot for your repply,
Adrien


RE: Multiple time method is executing for tree2

2005-04-13 Thread Mihir Solanki
Enrique,

As per your suggestion I have gone through the JSF request processing life
cycle.

But still I am not 100% clear on the things. Could you please give me some
idea that during which phases the backing beans method will be called and
why?

Mihir

-Original Message-
From: Enrique Medina [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 13, 2005 1:46 PM
To: MyFaces Discussion; [EMAIL PROTECTED]
Subject: Re: Multiple time method is executing for tree2

Take a look at the JSF LifeCycle and you'll understand ;-)

On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> Hi all, 
> 
>   
> 
> I am having a tree2 component (only one component) in my JSF page. 
> 
>   
> 
>  cellspacing="1" align="left"> 
> 
>  varNodeToggler="t" clientSideToggle="false"> 
> 
>  
> 
>  actionListener="#{CabinetTree.processAction}"> 
> 
>  rendered="#{t.nodeExpanded}" border="0"/> 
> 
>  rendered="#{!t.nodeExpanded}" border="0"/> 
> 
>  
> 
>  rendered="#{!empty node.children}"/> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
>   
> 
> Now when I load this page, I have noticed that the "getTreeData" method of
> "TreeBean" is called two times. Further whenever I click on the tree node
> (or navigation icons), the same methods gets called three times. 
> 
>   
> 
> Can anybody tell me what is happening behind the scenes? Why this method
is
> called multiple times? 
> 
>   
> 
> Mihir 
> 
>   
>  
>  
>  
> 
> Patni Computer Systems Ltd. 
>  
> 
> Tel : 91 79 23240905 Ext : 413 
> 
>   
> http://www.patni.com
>  World-Wide Partnerships. World-Class Solutions. 
> _
>  
>  This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to whom
this
> message was originally addressed. Any review, e-transmission dissemination
> or other use of or taking of any action in reliance upon this information
by
> persons or entities other than the intended recipient is prohibited. If
you
> have received this e-mail in error kindly delete this e-mail from your
> records. If it appears that this mail has been forwarded to you without
> proper authority, please notify us immediately at [EMAIL PROTECTED] and
> delete this mail. 
> _



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.
_

This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_


Re: Problem using x:radio with the RI

2005-04-13 Thread Peter Mahoney
The MyFaces implementation also returns a Long value for #{0}. The JSF 
spec refers to the JSP 2.0 spec which suggests the value could be a Long 
or BigInteger as the result of an integer expression. Therefore this 
suggests that the cast should be to Number in both HtmlRadio and 
HtmlCheckbox. I will raise a bug.

Peter
Sean Schofield wrote:
Don't know since I haven't tried it with either.  Why don't you try it
with MyFaces impl to see if it works as you expect?  If it doesn't
then report it as a bug in JIRA and someone will take a look.  I'd
also check the spec to see if this isn't the specified behavior.
sean
On Apr 12, 2005 11:45 AM, Peter Mahoney <[EMAIL PROTECTED]> wrote:
 

There seems to be a problem using the x:radio component with the RI. I
am using a dataTable to list each of the options, one per row. I
therefore need to use an expression to provide the index attribute. The
RI resolves the value of the expression to a Long, however HtmlRadio
casts the value of the expression to an Integer. The RI returns a Long
value for the expression #{0}. As a fix, I have changed the cast to Number:
   Number v = vb != null ? (Number)vb.getValue(getFacesContext()) :
null;
Is this a bug with the RI or MyFaces?
Thanks
Peter
   




Re: Render "fieldset"&"legend" tags with JSF

2005-04-13 Thread Enrique Medina
Please don't hesitate to make the effort. Open Source developments
like this one need to be fed from users like you and me in order to
grow and become a good solution ;-)

On 4/13/05, Catalin Kormos <[EMAIL PROTECTED]> wrote:
> I will probably do so, if nobody else has't done this
> already :).
> 
> --- Enrique Medina <[EMAIL PROTECTED]> wrote:
> > Or even better, make a JIRA and add that
> > functionality ;-)
> >
> > On 4/13/05, Borja Martín <[EMAIL PROTECTED]> wrote:
> > > why not just to write them in the document between
> > the 'verbatim' tags?
> > >
> > > Catalin Kormos wrote:
> > > > Hi there,
> > > >
> > > > I'm just wondering if there are any plans on
> > > > implementing components to renderer the HTML
> > forms
> > > > related tags, "fieldset" and "legend"? just like
> > > >  does for rendering "div" tags.
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > > __
> > > > Do you Yahoo!?
> > > > Yahoo! Small Business - Try our new resources
> > site!
> > > > http://smallbusiness.yahoo.com/resources/
> > > >
> > >
> > >
> >
> 
> __
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
> http://smallbusiness.yahoo.com/resources/
>


Re: Render "fieldset"&"legend" tags with JSF

2005-04-13 Thread Catalin Kormos
I will probably do so, if nobody else has't done this
already :).

--- Enrique Medina <[EMAIL PROTECTED]> wrote:
> Or even better, make a JIRA and add that
> functionality ;-)
> 
> On 4/13/05, Borja Martín <[EMAIL PROTECTED]> wrote:
> > why not just to write them in the document between
> the 'verbatim' tags?
> > 
> > Catalin Kormos wrote:
> > > Hi there,
> > >
> > > I'm just wondering if there are any plans on
> > > implementing components to renderer the HTML
> forms
> > > related tags, "fieldset" and "legend"? just like
> > >  does for rendering "div" tags.
> > >
> > > Thanks
> > >
> > >
> > >
> > > __
> > > Do you Yahoo!?
> > > Yahoo! Small Business - Try our new resources
> site!
> > > http://smallbusiness.yahoo.com/resources/
> > >
> > 
> >
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/


Re: How to get component id in jsp

2005-04-13 Thread Stefan Langer
Galen Dunkleberger wrote:
Is there a good way to pull the client id of a particular component in
the jsp? What I'm trying to do is pass the id to javascript calls. I
know how to figure out the id manually but is would be nice to be able
to do something like this...

/>

Anyone have any ideas how this might work?
Thanks,
Galen
 

A while back I found a component from someone else on jsfcentral.com 
that provides a proxytag for ids. I think it was call javascriptproxy 
but I'm not sure and can't seem to find it at the moment. Basically it 
provides a tag that can retrieve the id and assigns it to a defined 
javascript variable. The nice thing about it, it can be used with 
standard components also. The bad thing: more writing and it isn't as 
nicely integrated as forceid is.
Maybe myfaces could provide some component like this for means of 
providing ids for standard components.

Regards
Stefan


Re: Render "fieldset"&"legend" tags with JSF

2005-04-13 Thread Catalin Kormos
I guess the only reason for this could be that the
code its more readeable if you use only JSF tags. For
now i use 'verbatim' but it would be cleaner if i
could use  just like i use . Thanks
for your interest.

--- Borja Martín <[EMAIL PROTECTED]> wrote:
> why not just to write them in the document between
> the 'verbatim' tags?
> 
> Catalin Kormos wrote:
> > Hi there,
> > 
> > I'm just wondering if there are any plans on
> > implementing components to renderer the HTML forms
> > related tags, "fieldset" and "legend"? just like
> >  does for rendering "div" tags.
> > 
> > Thanks 
> > 
> > 
> > 
> > __ 
> > Do you Yahoo!? 
> > Yahoo! Small Business - Try our new resources
> site!
> > http://smallbusiness.yahoo.com/resources/
> > 
> 
> 



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/


Re: Render "fieldset"&"legend" tags with JSF

2005-04-13 Thread Enrique Medina
Or even better, make a JIRA and add that functionality ;-)

On 4/13/05, Borja Martín <[EMAIL PROTECTED]> wrote:
> why not just to write them in the document between the 'verbatim' tags?
> 
> Catalin Kormos wrote:
> > Hi there,
> >
> > I'm just wondering if there are any plans on
> > implementing components to renderer the HTML forms
> > related tags, "fieldset" and "legend"? just like
> >  does for rendering "div" tags.
> >
> > Thanks
> >
> >
> >
> > __
> > Do you Yahoo!?
> > Yahoo! Small Business - Try our new resources site!
> > http://smallbusiness.yahoo.com/resources/
> >
> 
>


Re: Render "fieldset"&"legend" tags with JSF

2005-04-13 Thread Borja Martín
why not just to write them in the document between the 'verbatim' tags?
Catalin Kormos wrote:
Hi there,
I'm just wondering if there are any plans on
implementing components to renderer the HTML forms
related tags, "fieldset" and "legend"? just like
 does for rendering "div" tags.
Thanks 

		
__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/




Re: Multiple time method is executing for tree2

2005-04-13 Thread Enrique Medina
Take a look at the JSF LifeCycle and you'll understand ;-)

On 4/13/05, Mihir Solanki <[EMAIL PROTECTED]> wrote:
>  
>  
> 
> Hi all, 
> 
>   
> 
> I am having a tree2 component (only one component) in my JSF page. 
> 
>   
> 
>  cellspacing="1" align="left"> 
> 
>  varNodeToggler="t" clientSideToggle="false"> 
> 
>  
> 
>  actionListener="#{CabinetTree.processAction}"> 
> 
>  rendered="#{t.nodeExpanded}" border="0"/> 
> 
>  rendered="#{!t.nodeExpanded}" border="0"/> 
> 
>  
> 
>  rendered="#{!empty node.children}"/> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
>   
> 
> Now when I load this page, I have noticed that the "getTreeData" method of
> "TreeBean" is called two times. Further whenever I click on the tree node
> (or navigation icons), the same methods gets called three times. 
> 
>   
> 
> Can anybody tell me what is happening behind the scenes? Why this method is
> called multiple times? 
> 
>   
> 
> Mihir 
> 
>   
>  
>  
>  
> 
> Patni Computer Systems Ltd. 
>  
> 
> Tel : 91 79 23240905 Ext : 413 
> 
>   
> http://www.patni.com
>  World-Wide Partnerships. World-Class Solutions. 
> _
>  
>  This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to whom this
> message was originally addressed. Any review, e-transmission dissemination
> or other use of or taking of any action in reliance upon this information by
> persons or entities other than the intended recipient is prohibited. If you
> have received this e-mail in error kindly delete this e-mail from your
> records. If it appears that this mail has been forwarded to you without
> proper authority, please notify us immediately at [EMAIL PROTECTED] and
> delete this mail. 
> _


Multiple time method is executing for tree2

2005-04-13 Thread Mihir Solanki








Hi all,

 

I am having a tree2 component (only one
component) in my JSF page.

 

"grid2" columns="1" border="0" cellpadding="1" cellspacing="1" align="left">

="#{TreeBean.treeData}" id="cabinet-tree" var="node" varNodeToggler="t" clientSideToggle="false">

"folder">

"true" action="">"#{t.toggleExpanded}" actionListener="#{CabinetTree.processAction}">

"/images/blue-folder-open.png" rendered="#{t.nodeExpanded}" border="0"/>

"/images/blue-folder-closed.png" rendered="#{!t.nodeExpanded}" border="0"/>

"#{node.description}" styleClass="nodeTree"/>

" (#{node.childCount})" styleClass="childCount" rendered="#{!empty node.children}"/>









 

Now when I load this page, I have noticed
that the “getTreeData” method of “TreeBean” is called
two times. Further whenever I click on the tree node (or navigation icons), the
same methods gets called three times.

 

Can anybody tell me what is happening
behind the scenes? Why this method is called multiple times?

 

Mihir

 









Patni Computer Systems Ltd.





Tel : 91 79 23240905 Ext : 413



 



http://www.patni.com
World-Wide Partnerships. World-Class Solutions.

_
 
This e-mail message may contain proprietary, confidential or legally
privileged information for the sole use of the person or entity to
whom this message was originally addressed. Any review, e-transmission
dissemination or other use of or taking of any action in reliance upon
this information by persons or entities other than the intended
recipient is prohibited. If you have received this e-mail in error
kindly delete  this e-mail from your records. If it appears that this
mail has been forwarded to you without proper authority, please notify
us immediately at [EMAIL PROTECTED] and delete this mail. 
_





Re: question about dataModel

2005-04-13 Thread Enrique Medina
There's also a very similar approach here:

http://www-128.ibm.com/developerworks/library/j-jsf2/#IDABXDXG

Enrique Medina.

On 4/13/05, Aaron Bartell <[EMAIL PROTECTED]> wrote:
> Here is what I have done. Basically there is a method for each column that
> sets some class variables so when the call to get the list is made those
> variables are passed into my DAO's (Data Access Objects).
> 
> HTH,
> Aaron Bartell
> 
>  styleClass="table" headerClass="table_header"
> var="user" value="#{UserCtl.userList}"
> preserveDataModel="true" rows="10">
> 
> 
>   
>   
>   
> 
> 
> 
> 
> 
>   
>   
>   
> 
> 
> 
> 
> 
> 
>   
>   
>   
> 
> 
> 
> 
> 
> 
>   
>   
>   
> 
> 
> 
> 
> 
> 
> 
> 
>  value="edit" styleClass="copy"/>
> 
>  action="#{UserCtl.deleteUserPage}" value="delete" styleClass="copy"/>
> 
> 
> 
> public class UserController {
> 
> User curUsr;
> String orderBy = "created";
> String orderDirection = Const.DESC;
> 
> public UserController() {
> 
> }
> public List getUserList() throws HibernateException {
> return User.getList(orderBy, orderDirection);
> }
> 
> public String orderByStatus() {
> this.orderBy = "status";
> this.orderDirection = this.orderDirection.equals(Const.ASC) ?
> Const.DESC : Const.ASC;
> return null;
> }
> 
> public String orderByName() {
> this.orderBy = "name";
> this.orderDirection = this.orderDirection.equals(Const.ASC) ?
> Const.DESC : Const.ASC;
> return null;
> }
> 
> public String orderByCreated() {
> this.orderBy = "created";
> this.orderDirection = this.orderDirection.equals(Const.ASC) ?
> Const.DESC : Const.ASC;
> return null;
> }
> 
> public String orderByFirstName() {
> this.orderBy = "firstname";
> this.orderDirection = this.orderDirection.equals(Const.ASC) ?
> Const.DESC : Const.ASC;
> return null;
> }
> 
> public String orderByLastName() {
> this.orderBy = "lastname";
> this.orderDirection = this.orderDirection.equals(Const.ASC) ?
> Const.DESC : Const.ASC;
> return null;
> }
> 
> public String orderByEmail() {
> this.orderBy = "email";
> this.orderDirection = this.orderDirection.equals(Const.ASC) ?
> Const.DESC : Const.ASC;
> return null;
> }
> }
> 
> -Original Message-
> From: Mark and Mary Beth [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, April 12, 2005 9:10 PM
> To: myfaces-user@incubator.apache.org
> Subject: question about dataModel
> 
> I have a Sybase database table that I pulling data from and displaying
> in a JSF dataTable.
> The data is being returned as a JSF ResultDataModel.  I would like to
> make each column
> sortable.  I believe the best way would be to click on a column header,
> and the method called
> will pass the right parameter(s) to the calling stored procedure.  The
> problem I am having is implementing
> this idea.  Does myfaces have a component already written that I can
> plug in to my webapp? If not, is
> there an example anywhere?  I have seen examples of datatables being
> created from Lists and Arrays,
> but none with Results.
> 
> Mark W.
> 
>


How can I include IBM components into mines ones

2005-04-13 Thread Goyo Escobar Escalero
I need, for example, a 4 buttons component, but i'd like to use the IBM 
buttons to do it.

Could someone write me any code to do it or the way to do it??