You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jacob Bergoo <ja...@gmail.com> on 2007/05/01 22:50:41 UTC

Tacos Grid Component question

Ah.. okey.... then I dont need to feel stupid ;-)



Jessek wrote:
> 
> Oh sorry ....You must be talking about the Tacos Grid component. I have no
> idea on that one...
> 
> On 5/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
>>
>>
>> Hi Jesse,
>> I looked at the link and I must say that I still don't get it....
>> How will I wrap my content into a directLink in the grid component?
>>
>> I have the method from the demo app:
>>
>>    public Object getGridData()
>>     { // source
>>         List results = new ArrayList();
>>         DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd",
>> getLocale());
>>         for (int i = 0; i < 100; i++) {
>>             Map map = new HashMap();
>>             map.put("stringColumn", "String " + i);
>>             map.put("intColumn", new Integer(i * 10));
>>             map.put("floatColumn", "" + ((i * 100) + (float) ((float) i /
>> (float) (i + 1))));
>>             Calendar cal = Calendar.getInstance();
>>             cal.add(Calendar.DATE, i);
>>             map.put("dateColumn", dateFormat.format(cal.getTime()));
>>             results.add(map);
>>         }
>>         return results;
>>     }
>>
>> What do I need to change here for making a new column in the end with a
>> directLink?
>> I am really thankfull for any pointers or example you can help me with.
>> Thanks
>> Jacob
>>
>>
>>
>>
>>
>> Jessek wrote:
>> >
>> > You could probably do something similar to the example found at the
>> bottom
>> > of this page:
>> >
>> >
>> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/table.html
>> >
>> > Just wrap a DirectLink around whatever you want linked.
>> >
>> > On 5/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
>> >>
>> >>
>> >> Hi,
>> >> is there a way of creating a link for each row in the grid component
>> that
>> >> goes to a listener? I am working in Tapestry 4.0.2 and Tacos 4.0.1.
>> >>
>> >> Thanks,
>> >> Jacob
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Grid-Component-question-tf3676754.html#a10274287
>> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> >> For additional commands, e-mail: users-help@tapestry.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Jesse Kuhnert
>> > Tapestry/Dojo team member/developer
>> >
>> > Open source based consulting work centered around
>> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Grid-Component-question-tf3676754.html#a10275618
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 
> -- 
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
> 
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Tacos-Grid-Component-question-tf3676754.html#a10275740
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Grid Component question

Posted by Jacob Bergoo <ja...@gmail.com>.
Hi,
I tried to take your approach and did this in my java class:

package com.mycompany.ui.web.action.securepages.rep;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import net.sf.tacos.ajax.components.grid.GridColumn;
import net.sf.tacos.ajax.components.grid.GridColumnModel;

import org.acegisecurity.annotation.Secured;
import org.apache.tapestry.IDirect;
import org.apache.tapestry.IPage;
import org.apache.tapestry.IRequestCycle;
import org.apache.tapestry.annotations.Bean;
import org.apache.tapestry.annotations.InjectObject;
import org.apache.tapestry.annotations.InjectState;
import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.engine.DirectServiceParameter;
import org.apache.tapestry.engine.IEngineService;
import org.apache.tapestry.event.PageBeginRenderListener;
import org.apache.tapestry.event.PageEvent;
import org.apache.tapestry.form.IPropertySelectionModel;
import org.apache.tapestry.form.StringPropertySelectionModel;
import org.apache.tapestry.html.BasePage;
import org.apache.tapestry.valid.ValidationDelegate;

import com.mycompany.business.dtos.RepDocumentSearchDTO;
import com.mycompany.business.model.AppUser;
import com.mycompany.business.model.Rep;
import com.mycompany.business.service.appuser.AppUserService;
import com.mycompany.business.service.rep.RepService;
import com.mycompany.business.util.StringUtils;
import com.mycompany.ui.web.action.SessionUserInfo;

