1. #1
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default How do you insert Buttons (fbar) in Form designed by architect?

    How do you insert Buttons (fbar) in Form designed by architect?


    Is there any way to insert buttons (fbar) when designing a form using Sencha Architect?

    Here is a thread on the subject for Ext Designer, I was just checking to see if this limitation has been removed / fixed.

  2. #2
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,329
    Vote Rating
    211
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Aaron alreay said but this are the steps anyway:

    1. Drop a tool bar in the form.
    2. Set dock = "bttom"
    3. Set ui = "footer"
    4. add buttons...

    fbar is not supported by SA.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  3. #3
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default


    Yeah I saw that in the other thread. Just wanted to check to see if this had changed. Seems like a weird thing not to support.

    I also do not understand what "ui = footer" is suppose to accomplish. When I enter that it just looks like the toolbar is detached from the form.

  4. #4
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,329
    Vote Rating
    211
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Quote Originally Posted by whirling dervish View Post
    Seems like a weird thing not to support.
    Why?

    fbar is just a shortcut.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  5. #5
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default


    Quote Originally Posted by ssamayoa View Post
    Why?

    fbar is just a shortcut.
    Ah I skimmed over that part of the documentation,
    Code:
    fbar: [
      { type: 'button', text: 'Button 1' }
    ]
    is equivalent to

    Code:
    dockedItems: [{
        xtype: 'toolbar',
        dock: 'bottom',
        ui: 'footer',
        defaults: {minWidth: minButtonWidth},
        items: [
            { xtype: 'component', flex: 1 },
            { xtype: 'button', text: 'Button 1' }
        ]
    }]
    However when I set ui to 'footer', this is what my UI looks like,


    N
    otice the grid behind the toolbar.

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,445
    Vote Rating
    129
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    Quote Originally Posted by whirling dervish View Post
    Notice the grid behind the toolbar.
    Ah yes that would happen. Because its transparent and the thing immediately below it is in the canvas grid...

    Similar to if you were to put the component on a page with a color background and/or image background this would bleed through.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default


    So even though the toolbar is inside the form panel it is rendered as outside of it?

    Is there anyway to give it the appearance of being connected to the form?

  8. #8
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,329
    Vote Rating
    211
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Why?

    Is not good enough the way it is?

    But if definitely you want do that, one way is:

    1. Drop a panel.
    2. Drop a form panel inside that panel.
    3. Drop the toolbar in the inner panel, set dock=bottom and ui=footer.
    4. Add buttons to the form panel's toolbar.
    5. Clear the form panel's title.
    6. Set form panel's border to 0
    7. (optional) set bodyPadding to 5 (or whatever value you want) of the outer panel.

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  9. #9
    Sencha Premium Member
    Join Date
    May 2012
    Posts
    88
    Vote Rating
    5
    whirling dervish is on a distinguished road

      0  

    Default


    Thanks for the help everyone.

    It seems like a really strange work around to me. It weird that to have a form with a normal looking footer with a button in it I need to create two panels. That method is going to lead to some cluttered code.

    If anyone comes up with a better way, please post it here.

  10. #10
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,329
    Vote Rating
    211
    ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold ssamayoa is a splendid one to behold

      0  

    Default


    Quote Originally Posted by whirling dervish View Post
    That method is going to lead to some cluttered code.
    Who cares with generated code?
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

Thread Participants: 2

Tags for this Thread