You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Daniel Niklas <da...@continentale.de> on 2008/01/18 16:14:09 UTC

[Trinidad] signature of method for selectionListener on a tree

Hi,

i want to define a selectionListener on my tree component:

<tr:tree value="#{myBean.treeModel}" var="node"
			selectionListener="#{myBean.nodeSelected}">

What is the signature of the method in my backing bean?

Best regards
Daniel
-- 
View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p14950886.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


RE: [Trinidad] displayValueOnly

Posted by Mathias Walter <ma...@gmx.net>.
Hi Matthias,

> when doing:
> -readOnly:true
> -simple:true
> -value:Some text
> 
> you get this rendered result:
> 
> <span id="_idJsp6" class="x1u p_AFReadOnly">
> <div class="x25">Some text</div>
> </span>
> 
> is that close to what you want ?

Yeah! That's exactly what I'm looking for. :)

--
Regards,
Mathias


Re: [Trinidad] displayValueOnly

Posted by Matthias Wessendorf <ma...@apache.org>.
Mathias,

when doing:
-readOnly:true
-simple:true
-value:Some text

you get this rendered result:

<span id="_idJsp6" class="x1u p_AFReadOnly">
<div class="x25">Some text</div>
</span>

is that close to what you want ?

-Matthias

On Jan 22, 2008 9:26 PM, Mathias Walter <ma...@gmx.net> wrote:
>
>
> Hi,
>
> I've looked there, but could not find such an attribute. Because Tomahawk
> has some incubator components / extensions, I thought this could be also
> possible for Trinidad, but could not find information about. That's why I
> asked here.
> Are there any plans to support this feature in Trinidad too?
>
> --
> Kind regards,
> Mathias
>
>
>
>
> -----Original Message-----
> From: Richard Yee [mailto:richard.k.yee@gmail.com]
> Sent: Wednesday, January 23, 2008 2:45 AM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] displayValueOnly
>
> Take a look yourself:
> http://myfaces.apache.org/trinidad/trinidad-api/tagdoc.html
>
>
>
> On Jan 22, 2008 2:31 PM, Mathias Walter < mathias.walter@gmx.net> wrote:
>
> > Hi,
> >
> > do Trinidad has a displayValueOnly property for tr:inputText, similar to
> > Tomahawk?
> >
> > --
> > Kind regards,
> > Mathias
> >
> >
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

RE: [Trinidad] displayValueOnly

Posted by Mark Millman <ma...@mizar.com>.
Is it possible that the readOnly="true" would do the trick for you?  I'm not
familiar with the Tomahawk tags; but readOnly="true" will display the value
only and not allow the user to change it.

 

mark.millman@mizar.com | www.mizar.com | (360) 945-2643

 

From: Mathias Walter [mailto:mathias.walter@gmx.net] 
Sent: Tuesday, January 22, 2008 9:26 PM
To: 'MyFaces Discussion'
Subject: RE: [Trinidad] displayValueOnly

 

Hi,

 

I've looked there, but could not find such an attribute. Because Tomahawk
has some incubator components / extensions, I thought this could be also
possible for Trinidad, but could not find information about. That's why I
asked here.

Are there any plans to support this feature in Trinidad too?

 

--

Kind regards,

Mathias

-----Original Message-----
From: Richard Yee [mailto:richard.k.yee@gmail.com] 
Sent: Wednesday, January 23, 2008 2:45 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] displayValueOnly

Take a look yourself:
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc.html



On Jan 22, 2008 2:31 PM, Mathias Walter < mathias.walter@gmx.net> wrote:

Hi,

do Trinidad has a displayValueOnly property for tr:inputText, similar to
Tomahawk?

--
Kind regards,
Mathias

 


RE: [Trinidad] displayValueOnly

Posted by Mathias Walter <ma...@gmx.net>.
Hi,
 
I've looked there, but could not find such an attribute. Because Tomahawk
has some incubator components / extensions, I thought this could be also
possible for Trinidad, but could not find information about. That's why I
asked here.
Are there any plans to support this feature in Trinidad too?
 
--
Kind regards,
Mathias

-----Original Message-----
From: Richard Yee [mailto:richard.k.yee@gmail.com] 
Sent: Wednesday, January 23, 2008 2:45 AM
To: MyFaces Discussion
Subject: Re: [Trinidad] displayValueOnly


Take a look yourself:
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc.html



On Jan 22, 2008 2:31 PM, Mathias Walter < mathias.walter@gmx.net> wrote:


Hi,

do Trinidad has a displayValueOnly property for tr:inputText, similar to
Tomahawk?

--
Kind regards,
Mathias





Re: [Trinidad] displayValueOnly

