[Seaside] TwitterBootstrap dropdowns and submitting on change
Paul DeBruicker
pdebruic at gmail.com
Thu Oct 17 21:00:59 UTC 2013
start your own thread?
On Oct 17, 2013, at 1:55 PM, gettimothy <gettimothy at zoho.com> wrote:
> I have a tbsNavBar that I want to put buttons on and be able to disable/enable the rendering of them depending on what component is using the navBar.
> For example, If I am on the Documentation component, I do not want to show a link to the Documentation component when I am on it.
>
> In the NavBar, I initialized a couple of dictionaries--one with a selector and the other with a lable to display.
>
>
>
>
> initialize
> super initialize.
> linkDisplay = Dictionary new.
> "enable all links by default"
> linkDisplay
> at: #signin put: true;
> at: #documentation put: true;
> at: #support put: true;
> at: #signup put: true.
> linkLabel = Dictionary new.
> linkLabel
> at: #signin put: 'Sign In';
> at: #documentation put: 'Documentation';
> at: #support put: 'Help & Support';
> at: #signup put: 'Sign Up'.
>
>
> Then on render, I want to invoke a callback with a selector named what the key in the dictionary is so that this:
>
>
> html tbsNavItem: [ html anchor callback: [self signup]; with: 'Sign Up' ].
> html tbsNavItem: [ html anchor callback: [self documentation]; with: 'Documentation' ].
> html tbsNavItem: [ html anchor callback: [self support]; with: 'Help & Support'].
> html tbsNavItem: [ html anchor callback: [self signin]; with: 'Sign In']]]
>
> Becomes:
>
> ...
> linkDisplay keysAndValuesDo: [ :key :value | value
> ifTrue: [
> html tbsNavItem: [ html anchor callback: [self key]; with: (linkLabel at: key) ]]....
>
>
> I am getting an error
>
> MessageNotUnderstood: MyComponent>>key
>
> Does anybody have a generic way to dynamically set a callback to a selector?
>
> thx in advance
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the seaside
mailing list