on 10-12-2016 11:48 AM
Hello All,
I posted in SCN my query. now it is here with archive. I can not edit it seems.
http://archive.sap.com/discussions/thread/3965941
My query is still open.
jun.wu5 : Yes i am sure even core will not resturn the referance when we call it in fragments controler .
Thanks,
Abhi
Hello,
I didn't work with separate controller of fragments, but you can get table by using jQuery and their dom.
try this,
var oTable = $( "table[id*='idTable']" ).control()[0]; // replace idTable with your table id only, not along with view or
fragment id.
Hope this will help you.
Rgards,
Akhilesh
,Hello,
I didn't work with separate controller of fragment, but you can get table by using jQuery and their dom.
Try this,
var oTable = $("table[id*='idTable']").control()[0]; // replace idTable with your table id only, not along with fragment
or view id.
Hope this will help you.
-Akhilesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oddly enough, it was probably not a bug that kept your first comment from being visible. Well, maybe, sort of. Your content appears to have met the requirement of Pre-Moderation (Moderator review prior to posting). You should have seen a message which indicated the delay when you posted it.
I am not sure what your status is at the moment, but you may still be subject to such a review.
Regards, Mike (Moderator)
SAP Technology RIG
I am not sure, but scenario was,
first time when submitted my answer one error message came and crashed the discussion page (didn't remember the exact error message).
then I came back to this discussion again and didn't see my posted content, then I entered my answer again and press submit button, after submit button pressed the result is above you can see.
-Akhilesh
Hello Emanuel,
We can create fragments own controller as documented:
https://sapui5.hana.ondemand.com/docs/api/symbols/sap.ui.html#.fragment
So we have sap.ui.fragment(sName, sType, oController?), If we pass the controller name in oController while defining the fragment then we can write event handler of each control (from fragment) into this controller. No need to go to View controller for that.
Thanks,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Emanuele,
I can not get the control using byId("Table") as i am writing it in fragment controller . this will work when writing in view controller.
Thanks,
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhishek, Fragment are just Stub, they don't have a Controller. When you add a Fragment inside a view they're using the View's Controller
Hi Abhishek,
if your problem is just to take the table control you can do
this.getView().byId("Table")
where Table is the id of your table inside the fragment.and this is the controller
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.