Posted by Richard Yee <ri...@gmail.com>.
Take a look yourself:
http://myfaces.apache.org/trinidad/trinidad-api/tagdoc.html


On Jan 22, 2008 2:31 PM, Mathias Walter <ma...@gmx.net> wrote:

> Hi,
>
> do Trinidad has a displayValueOnly property for tr:inputText, similar to
> Tomahawk?
>
> --
> Kind regards,
> Mathias
>
>

RE: [Trinidad] tr:form defaultCommand no partial triggering

Posted by Mathias Walter <ma...@gmx.net>.
Hi Matthias,

thanks to open the issue. Today, I had problems to send mails to the list.

--
Kind regards,
Mathias

> -----Original Message-----
> From: mwessendorf@gmail.com [mailto:mwessendorf@gmail.com] On 
> Behalf Of Matthias Wessendorf
> Sent: Wednesday, January 23, 2008 6:14 PM
> To: MyFaces Discussion
> Subject: Re: [Trinidad] tr:form defaultCommand no partial triggering
> 
> 
> https://issues.apache.org/jira/browse/TRINIDAD-917
> 
> On Jan 22, 2008 9:30 PM, Matthias Wessendorf 
> <ma...@apache.org> wrote:
> > can you file an issue?
> > I'll take a look, maybe next week.
> >
> > -M
> >
> >
> > On Jan 22, 2008 2:51 PM, Mathias Walter 
> <ma...@gmx.net> wrote:
> > > Hi,
> > >
> > > I've defined a defaultCommand on a tr:form. It's linked 
> to a command button
> > > which has a partial trigger.
> > >
> > > <tr:form defaultCommand="save" id="frmTest" 
> partialTriggers="save">
> > >         <tr:commandButton id="save" 
> actionListener="#{cm.save}" text="Save"
> > > partialSubmit="true"/>
> > > </tr:form>
> > >
> > > If I click on the button, the a partial submit is 
> initiated, but if I press
> > > <Enter>, the form is fully submitted and the page will be 
> reloaded.
> > >
> > > The form's default command should behave exactly like the 
> button it is
> > > linked to. How can I achieve this behaviour?
> > >
> > > --
> > > Kind regards,
> > > Mathias
> > >
> > >
> >
> >
> >
> > --
> > Matthias Wessendorf
> >
> > further stuff:
> > blog: http://matthiaswessendorf.wordpress.com/
> > sessions: http://www.slideshare.net/mwessendorf
> > mail: matzew-at-apache-dot-org
> >
> 
> 
> 
> -- 
> Matthias Wessendorf
> 
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org


Re: [Trinidad] tr:form defaultCommand no partial triggering

Posted by Matthias Wessendorf <ma...@apache.org>.
https://issues.apache.org/jira/browse/TRINIDAD-917

On Jan 22, 2008 9:30 PM, Matthias Wessendorf <ma...@apache.org> wrote:
> can you file an issue?
> I'll take a look, maybe next week.
>
> -M
>
>
> On Jan 22, 2008 2:51 PM, Mathias Walter <ma...@gmx.net> wrote:
> > Hi,
> >
> > I've defined a defaultCommand on a tr:form. It's linked to a command button
> > which has a partial trigger.
> >
> > <tr:form defaultCommand="save" id="frmTest" partialTriggers="save">
> >         <tr:commandButton id="save" actionListener="#{cm.save}" text="Save"
> > partialSubmit="true"/>
> > </tr:form>
> >
> > If I click on the button, the a partial submit is initiated, but if I press
> > <Enter>, the form is fully submitted and the page will be reloaded.
> >
> > The form's default command should behave exactly like the button it is
> > linked to. How can I achieve this behaviour?
> >
> > --
> > Kind regards,
> > Mathias
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [Trinidad] tr:form defaultCommand no partial triggering

Posted by Matthias Wessendorf <ma...@apache.org>.
can you file an issue?
I'll take a look, maybe next week.

-M

On Jan 22, 2008 2:51 PM, Mathias Walter <ma...@gmx.net> wrote:
> Hi,
>
> I've defined a defaultCommand on a tr:form. It's linked to a command button
> which has a partial trigger.
>
> <tr:form defaultCommand="save" id="frmTest" partialTriggers="save">
>         <tr:commandButton id="save" actionListener="#{cm.save}" text="Save"
> partialSubmit="true"/>
> </tr:form>
>
> If I click on the button, the a partial submit is initiated, but if I press
> <Enter>, the form is fully submitted and the page will be reloaded.
>
> The form's default command should behave exactly like the button it is
> linked to. How can I achieve this behaviour?
>
> --
> Kind regards,
> Mathias
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

[Trinidad] tr:form defaultCommand no partial triggering