@Secured({"ROLE_REP_ADMIN", "ROLE_REP"})
public abstract class RepDocumentPage extends BasePage implements
PageBeginRenderListener {
	
	/* CONSTANTS */
	public static final DateFormat DATE_FORMAT =
DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG);
//	private static Logger log =
LoggerFactory.getLogger(RepDocumentPage.class);
	
	/* INJECTED OBJECTS */
	@InjectState("sessionuserinfo")
	public abstract SessionUserInfo getSessionUserInfo();

	@InjectObject("spring:repService")
	public abstract RepService getRepService();
	
	@InjectObject("spring:appUserService")
	public abstract AppUserService getAppUserService();
	
	@InjectObject("engine-service:direct")
	public abstract IEngineService getDirectService();
	
	@Bean
	public abstract ValidationDelegate getDelegate();
	
	/* ABSTRACT METHODS */
	@Persist("client")
	public abstract boolean getIsSearchSelected();
	public abstract void setIsSearchSelected(boolean b);
	@Persist("client")
	public abstract boolean getIsSearchButtonClicked();
	public abstract void setIsSearchButtonClicked(boolean b);
	@Persist("client")
	public abstract boolean getIsSearchResultSelected();
	public abstract void setIsSearchResultSelected(boolean b);
	
	public abstract RepDocumentSearchDTO getRepDocumentSearchDTO();
	public abstract void setRepDocumentSearchDTO(RepDocumentSearchDTO o);
	
	/* PAGE BEGIN RENDER */
	public void pageBeginRender(PageEvent event) {
		RepDocumentSearchDTO repDoc = new RepDocumentSearchDTO();
		setRepDocumentSearchDTO(repDoc);
	}
	
	public String getCurrentTopBarName() {
		return getSessionUserInfo().getRepSite().getCompanyName() + "-"+
TOP_BAR_NAME;
	}
	
	public IPropertySelectionModel getRepNumSelectModel() {
		AppUser appUser =
getAppUserService().getUserByPrimaryKey(getSessionUserInfo().getUserName());
		Rep rep = getRepService().getRepByRepNum(appUser.getRepNum());
		
		/// TODO : change to get list of visible reps and rep first name and last
name
		List<Rep> visibleRepList =
getRepService().getRepByProdGroup(rep.getProdGroup());
		String[] visibleRepSelectArray = null;
		if (visibleRepList != null && visibleRepList.size() > 0) {
			visibleRepSelectArray = new String[visibleRepList.size() + 1];
			visibleRepSelectArray[0] = RepDocumentSearchDTO.SELECT_REP_NUM;
			int i = 1;
			for (Rep repElement :visibleRepList) {
				visibleRepSelectArray[i] = repElement.getRepNum();
				i++;
			}
		}
		return new StringPropertySelectionModel(visibleRepSelectArray);
	}	
	
	public IPropertySelectionModel getFileTypeSelectModel() {	
		String[] fileTypeSelectArray = new String[3];
		fileTypeSelectArray[0] = RepDocumentSearchDTO.SELECT_FILE_TYPE;
		fileTypeSelectArray[1] = "Image";
		fileTypeSelectArray[2] = "PDF";
		return new StringPropertySelectionModel(fileTypeSelectArray);
	}
	
	public IPropertySelectionModel getAccountTypeSelectModel() {	
		
		//TODO : get the accounts from the db...
		
		String[] accountTypeSelectArray = new String[3];
		accountTypeSelectArray[0] = RepDocumentSearchDTO.SELECT_ACCOUNT_NUM;
		accountTypeSelectArray[1] = "IC12345";
		accountTypeSelectArray[2] = "IC23445";
		return new StringPropertySelectionModel(accountTypeSelectArray);
	}
	
	 public GridColumnModel getGridColumns() { // columns
		return new GridColumnModel(Arrays.asList(new GridColumn[] {
				new GridColumn("firstNameLastName", "Name", new Integer(600),
						true, false, GridColumn.STRING_TYPE, "textClass",
						"bottom", "center", "textClass", false),
				new GridColumn("ssn", "SSN", new Integer(300), true, false,
						GridColumn.STRING_TYPE, "textClass", "bottom",
						"center", "textClass", false),
				new GridColumn("accountType", "Account Type", new Integer(300),
						true, false, GridColumn.STRING_TYPE, "textClass",
						"bottom", "center", "textClass", false),
				new GridColumn("fileType", "File Type", new Integer(300), true,
						false, GridColumn.STRING_TYPE, "textClass", "bottom",
						"center", "textClass", false),
				new GridColumn("dateCreated", "Date Created", new Integer(300),
						true, false, GridColumn.DATE_TYPE, "%Y/%m/%d",
						"bottom", "center", "dateClass", false),
				new GridColumn("dateChanged", "Date Changed", new Integer(300),
						true, false, GridColumn.DATE_TYPE, "%Y/%m/%d",
						"bottom", "center", "dateClass", false),
				new GridColumn("customerId", "Customer Id", new Integer(150),
						true, false, GridColumn.NUMBER_TYPE, null, null, null,
						"numberClass", true),
				new GridColumn("repNum", "Rep Number", new Integer(300), true,
						false, GridColumn.STRING_TYPE, "textClass", "bottom",
						"center", "textClass", true),
				new GridColumn("edit", "Edit", new Integer(300), true, false,
						GridColumn.HTML_TYPE, "textClass", "bottom", "center",
						"textClass", false) }));
	}

	/*
	 * name, displayName, width, sortable, caseSensistive, dataType, formatter,
	 * valign, align, css, hidden, totalJSfunction
	 */

	public Object getGridData() {
		List<Object> results = new ArrayList<Object>();
		DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd", getLocale());
		IDirect directLinkComponent = (IDirect) getComponent("editSearchResult");		
		
		for (int i = 0; i < 100; i++) {
			Map<Object, Object> map = new HashMap<Object, Object>();
			map.put("firstNameLastName", "FirstName" + i + " LastName" + i);
			map.put("ssn", new Integer(i * 100000));
			map.put("accountType", "accountType" + i);
			map.put("fileType", "fileType" + i);
			Calendar cal = Calendar.getInstance();
			cal.add(Calendar.DATE, i);
			map.put("dateCreated", dateFormat.format(cal.getTime()));
			map.put("dateChanged", dateFormat.format(cal.getTime()));
			map.put("customerId", new Integer(i * 10));
			map.put("repNum", "repNum" + i);
			
			DirectServiceParameter dsp = new
DirectServiceParameter(directLinkComponent, new Object[]{
					i, "FirstName" + i + " LastName" + i});
			
                        // The a href starts with a <  but if i put that
there it will only display the Edit link in this posting on the forum. The
same for the closing tag
			map.put("edit", "a href=\"" + getDirectService().getLink(false,
dsp).getURL() + "\">Edit/a>");
			results.add(map);
		}
		return results;
	}

	public boolean getInitSortOrder() {
		return true;
	}

	public String getInitSortColumn() {
		return "firstNameLastName";
	}

	public Map<String, Object> getTotalRow() {
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("firstNameLastName", null);
		map.put("ssn", null);
		map.put("accountType", null);
		map.put("fileType", null);
		map.put("dateCreated", null);
		map.put("dateChanged", null);
		map.put("customerId", null);
		map.put("repNum", null);
		return map;
	}

	public String getInfo() {
		return "This is an informative string that can be generated on the fly";
	}
	
	public void onSearchForm(IRequestCycle cycle){
		if (getIsSearchSelected()) {
			setIsSearchSelected(false);
		} else {
			setIsSearchSelected(true);
		}
	}
	
	public void onClearSearchForm(IRequestCycle cycle) {
		setRepDocumentSearchDTO(new RepDocumentSearchDTO());
		setIsSearchResultSelected(false);
		setIsSearchButtonClicked(false);
	}
	
	public void onSearchResult(IRequestCycle cycle) {
		if (getIsSearchResultSelected()) {
			setIsSearchResultSelected(false);
		} else {
			setIsSearchResultSelected(true);
		}
	}
	
	public String onSearch(IRequestCycle cycle) {
		ValidationDelegate delegate = getDelegate();
		if (!getRepDocumentSearchDTO().isHavingSearchParametersSet()) {
			/* No field set for searching. Set error message */
			delegate.setFormComponent(null);
			delegate.record("No search parameters set. You must input at least 1
search parameter!", null);
		} else {
			setIsSearchButtonClicked(true);
			setIsSearchResultSelected(true);
		}
		return null;
	}
	
	public IPage onEditSearchResult(IRequestCycle cycle, int id, String name) {	
		
		System.out.println("Inside listener onEditSearchResult()");
		System.out.println("id = " + id);
		System.out.println("name = " + name);

		return null;
	}
	
}

