Search in sources :

Example 36 with UIData

use of javax.faces.component.UIData in project TNTConcept by autentia.

the class CommissioningBean method deleteFile.

public String deleteFile() {
    UIData table = (UIData) FacesUtils.getComponent("commissioning:list");
    CommissioningFile toDelete = (CommissioningFile) table.getRowData();
    commissioning.getFiles().remove(toDelete);
    return null;
}
Also used : CommissioningFile(com.autentia.tnt.businessobject.CommissioningFile) UIData(javax.faces.component.UIData)

Example 37 with UIData

use of javax.faces.component.UIData in project TNTConcept by autentia.

the class ContactBean method deleteOwner.

public String deleteOwner() {
    final UIData table = (UIData) FacesUtils.getComponent("contact:owners");
    final User toDelete = (User) table.getRowData();
    contact.removeOwner(toDelete);
    if (contact.getOwners().isEmpty()) {
        FacesUtils.addWarningMessage("contact:ownersList", "editContact.emptyOwners", null);
    }
    return NavigationResults.EDIT;
}
Also used : User(com.autentia.tnt.businessobject.User) UIData(javax.faces.component.UIData)

Example 38 with UIData

use of javax.faces.component.UIData in project TNTConcept by autentia.

the class OfferBean method editInteractions.

/**
 * Create a new empty instance of the one-to-many field
 *
 * @return forward to the same page
 */
public String editInteractions() {
    UIData table = (UIData) FacesUtils.getComponent("offer:interactions");
    InteractionBean iB = (InteractionBean) FacesUtils.getBean("interactionBean");
    Interaction interactionSelectedInOfferEdit = (Interaction) table.getRowData();
    if (interactionSelectedInOfferEdit.getId() != null) {
        Interaction interaction = InteractionManager.getDefault().getEntityById(interactionSelectedInOfferEdit.getId());
        iB.setInteractionFromOffer(interaction);
        iB.setSelectedOrganization(interaction.getProject().getClient());
    } else {
        iB.setInteractionFromOffer(interactionSelectedInOfferEdit);
    }
    return NavigationResults.OFFER_CREATE_INTERACTION;
}
Also used : Interaction(com.autentia.tnt.businessobject.Interaction) UIData(javax.faces.component.UIData)

Example 39 with UIData

use of javax.faces.component.UIData in project TNTConcept by autentia.

the class DocumentBean method deleteCategories.

/**
 * Delete selected instance of the one-to-many field
 *
 * @return forward to the same page
 */
public String deleteCategories() {
    UIData table = (UIData) FacesUtils.getComponent("editDocument:categories");
    document.getCategories().remove(table.getRowData());
    return null;
}
Also used : UIData(javax.faces.component.UIData)

Example 40 with UIData

use of javax.faces.component.UIData in project TNTConcept by autentia.

the class OrganizationBean method deleteDepartment.

public String deleteDepartment() {
    final UIData table = (UIData) FacesUtils.getComponent("organization:departments");
    final Department toDelete = (Department) table.getRowData();
    organization.getDepartments().remove(toDelete);
    return NavigationResults.EDIT;
}
Also used : UIData(javax.faces.component.UIData)

Aggregations

UIData (javax.faces.component.UIData)46 UIComponent (javax.faces.component.UIComponent)6 Tag (com.autentia.tnt.businessobject.Tag)3 Position (com.autentia.tnt.businessobject.Position)2 User (com.autentia.tnt.businessobject.User)2 Paginator (com.liferay.faces.alloy.component.paginator.Paginator)2 SearchExpressionHint (org.primefaces.expression.SearchExpressionHint)2 ActivityFile (com.autentia.tnt.businessobject.ActivityFile)1 CommissioningFile (com.autentia.tnt.businessobject.CommissioningFile)1 CommissioningPaymentData (com.autentia.tnt.businessobject.CommissioningPaymentData)1 Contact (com.autentia.tnt.businessobject.Contact)1 ContactInfo (com.autentia.tnt.businessobject.ContactInfo)1 Department (com.autentia.tnt.businessobject.Department)1 Interaction (com.autentia.tnt.businessobject.Interaction)1 Organization (com.autentia.tnt.businessobject.Organization)1 Locale (java.util.Locale)1 Matcher (java.util.regex.Matcher)1 FacesException (javax.faces.FacesException)1 UIColumn (javax.faces.component.UIColumn)1 UIInput (javax.faces.component.UIInput)1