Posted by Mathias Walter <ma...@gmx.net>.
Hi,

I've defined a defaultCommand on a tr:form. It's linked to a command button
which has a partial trigger.

<tr:form defaultCommand="save" id="frmTest" partialTriggers="save">
	<tr:commandButton id="save" actionListener="#{cm.save}" text="Save"
partialSubmit="true"/>
</tr:form>

If I click on the button, the a partial submit is initiated, but if I press
<Enter>, the form is fully submitted and the page will be reloaded.

The form's default command should behave exactly like the button it is
linked to. How can I achieve this behaviour?

--
Kind regards,
Mathias


[Trinidad] displayValueOnly

Posted by Mathias Walter <ma...@gmx.net>.
Hi,

do Trinidad has a displayValueOnly property for tr:inputText, similar to
Tomahawk?

--
Kind regards,
Mathias


Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Daniel Niklas <da...@continentale.de>.
Hi,


Matthias Wessendorf-4 wrote:
> 
> what do you want to "select" ?
> 
I want to select the nodes (or one node) of the tree. The selected nodes are
represented in selectedRowKeys of the tree - "the selection state for this
component".
Or do i understand something wrong?

For example (second post of this thread) :

public void nodeSelected(ActionEvent e)
  {
    this.currentPerson = (Person) treeModel.getRowData();
    selectedRowKeys.clear();
    selectedRowKeys.add();
  } 

Daniel 
-- 
View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p15021172.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Matthias Wessendorf <ma...@apache.org>.
what do you want to "select" ?


On Jan 22, 2008 1:37 AM, Daniel Niklas <da...@continentale.de> wrote:
>
> Hi Matthias,
>
>
> Matthias Wessendorf-4 wrote:
> >
> > yes the selectionListener isn't working on tree. What works is the
> > rowDisclosureListener, when toggle the
> > tree.
> >
> Should i create an jira entry?
>
>
> Matthias Wessendorf-4 wrote:
> >
> > Currently there is no real way to "select" a node in the tree.
> > Like selecting a note on your native file-explorer.
> >
> What do you mean? Multi selection in combination with Strg+/Shift? Single
> selection is possible or what do you mean?
>
> Daniel
> --
> View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p15015342.html
>
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Daniel Niklas <da...@continentale.de>.
Hi Matthias,


Matthias Wessendorf-4 wrote:
> 
> yes the selectionListener isn't working on tree. What works is the
> rowDisclosureListener, when toggle the
> tree.
> 
Should i create an jira entry?


Matthias Wessendorf-4 wrote:
> 
> Currently there is no real way to "select" a node in the tree.
> Like selecting a note on your native file-explorer.
> 
What do you mean? Multi selection in combination with Strg+/Shift? Single
selection is possible or what do you mean?

Daniel
-- 
View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p15015342.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Matthias Wessendorf <ma...@apache.org>.
Hi,

yes the selectionListener isn't working on tree. What works is the
rowDisclosureListener, when toggle the
tree.

Currently there is no real way to "select" a node in the tree.
Like selecting a note on your native file-explorer.

-Matthias

On Jan 21, 2008 9:03 AM, Daniel Niklas <da...@continentale.de> wrote:
>
> Hi Gerhard,
>
>
> Gerhard Petracek wrote:
> >
> > -> if i remember correctly:
> > selectionListeners just work "in connection with" the rowSelection
> > attribute
> > - e.g. see [1], [2].
> > however, tr:tree doesn't provide this attribute.
> >
> > i know that the tag-doc indicates a different behaviour.
> >
> Ok, then it is a bug?!
>
> Best regards
> Daniel
> --
> View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p15001706.html
>
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Daniel Niklas <da...@continentale.de>.
Hi Gerhard,


Gerhard Petracek wrote:
> 
> -> if i remember correctly:
> selectionListeners just work "in connection with" the rowSelection
> attribute
> - e.g. see [1], [2].
> however, tr:tree doesn't provide this attribute.
> 
> i know that the tag-doc indicates a different behaviour.
> 
Ok, then it is a bug?!

Best regards
Daniel
-- 
View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p15001706.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Gerhard Petracek <ge...@gmail.com>.
hello daniel,

few month ago i had a look at the internals of tr:tree and tr:treeTable

-> if i remember correctly:
selectionListeners just work "in connection with" the rowSelection attribute
- e.g. see [1], [2].
however, tr:tree doesn't provide this attribute.

i know that the tag-doc indicates a different behaviour.

regards,
gerhard

[1] http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_treeTable.html
[2] http://www.irian.at/trinidad-demo/faces/components/treeTable_selection.jspx