And I get this exception:

11:09:35,171 ERROR [AjaxDirectServiceImpl] Error rendering Ajax Response:
org.apache.tapestry.BindingException: Unable to read OGNL expression
'<parsed OGNL expression>' of $RepDocumentPage_31@1
5efe34[RepDocumentPage]: gridData
[context:/html/secure/rep/RepDocumentPage.page, line 24, column 55]
        at
org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:114)
        at
org.apache.tapestry.binding.ExpressionBinding.getObject(ExpressionBinding.java:103)
        at
org.apache.tapestry.binding.AbstractBinding.getObject(AbstractBinding.java:87)
        at $Grid_33.getSource($Grid_33.java)
        at
net.sf.tacos.ajax.components.grid.Grid.writeTableData(Grid.java:381)
        at net.sf.tacos.ajax.components.grid.Grid.writeTable(Grid.java:234)
        at
net.sf.tacos.ajax.components.grid.Grid.renderComponent(Grid.java:184)
        at $Grid_33.renderComponent($Grid_33.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
        at
org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:86)
        at $IfBean_11.renderComponent($IfBean_11.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
        at org.apache.tapestry.components.Any.renderComponent(Any.java:48)
        at $Any_19.renderComponent($Any_19.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
        at
org.apache.tapestry.components.IfBean.renderComponent(IfBean.java:86)
        at $IfBean_11.renderComponent($IfBean_11.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
        at org.apache.tapestry.components.Any.renderComponent(Any.java:48)
        at $Any_19.renderComponent($Any_19.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
        at org.apache.tapestry.components.Any.renderComponent(Any.java:48)
        at $Any_19.renderComponent($Any_19.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
        at org.apache.tapestry.html.Body.renderComponent(Body.java:129)
        at $Body_30.renderComponent($Body_30.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:434)
        at org.apache.tapestry.html.Shell.renderComponent(Shell.java:115)
        at $Shell_34.renderComponent($Shell_34.java)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:92)
        at
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:617)
        at
org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:275)
        at
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:366)
        at
net.sf.tacos.ajax.contrib.DojoResponseBuilder.renderResponse(DojoResponseBuilder.java:192)
        at
net.sf.tacos.ajax.impl.AjaxDirectServiceImpl.renderAjaxResponse(AjaxDirectServiceImpl.java:361)
        at
net.sf.tacos.ajax.impl.AjaxDirectServiceImpl.service(AjaxDirectServiceImpl.java:275)
        at
$AjaxDirectService_1124d56688d.service($AjaxDirectService_1124d56688d.java)
        at
org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:66)
        at
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)
        at
