Search Results

Search found 2 results on 1 pages for 'seitaridis'.

Page 1/1 | 1 

  • Open an attachment for editing and save changes made to it

    - by Seitaridis
    My Lotus Notes document has a rich text item that stores an attachment. I want to edit the attachment and after this to save the attachment back to the Lotus Notes document. This is the script that launches the attachment: @Command([EditGotoField];"Attachment"); @Command([EditSelectAll]); @Command([AttachmentLaunch]); @Command([EditDeselectAll]) This script opens the attachment, but the changes made are not reflected to the Lotus Document. One way of solving this is to add AttachmentActionDefault=2 as an entry to the notes.ini. This enables to edit the attachment when double clicking on attachment. Also using the right click on the attachment, and then choosing edit action, produces the same result. In both cases, after saving, the changes are reflected back to the Lotus Notes document. The problem is that I want to use a button for opening the attachment.

    Read the article

  • Reuse a facelet in multiple beans

    - by Seitaridis
    How do I invoke/access a property of a managed bean when the bean name is known, but is not yet constructed? For example: <p:selectOneMenu value="#{eval.evaluateAsBean(bean).text}" > <f:selectItems value="#{eval.evaluateAsBean(bean).values}" var="val" itemLabel="#{val}" itemValue="#{val}" /> </p:selectOneMenu> If there is a managed bean called testBean and in my view bean has the "testBean"value, I want the text or values property of testBean to be called. EDIT1 The context An object consists of a list of properties(values). One property is modified with a custom JSF editor, depending on its type. The list of editors is determined from the object's type, and displayed in a form using custom:include tags. This custom tag is used to dynamically include the editors <custom:include src="#{editor.component}">. The component property points to the location of the JSF editor. In my example some editors(rendered as select boxes) will use the same facelet(dynamicDropdown.xhtml). Every editor has a session scoped managed bean. I want to reuse the same facelet with multiple beans and to pass the name of the bean to dynamicDropdown.xhtml using the bean param. genericAccount.xhtml <p:dataTable value="#{group.editors}" var="editor"> <p:column headerText="Key"> <h:outputText value="#{editor.name}" /> </p:column> <p:column headerText="Value"> <h:panelGroup rendered="#{not editor.href}"> <h:outputText value="#{editor.component}" escape="false" /> </h:panelGroup> <h:panelGroup rendered="#{editor.href}"> <custom:include src="#{editor.component}"> <ui:param name="enabled" value="#{editor.enabled}"/> <ui:param name="bean" value="#{editor.bean}"/> <custom:include> </h:panelGroup> </p:column> </p:dataTable> #{editor.component} refers to a dynamicDropdown.xhtml file. dynamicDropdown.xhtml <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.prime.com.tr/ui"> <p:selectOneMenu value="#{eval.evaluateAsBean(bean).text}" > <f:selectItems value="#{eval.evaluateAsBean(bean).values}" var="val" itemLabel="#{val}" itemValue="#{val}" /> </p:selectOneMenu> </ui:composition> eval is a managed bean: @ManagedBean(name = "eval") @ApplicationScoped public class ELEvaluator { ... public Object evaluateAsBean(String el) { FacesContext context = FacesContext.getCurrentInstance(); Object bean = context.getELContext() .getELResolver().getValue(context.getELContext(), null, el); return bean; } ... }

    Read the article

1