You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by indiancomet <fa...@gmail.com> on 2012/09/01 17:19:27 UTC

Tapestry-Bootstrap : Using the component

I using Tapestry-Bootstrap and am struggling to get the Tapestry component
<t:select> to appear as Twitter-Bootstrap dropDown. I am sure it something
simple which i am missing here. Would someone care to point me in right
direction.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Bootstrap : Using the component

Posted by Jay Ginete <ki...@gmail.com>.
I think you can do something like this on your .tml file

 1. <divclass="btn-group">
 2. <aclass="btn dropdown-toggle"data-toggle="dropdown"href="#">
 3. Action
 4. <spanclass="caret"></span>
 5. </a>
 6. <ulclass="dropdown-menu">
 7. <li><a href="#" t:type="actionLink" t:id="doAction1">Do Action1</a></li>
 8. <li><a href="#" t:type="actionLink" t:id="doAction2">Do
    Action2</a></li>
 9. </ul>
10. </div>

And then then in your class file is just:

public void onActionFromDoAction1(){
     //do stuff
}

public void onActionFromDoAction2(){
     //do stuff
}


On Monday, 03 September, 2012 04:43 PM, indiancomet wrote:
> Ok. My bad. There is a direct correlation with the select component. I am
> tryping to make it appear like
> http://twitter.github.com/bootstrap/components.html#buttonDropdowns.
> Is that possible?
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5715998.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>


Re: Tapestry-Bootstrap : Using the component

Posted by indiancomet <fa...@gmail.com>.
I would agree with you. I am thinking of creating another component now ...
maybe ButtonGroupSelect that will let me achieve the look and feel of a
ButtonGroup for a select



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5716053.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Bootstrap : Using the component

Posted by trsvax <tr...@gmail.com>.
I don't think the select component has enough in common with the button group
to use the same model. The button group is not really a form component but
just a way to display a bunch of links. With Tapestry these could be
page/event/action or just plain a tags. 

I have driven button groups from a database just using the Loop Component.




--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5716022.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Bootstrap : Using the component

Posted by indiancomet <fa...@gmail.com>.
I could do that but, i was looking for more close to some stuff like select
which can take a model and display the relevant options rather than me
having to specify all the options. The options might come from a database
(lets say)



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5716015.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Bootstrap : Using the component

Posted by trsvax <tr...@gmail.com>.
<dl>
      <dt>Button Group</dt>
      <dd>
           <t:tb.buttonGroup>
	      	<t:pagelink page="components/buttons" >button1</t:pagelink>
	      	<t:pagelink page="components/buttons" >button2</t:pagelink>
	      	<t:pagelink page="components/buttons" >button3</t:pagelink>
	      </t:tb.buttonGroup>
      </dd>
      <dt>Button Group with dropdown</dt>
      <dd>            
	      <t:tb.buttonGroup>
	      	 # dropdown 
	      	<t:tb.dropdown>
	      		<t:pagelink page="components/buttons">Link1</t:pagelink>
	      		<t:pagelink page="components/buttons">Link2</t:pagelink>
	      		<t:pagelink page="components/buttons">Link3</t:pagelink>
	      	</t:tb.dropdown>
	      </t:tb.buttonGroup>
      </dd>
      <dt>Button Group with split dropdown</dt>
      <dd>
        <t:tb.buttonGroup>
	      	<t:pagelink page="components/buttons">dropdown</t:pagelink>
	      	<t:tb.dropdown>
	      		<t:pagelink page="components/buttons">Link1</t:pagelink>
	      		<t:pagelink page="components/buttons">Link2</t:pagelink>
	      		<t:pagelink page="components/buttons">Link3</t:pagelink>
	      	</t:tb.dropdown>
     	 </t:tb.buttonGroup>
      
      </dd>
      </dl>



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5716007.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Bootstrap : Using the component

Posted by indiancomet <fa...@gmail.com>.
Ok. My bad. There is a direct correlation with the select component. I am
tryping to make it appear like
http://twitter.github.com/bootstrap/components.html#buttonDropdowns.
Is that possible?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5715998.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Bootstrap : Using the component

Posted by indiancomet <fa...@gmail.com>.
Yup, other form elements are appearing correctly like the Bootstrap ones.
Interesting thing to note is that the <t:select> is being output as <select>
in html. I believe for this to look anywhere near the Bootstrap dropdown it
should be a <div> containing <button> and <ul>
Coz, i do not see a direct correlation of the html select control with any
other control in Bootstrap.



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5715993.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry-Bootstrap : Using the component

Posted by trsvax <tr...@gmail.com>.
I don't think the select component requires any special markup for Bootstrap.
Do other form elements look like the Bootstrap ones?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Bootstrap-Using-the-t-select-component-tp5715967p5715986.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org