org.apache.tapestry.services.impl.InvokeEngineTerminator.service(InvokeEngineTerminator.java:60)
        at
$WebRequestServicer_1124d566873.service($WebRequestServicer_1124d566873.java)
        at
$WebRequestServicer_1124d56686d.service($WebRequestServicer_1124d56686d.java)
        at
org.apache.tapestry.services.impl.WebRequestServicerPipelineBridge.service(WebRequestServicerPipelineBridge.j
ava:56)
        at
$ServletRequestServicer_1124d56684f.service($ServletRequestServicer_1124d56684f.java)
        at
org.apache.tapestry.request.DecodedRequestInjector.service(DecodedRequestInjector.java:55)
        at
$ServletRequestServicerFilter_1124d56684b.service($ServletRequestServicerFilter_1124d56684b.java)
        at
$ServletRequestServicer_1124d566851.service($ServletRequestServicer_1124d566851.java)
        at
com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainAdapter.java:43)
        at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
        at $Filter_1124d566849.doFilter($Filter_1124d566849.java)
        at
com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.service(ServletRequestServicerFilterA
dapter.java:42)
        at
$ServletRequestServicer_1124d566851.service($ServletRequestServicer_1124d566851.java)
        at
com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainAdapter.java:43)
        at
org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
        at
