Using and editing Components

This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.

Hello team, I am trying to make a hamburger Menu using a Component as a Header for my App, I’m using a Component because if I use a real header template, the menu will not cover it when opening, my requirement is that the menu covers the entire screen, which is why I’m not using a header template.

I am trying to meet that requirement using a component and setting it to top of the screen, but my question is, is there a way to create the component and modify it only once, and that change is reflected on all screens where the component is assigned, or is there no current way to edit

just the Component in the component definition and it will change all the

instances of that component in all my screens. Is there a way to use it from somewhere

else without using components?

Also if you have any working example of what I am trying to do that I can check the code or the project and try to adjust that I would really appreciate it. I’m adding some images to show desired behavior.

Thanks in advance for your help.

I forgot to mention, these are test currently done on Enterprise version 7.3, which is what we are currently using for the project, we can’t upgrade to version 8 at the moment.

Hi,

Please refer the below doc for Create a Component With/Without a Contract

http://docs.kony.com/konylibrary/visualizer/visualizer_user_guide/Content/C_CreatingComponent.htm#Without

Please find the attached sample app for reference.

Refer Component under template section and when there any modification in this component change are reflected on all screens where the component is assigned.

Thanks,

Hi,

Please refer the attached screenshot.

Thanks,

Thank you for your responses, one question about those 2 examples, if in the future my header had to change due to client requirements, I would have to edit each and every instance of the component that I created on each screen, or just changing the "original" component will carry on the changes to all instances of said component? If I create it with a Contract, that would answer that question?

Sadly,

I don’t have much experience working with MVC but if that would be the way for

it to behave like I’m describing, I can start working with it.

Hi,

Please note that, Changing the "original" component will reflected on all screens where the component is assigned and not required to change the each and every instance of the screen.

In the previous sample, please try to change /add widgets in components section and observe the changes in respected forms.

Hope this answers your question.

Thanks,

Yes, indeed it answers my question, thank you very much, I just have one more question, sorry if it’s too basic, but on the test I’m doing, the only way for me to use the component is saving it to a library, but in the example, you don’t use libraries, how do I add a component to my screen, again sorry if it’s a little basic, but I’m very new in the components department.

Hi,

To add a component to a form, Please refer the below document,section "Add a Component to a Form"

http://docs.kony.com/konylibrary/visualizer/visualizer_user_guide/Content/C_UsingComponents.htm#ImpComp

To add a component to a collection, Please refer the below document, Section "Add a Component to a Collection"

http://docs.kony.com/konylibrary/visualizer/visualizer_user_guide/Content/C_UsingComponents.htm#Library

Thanks,

Thank you very much for all your help, one last question and I think this is the real last one, when I add components to a screen, if my original had a button with an onClick action, each new instance that I created didn’t bring that action with them, is that normal behavior?.

Since the component works as a predefined widget where u already have the design but

have to actually set all actions. Well that’s how I understand that behavior

from components.

Hi,

Once components are added, We can define the events to widgets which are in respective forms as per the requirement, like we can define different events(as per the requirement) for first button in formA and formB in the provided sample app.

Hope this answers your question.

Thanks,

Hi,

Yes that does answer my question, thank you very much for all your help this components part is still a little new to me and you helped me understand it a bit more.

Hi,

Thanks for the update. Make sure you click the [Select as Best] to close out this post.