the collector issues

UI Components for JSF
Post Reply
Sven
Posts: 11
Joined: 09 Apr 2010, 13:38

04 May 2010, 16:29

Hello mates,

I was wondering if there's a way to localize the "remove" text of the collector and binding another function to update another component ...

Kind Regards ,

Sven

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

05 May 2010, 00:32

Can you post your code please Sven? Collector can be attached to any command component whose text you can change anyway.

Sven
Posts: 11
Joined: 09 Apr 2010, 13:38

05 May 2010, 09:32

no need really, its really stupid of me :S
Yesterday i was working a lot it seems, didn't realize that it was a command link outside the collector :(
i can change the value and i guess i can bind a function to its action easily :)

Sven
Posts: 11
Joined: 09 Apr 2010, 13:38

05 May 2010, 16:52

hello again ,

when i use collector inside:

Code: Select all

    <h:commandLink value="Erase">
                            <p:collector value="#{stock}" removeFrom="#{SelectOneMenuBean.stocks}"/>
    </h:commandLink>
it works alright yet i want to update the sum of the values when an element is removed from the table

i tried with <p:commandLink> yet it updates the values but doesnt update the table eventhough collector removes the element. Table isnt rendered again...

so i tried using <p:ajax> with in <h:commandLink> like this :

Code: Select all

    <h:commandLink value="Erase">
                            <p:collector value="#{stock}" removeFrom="#{SelectOneMenuBean.stocks}"/>
                            <p:ajax update="total" action="#{SelectOneMenuBean.removeFromPortfolioTable}"/>
                        </h:commandLink>
ajax aint working ... i'm kinda stuck :(
any ideas ?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

07 May 2010, 09:31

Can you post the datatable part as well?

ibanhoe
Posts: 4
Joined: 07 May 2012, 21:33

09 May 2012, 02:13

Regarding to this post...

Is there any way to identify the removed element from a collector into the managed bean?

I think the collector is a very good component, but i want to delete the removed element from database, so, that's because i want to identify what element was removed from collector.

Thanks

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 32 guests