$FormProcessor_1124d566847.doFilter($FormProcessor_1124d566847.java)
        at
com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.service(ServletRequestServicerFilterA
dapter.java:42)
        at
$ServletRequestServicer_1124d566851.service($ServletRequestServicer_1124d566851.java)
        at
org.apache.tapestry.multipart.MultipartDecoderFilter.service(MultipartDecoderFilter.java:52)
        at
$ServletRequestServicerFilter_1124d56683f.service($ServletRequestServicerFilter_1124d56683f.java)
        at
$ServletRequestServicer_1124d566851.service($ServletRequestServicer_1124d566851.java)
        at
org.apache.tapestry.services.impl.SetupRequestEncoding.service(SetupRequestEncoding.java:53)
        at
$ServletRequestServicerFilter_1124d56684d.service($ServletRequestServicerFilter_1124d56684d.java)
        at
$ServletRequestServicer_1124d566851.service($ServletRequestServicer_1124d566851.java)
        at
com.javaforge.tapestry.acegi.filter.FilterChainAdapter.doFilter(FilterChainAdapter.java:43)
        at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.ja
va:229)
        at $Filter_1124d566841.doFilter($Filter_1124d566841.java)
        at
com.javaforge.tapestry.acegi.filter.ServletRequestServicerFilterAdapter.service(ServletRequestServicerFilterA
dapter.java:42)
        at
$ServletRequestServicer_1124d566851.service($ServletRequestServicer_1124d566851.java)
        at
$ServletRequestServicer_1124d566839.service($ServletRequestServicer_1124d566839.java)
        at
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:123)
        at
org.apache.tapestry.ApplicationServlet.doPost(ApplicationServlet.java:168)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
        at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java
:664)
        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to read
OGNL expression '<parsed OGNL expression>' of
 $RepDocumentPage_31@15efe34[RepDocumentPage]: gridData
[context:/html/secure/rep/RepDocumentPage.page, line 5, column 9
1]
        at
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:95)
        at
$ExpressionEvaluator_1124d56690d.readCompiled($ExpressionEvaluator_1124d56690d.java)
        at
org.apache.tapestry.binding.ExpressionBinding.resolveExpression(ExpressionBinding.java:110)
        ... 99 more
Caused by: ognl.OgnlException: gridData
[org.apache.hivemind.ApplicationRuntimeException: Component
$RepDocumentPage_31@
15efe34[RepDocumentPage] does not contain a component editSearchResult.
[context:/html/secure/rep/RepDocumentPage.page,
line 5, column 91]]
        at ognl.OgnlRuntime.getMethodValue(OgnlRuntime.java:908)
        at
