Reuse the tab of a component in another component except a widget in touch ui aem - aem

I have a component /apps/myproject/component1.
In its dialog i have some widgets.Now I have another component /apps/myproject/component2 and its dialog want to use the same tab but a widget should be removed and one should be added in component2 touch UI dialog in AEM.
I tried to achieve it using
sling:resourceType :"granite/ui/components/foundation/include"
path:"/apps/myproject/component1"
on tab1.
But if i want to add and remove a widget, i am not able to do that.
Can anyone please help me?

Related

How can I create a permanent drawer like interface in Scaffold without using the widget Drawer? Is it even possible?

I want a drawer that does not closes, it needs to stay there permanently. I could do it with the help of a container, but I am confused in the process. Also how can I create the interface inside the drawer like (Featured,Bags and Shoes etc). Can anybody help me?
You can use Column widget and generate your desired UI elements , and through GestureDetector you can navigate your pages on those respective elements.

TabLayoutPanel finish loading event

I use a GWT TabLayoutPanel which contains several Google Charts Widgets.
I want to know if there's a handler/method that can be called once all the widgets in the tab have finished loading.(after I click the tab)
I need this because I refresh/reload the Charts once I click the tab, but the charts MUST be loaded first or the height/width won't apply on the charts.
Any help?
You can get UI widgets by Iterating or something like widget.getElementBytagName(). You should try gwt.Document.DOMHandler. widget.addDomHandler can get to iterate its sub widget or everythings under this widget. Really you don't need to invoke handlers to each widget. Try with DOMHandler. This can be OK. I don't know clearly what you really want to do. Please describe with your codes as you can.

add custom widget to DataGrid in GWT

I am trying to add a custom widget in a DataGrid cell in GWT.
The widget has 2 anchors and I want to be able to choose the action to take depending on the anchor clicked.
is there any example on how to do this.
My widget renders but it is unable to handle the clicks events.
Thanks
With cell Widgets, you have to use cells. It's a different way of thinking, building the UI and handling events, though.

embed GWT component TWICE and more in HTML page

I need to embed my GWT component which is a text area which do some functionalities in the key up and key down events twice and more on the same HTML page, in fact when i try to embed it in two different DIVs it appears only one time.
can any one help figure that problem?
A widget can only have one parent in the DOM. The widget will be contained by the last parent to which it is added. If you need to have a widget type appear more than once on the page you need to create more than one instance of the widget.

How do you get GWT 2.0 to accept clicks on two different Widgets added to a LayoutPanel?

Using GWT 2.0 I have an entry point that adds two Widgets to a LayoutPanel which in turn is added to the RootLayoutPanel. The Widgets both handle click events and have click events registered to them. The problem is that only the last widget added to the LayoutPanel can actually be clicked. Switch the order in which the widgets are added switches the widget that works. Add mroe widgets and still the only you can click is the last one added to the LayoutPanel.
Any idea why this is? Is there any reasoning behind the behaviour, or have I missunderstood what is happening under the covers? How do I gat all widgets in the LayoutPanel to accept events? Should I be using another panel class?
I'm not too bothered if the LayoutPanel prevents anything below it from being clicked, but want all Widgets added to it to be clickable.
Stupid Boy! (said in the voice of Captain Mainwaring)
There is no problem having two Widgets on a LayoutPanel accepting clicks. But if you adjust the Widgets' size by manipulating their elements' styles directly then the containing element created by the LayoutPanel will still cover the whole screen. In effect the last Widget added always covered everything else.
GWT school: D- Must try harder. Easily distracted...