I'm trying to do last example in this page
http://docs.sencha.com/touch/2-0/#!/guide/nested_list
and i'm using sencha architect but in the example i have to give a reference to the nestedlist to use detail card of the container however i can't do it because i can't edit the code in sencha architect. What should i do to give a reference in nested list to use container and detail card ?
You can create a custom view to show record details and show it on a leafitemtap event of the nestedlist. For example you can write an event handler including something like:
var details = Ext.create('App.view.RecordDetail');
//lets say txtRecord is a text field in RecordDetail view
Ext.getCmp('txtRecord').setValue(record.get('text'));
Ext.Viewport.setActiveItem(details);
Also you can have a toolbar containing a back button on your details view for navigating back to the nested list. Or alternatively you can take a look at Ext.navigation.View for automatic navigation.
Related
I want to create an additional page like in the picture below and I want to show the codes I want in the page, I researched but I couldn't get a result. What is the hook name I can do this?
https://prnt.sc/wccy4e
This gist shows how to add a simple nav tab + subnav.
If you want to load specific templates ( perhaps from a plugin ) into a custom nav screen, you need to use bp_register_template_stack, and the code becomes more complicated.
This is an example for adding a custom tab to groups and loading templates via bp_register_template_stack.
How can I communicate between multiple widgets?
I have 2 widgets on the same page, and when clicking on one of the first widget button, I need to modify the content of the second widget.
Can anyone help me?
Details:
I extend FieldMany2One (selectbox) and ListView. What I need is, when select an option in FieldMany2One, I need to update content in ListView. What I need is to get an instantiated widget into another widget.
In method reinit_value of FieldMany2One widget, I need to get instance of the ListView.
Best regards,
Pedro
I'm converting my site from using jQueryUI to jQuery Mobile, and I'm having some trouble.
I have a page that lets users add new timesheet entries. They click the "Add" button and it retrieves a Partial View from the server right onto the page.
The problem is that jQuery Mobile is not applying to any of the elements in the Partial View.
How can I force jQuery Mobile to process my elements after they've been inserted into the page?
The short answer is that you can just trigger the create method on the parent element of where you inserting your partial view.
For example $('#container').trigger( "create" );
Alternatively most widgets can be manually initialized by calling them on the element, for example for a listview: $('#myListview').listview(). This can be useful if you have only a few elements that need to be enhaced and you don't want to traverse all the child elements of the container. You should also know that for many widgets there is also a refresh method which you can call if you add elements to it after it has already been initialized for example $('#myListview').listview('refresh).
Also have a look at the following Q & A from the JQM docs which deals with this issue and for an explanation as to why it is necessary to call these methods.
Question: Content injected into a page is not enhanced.
Answer:
jQuery Mobile has no way to know when you have injected content into a
page. To let jQuery Mobile know you have injected content that must be
enhanced, you need to either make sure the plugins are called to
enhance the new elements or trigger("create") on the parent container
so you don't have to call each plugin manually.
I'm newbie in CakePHP and I have a few questions.
I'm trying to set up my first CakePHP website, and I want to display menu with links in my layout. I've created model called MenuItem, then I've created controller "MenuItemsController" and then a function show. When I access /menuitems/show/ all my links are displayed. So here's the problem. I want do call this controller in my layout so links will be visible on every subpage. First question is how to call this controller, and second how will output look like ? Do I have to create view for this cotroller if I don't want to use /menuitems/show/ or it's okay to set controller to output just array of data ?
Thank you!
First question is how to call this controller, and second how will output look like ?
Use requestAction() to request the data from the view OR better, set it based on the page you're on in your AppController::beforeFfilter() method.
In your layout simply use an element $this->element('menu'); and use the set data in it or, if you go for requestAction() do this call inside the element, you can even cache the element.
Read the links to the CakePHP book in the text, the book contains example code as well.
Is there any component like reply to post/blog in sencha touch 2 for giving any reply?
(for clearing question: component like, if we click to reply button then it will show box with subject and data etc)
You would have to implement it yourself, but it wouldn't be too difficult.
You would simply create a view which has a textareafield in it. You would show this view when you tap on a button, and then call field.setValue() with the predefined value you want to add.