Questions Tagged With componenthttps://answers.axonivy.com/tags/component/?type=rss&user=Alexisquestions tagged <span class="tag">component</span>enWed, 19 Feb 2014 10:21:51 -0500How to access Component dialogshttps://answers.axonivy.com/questions/530/how-to-access-component-dialogs<p>Hello Ivy Team</p> <p>I have some questions concerning the <strong>access of Components data, methods and updating</strong> in ivy-jsf.<br> Some points might not been implemented yet so consider these also as ideas or wishes.</p> <p>In my example there is a main dialog which implements 2 components:</p> <pre><code>&lt;ic:ch.itpoint.mms.care.ItemEdit startMethod="startNew" callback="#{logic}" /&gt; &lt;ic:ch.itpoint.mms.show.ItemList startMethod="start" /&gt; </code></pre> <p>There are two targets I want to reach:</p> <ol> <li>Creating a Item or editing it should update the ItemList</li> <li>Selecting an Item in the List should open the Object in the Item-Editor</li> </ol> <p>One restriction is, that all that should be build up like described with components. Saving events will be handled first in the component, then in the main-page. Another might be to preferably stay away from self made javascripts.<br><br> I achieved, that I can save the Item and call a method (itemSaved()) via the callback on the main-page at the same time:</p> <pre><code>&lt;p:commandButton value="#{ivy.cms.co('/lables/save')} - Callback" actionListener="#{logic.saveItem}" action="#{cc.attrs.callback.itemSaved}" ajax="true" icon="ui-icon-disk" update="itemForm,:j_id_s:itemsListeForm" /&gt; </code></pre> <p>That's allready something, but I didn't find any way to access the List-Component.<br> In the end I would see these possibilities:</p> <ol> <li>Having access to components methods / events, which also provoke an update in the view.</li> <li>Having access to components data from main page. And some kind of dataChangeListener to update the view.</li> </ol> <p>Two possible solutions I see:</p> <ol> <li>An object of the compoenent in jsf (with possible access in the logic)</li> <li>Same object in the logic (same as ULC-components)</li> </ol> <p>An Update could exceptionally be fired by the update-Attribute :j_id_s:itemsListeForm in the brother-component (I don't know if it would work)<br></p> <p>Thank you for your support!<br></p> <p>Greetings<br> Alexis Suter</p>AlexisWed, 19 Feb 2014 10:21:51 -0500https://answers.axonivy.com/questions/530/how-to-access-component-dialogshtmluserdialogcallbackjsfcomponent