Personalización básica > User Interface Customization > Gathering the Data for the UI > Acquiring Data via Info*Engine > Solution
  
Solution
Return an IeTaskInfo from a Windchill Client Architecture table’s component data builder.
Prerequisite Knowledge
Readers should be familiar with Info*Engine as well as with the basic Windchill Client Architecture data acquisition concepts.
Solution Elements
Element
Type
Description
ComponentDataBuilder
Java interface
Creates the data model for the component
IeTaskInfo
Java class
Encapsulates information about the Info*Engine task and the parameters that can be passed to the task
Procedure – Implementing the Component Data Builder
Your ComponentDataBuilder should return a well populated IeTaskInfo object. It takes the action name as the constructor which gives information of the task that need to be executed to get the data For example, the following code snippet demonstrates the use of the “jca-Search” task .
public class MyDataBuilderWithIETask implements ComponentDataBuilder {

@Override
public Object buildComponentData(ComponentConfig config,
ComponentParams params) throws WTException {

//pass the task name as constructor
IeTaskInfo taskInfo = new IeTaskInfo("jca-Search");
……..
return taskInfo;
}
}
You can provide parameters to the “Get-Model” webject using the setParam(Param param) method on the IeTaskInfo. In addition if you want to pass parameters to the underlying task using FORM group, can use addFormParam(String name, Object data) method.
Configuring task selection
Internally, it uses Info*Engine’s Dispatch-Tasks webject to look up the task implementation for the action task name that is provided in the IeTaskInfo. Several parameters which are passed on to the Dispatch-Tasks are exposed, using which it’s possible to choose the right implementation task.
Refer to Dispatch-Tasks for more information on how these parameters work:
//pass the taskName as constructor
IeTaskInfo taskInfo = new IeTaskInfo("jca-Search");
//parameter passed on to the Dispatch-Tasks
taskInfo.setParam(new Param("GROUP_IN", "<groupInName>"));
taskInfo.setParam(new Param("TYPE", "<typeName>"));
taskInfo.setParam(new Param("CLIMBER", "<climberName>"));
return taskInfo;
Supplying form data to the task
By default, any request parameters in your JSP page will be supplied as part of the form data to your task. So, if the page’s URL ends with something like “/somePage.jsp?foo=bar”, then in your task implementation, “@FORM[]foo[]” will map to “bar”.
If you want to explicitly configure the form data for your task, then you can do this by creating the form group and then specifying the name of the group as follows:
//pass the taskName as constructor
IeTaskInfo taskInfo = new IeTaskInfo("jca-Search");
//create your FORM group
Group groupIn = new Group("FORM");
taskInfo.setGroupIn(groupIn);
return taskInfo;
Using Information Supplied to the Task by the Windchill Client Architecture
Windchill Client Architecture supplies information to your task about the attributes displayed by the requesting component and current table view (if the component uses configurable tables). Your task can then use this information to query for the right resulting data. The additional parameters supplied to your task map to a subset of those accepted by the Query-Objects webject:
ATTRIBUTE: This contains the list of attributes the component wants to display
SORTBY: What attributes to sort by
SORTED: The sort direction for each attribute
WHERE: Filter criteria
TYPE: The type or types to search for.
VERSION: Whether LATEST or ALL versions should be returned.
ITERATION: Whether LATEST or ALL iterations should be returned
ATTRIBUTE_TYPE_CONTEXT: When multiple types are supplied, the type that should be used as a context to look up attribute definitions
PAGE_LIMIT: The number of results per page (Not a customization point as paging is not supported in Tables in Windchill Release 10.0)
PAGE_OFFSET: The first result row to return from the paging session, if any (Not a customization point as paging is not supported in Tables in Windchill Release 10.0)
PAGING_SESSION_ID: The current paging session id, if any
Most of these parameter names can be reconfigured to some other value using setParam(Param param). See Customizations Points for details.
Acquiring Data via Info*Engine