2008/1/21, Matthias Wessendorf <ma...@apache.org>:
>
> Hrm,
>
> >   public void nodeSelectedEvent(SelectionEvent event)
> >   {
> >     System.out.println("---------------> node selected.");
> >   }
>
> I checked our internal stuff (based on Trinidad),
> and it works.
>
> lemme check Trinidad again.
>
>
> >
> > best regards
> > Daniel
> > --
> > View this message in context:
> http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p14995033.html
> >
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
>
>
>
> --
> Matthias Wessendorf
>
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
>



-- 

http://www.irian.at

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

Professional Support for Apache MyFaces

Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Matthias Wessendorf <ma...@apache.org>.
Hrm,

>   public void nodeSelectedEvent(SelectionEvent event)
>   {
>     System.out.println("---------------> node selected.");
>   }

I checked our internal stuff (based on Trinidad),
and it works.

lemme check Trinidad again.


>
> best regards
> Daniel
> --
> View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p14995033.html
>
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org

Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Richard Yee <ri...@gmail.com>.
I think your nodeSelected method should return a String.

I am using a tr:navigationTree with commandLinks that have an actionListener
and it is working fine.
  public String handleSelect(ActionEvent evt) {
}

On Jan 21, 2008 2:55 AM, Daniel Niklas <da...@continentale.de>
wrote:

>
> Hi Matthias,
>
>
> Matthias Wessendorf-4 wrote:
> >
> > public vod nodeSelected(org.apache.myfaces.trinidad.event.SelectionEvent
> > event);
> >
> > is this not working?
> >
> I think this is not working, my method is not called. Here my example:
>
> <tr:tree id="personTree" value="#{treeBean2.treeModel}" var="node"
>                disclosedRowKeys="#{treeBean2.disclosedRowKeys}"
>                selectedRowKeys="#{treeBean2.selectedRowKeys}"
>                selectionListener="#{treeBean2.nodeSelectedEvent}">
>        <f:facet name="nodeStamp">
>                <tr:commandNavigationItem id="personNode" text="#{node.name
> }"
>                        actionListener="#{treeBean2.nodeSelected}"
> partialSubmit="true">
>                </tr:commandNavigationItem>
>        </f:facet>
> </tr:tree>
>
>  public void nodeSelected(ActionEvent e)
>  {
>    this.currentPerson = (Person) treeModel.getRowData();
>    selectedRowKeys.clear();
>    selectedRowKeys.add();
>  }
>
>  public void nodeSelectedEvent(SelectionEvent event)
>  {
>    System.out.println("---------------> node selected.");
>  }
>
> best regards
> Daniel
> --
> View this message in context:
> http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p14995033.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Daniel Niklas <da...@continentale.de>.
Hi Matthias,


Matthias Wessendorf-4 wrote:
> 
> public vod nodeSelected(org.apache.myfaces.trinidad.event.SelectionEvent
> event);
> 
> is this not working?
> 
I think this is not working, my method is not called. Here my example:

<tr:tree id="personTree" value="#{treeBean2.treeModel}" var="node"
		disclosedRowKeys="#{treeBean2.disclosedRowKeys}"
		selectedRowKeys="#{treeBean2.selectedRowKeys}"
		selectionListener="#{treeBean2.nodeSelectedEvent}">
	<f:facet name="nodeStamp">
		<tr:commandNavigationItem id="personNode" text="#{node.name}"
			actionListener="#{treeBean2.nodeSelected}" partialSubmit="true">
		</tr:commandNavigationItem>
	</f:facet>
</tr:tree>

  public void nodeSelected(ActionEvent e)
  {
    this.currentPerson = (Person) treeModel.getRowData();
    selectedRowKeys.clear();
    selectedRowKeys.add();
  }
  
  public void nodeSelectedEvent(SelectionEvent event)
  {
    System.out.println("---------------> node selected.");
  }

best regards
Daniel
-- 
View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p14995033.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: [Trinidad] signature of method for selectionListener on a tree

Posted by Matthias Wessendorf <ma...@apache.org>.
public vod nodeSelected(org.apache.myfaces.trinidad.event.SelectionEvent event);

is this not working?

On Jan 18, 2008 7:14 AM, Daniel Niklas <da...@continentale.de> wrote:
>
> Hi,
>
> i want to define a selectionListener on my tree component:
>
> <tr:tree value="#{myBean.treeModel}" var="node"
>                         selectionListener="#{myBean.nodeSelected}">
>
> What is the signature of the method in my backing bean?
>
> Best regards
> Daniel
> --
> View this message in context: http://www.nabble.com/-Trinidad--signature-of-method-for-selectionListener-on-a-tree-tp14950886p14950886.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>



-- 
Matthias Wessendorf

further stuff:
blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
mail: matzew-at-apache-dot-org