ognl.ObjectPropertyAccessor.getPossibleProperty(ObjectPropertyAccessor.java:54)
        at
ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:122)
        at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:1616)
        at ognl.ASTProperty.getValueBody(ASTProperty.java:96)
        at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
        at ognl.SimpleNode.getValue(SimpleNode.java:210)
        at ognl.Ognl.getValue(Ognl.java:333)
        at ognl.Ognl.getValue(Ognl.java:310)
        at
org.apache.tapestry.services.impl.ExpressionEvaluatorImpl.readCompiled(ExpressionEvaluatorImpl.java:91)
        ... 101 more

Anyone have any Ideer on how to solve this?
Thanks in advance,
Jacob
-- 
View this message in context: http://www.nabble.com/Tacos-Grid-Component-question-tf3676754.html#a10287105
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Grid Component question

Posted by Andreas Andreou <an...@di.uoa.gr>.
Must admit i've also never used it! It was contibuted by Sam, there's
probably a
good change he was using it with direct links... or links of some form...

Anyway, looking at the generated html of
http://opencomponentry.com:8080/tacos/dojo/GridExample.html
I just wonder what happens if you provide html markup for a cell's data...

Perhaps you could then have link using the href that the direct service can
generate for you - when given the right arguments.

On 5/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
>
>
> Ah.. okey.... then I dont need to feel stupid ;-)
>
>
>
> Jessek wrote:
> >
> > Oh sorry ....You must be talking about the Tacos Grid component. I have
> no
> > idea on that one...
> >
> > On 5/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >>
> >>
> >> Hi Jesse,
> >> I looked at the link and I must say that I still don't get it....
> >> How will I wrap my content into a directLink in the grid component?
> >>
> >> I have the method from the demo app:
> >>
> >>    public Object getGridData()
> >>     { // source
> >>         List results = new ArrayList();
> >>         DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd",
> >> getLocale());
> >>         for (int i = 0; i < 100; i++) {
> >>             Map map = new HashMap();
> >>             map.put("stringColumn", "String " + i);
> >>             map.put("intColumn", new Integer(i * 10));
> >>             map.put("floatColumn", "" + ((i * 100) + (float) ((float) i
> /
> >> (float) (i + 1))));
> >>             Calendar cal = Calendar.getInstance();
> >>             cal.add(Calendar.DATE, i);
> >>             map.put("dateColumn", dateFormat.format(cal.getTime()));
> >>             results.add(map);
> >>         }
> >>         return results;
> >>     }
> >>
> >> What do I need to change here for making a new column in the end with a
> >> directLink?
> >> I am really thankfull for any pointers or example you can help me with.
> >> Thanks
> >> Jacob
> >>
> >>
> >>
> >>
> >>
> >> Jessek wrote:
> >> >
> >> > You could probably do something similar to the example found at the
> >> bottom
> >> > of this page:
> >> >
> >> >
> >>
> http://tapestry.apache.org/tapestry4.1/tapestry-contrib/componentreference/table.html
> >> >
> >> > Just wrap a DirectLink around whatever you want linked.
> >> >
> >> > On 5/1/07, Jacob Bergoo <ja...@gmail.com> wrote:
> >> >>
> >> >>
> >> >> Hi,
> >> >> is there a way of creating a link for each row in the grid component
> >> that
> >> >> goes to a listener? I am working in Tapestry 4.0.2 and Tacos 4.0.1.
> >> >>
> >> >> Thanks,
> >> >> Jacob
> >> >> --
> >> >> View this message in context:
> >> >>
> http://www.nabble.com/Grid-Component-question-tf3676754.html#a10274287
> >> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >>
> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Jesse Kuhnert
> >> > Tapestry/Dojo team member/developer
> >> >
> >> > Open source based consulting work centered around
> >> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Grid-Component-question-tf3676754.html#a10275618
> >> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Grid-Component-question-tf3676754.html#a10275740
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Andreas Andreou - andyhot@apache.org - http://andyhot.di.uoa.gr
Tapestry / Tacos developer
Open Source / JEE Consulting