Re: OGNL expertise please... complicated question
I'm not able to follow any of this. If you can give one small / clear example of what you are trying to do it would help me "help you". On 5/11/07, Ken nashua <[EMAIL PROTECTED]> wrote: Correction... >We massage/alter the ejb3/hibernate annotations with a bootstrap >interceptor and rig up our >property descriptors. We interrogate/supplement the ejb3/hibernate annotations with more capable property descriptors. _ Make every IM count. Download Messenger and join the i'm Initiative now. It's free. http://im.live.com/messenger/im/home/?source=TAGHM_MAY07 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Jesse Kuhnert Tapestry/Dojo team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
Re: OGNL expertise please... complicated question
Correction... We massage/alter the ejb3/hibernate annotations with a bootstrap interceptor and rig up our >property descriptors. We interrogate/supplement the ejb3/hibernate annotations with more capable property descriptors. _ Make every IM count. Download Messenger and join the im Initiative now. Its free. http://im.live.com/messenger/im/home/?source=TAGHM_MAY07 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL expertise please... complicated question
The user interface works and the back end works... The only thing that fails is that once the association is saved... it does not stick to the owner. This is due in part to the way trails saves it's models under the hood. To solve this I need to operate special rigging that sets/saves the association to the owner on the way out of the editor. inverse for both sides of the association is established at bootstrap time... pretty arcane... eh? We massage/alter the ejb3/hibernate annotations with a bootstrap interceptor and rig up our property descriptors. Guess I am definitely trails certified when I finish this one... - cheers Ken _ Like the way Microsoft Office Outlook works? Youll love Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_outlook_0507 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL expertise please... complicated question
Thanks Kiuma ... I will post but it may complicate since knowledge of the trails framework is essential. I am at the door of completing this and just trying to get past the OGNL. Incomplete and currently messy (not cleaned up) Here is the sources... Editors.page model model[descriptor.name] model model[descriptor.name] descriptor model model[descriptor.name] model model[descriptor.name] descriptor AssociationMgt.jwc Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> class="org.apache.tapestry.valid.NumberValidator" lifecycle="page"> "int" listener:addNew true page.isModelNew() listener:remove false page.isModelNew() value value Ognl expression to invoke on the model to create a new association instance AssociationSelect.jwc Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";> allow-body="yes" allow-informal-parameters="yes"> produces a select list for an association property default-value="not(propertyDescriptor.required)" /> inherit-informal-parameters="yes"> AssociationMgt.html jwcid="linkInsert" /> value="ognl:getMessage(@[EMAIL PROTECTED])" /> value="ognl:getMessage(@[EMAIL PROTECTED])" /> AssociationSelect.html AssociationSelect.JAVA package org.trails.component; import ognl.Ognl; import ognl.OgnlException; import org.apache.tapestry.BaseComponent; import org.apache.tapestry.IRequestCycle; import org.apache.tapestry.annotations.InjectObject; import org.apache.tapestry.annotations.Parameter; import org.apache.tapestry.annotations.Persist; import org.apache.tapestry.form.IPropertySelectionModel; import org.hibernate.criterion.DetachedCriteria; import org.hibernate.criterion.Restrictions; import org.trails.descriptor.DescriptorService; import org.trails.descriptor.IClassDescriptor; import org.trails.descriptor.IPropertyDescriptor; import org.trails.page.EditPage; import org.trails.page.PageResolver; import org.trails.persistence.PersistenceService; /** * @author Chris Nelson * * This guy interacts with persistence service to produce a Select containing * all the elements of the PropertyDescriptor's type. If a criteria is * specified, it will filter the list by it. * * Additionally, a detached criteria is available to automatically filter out * associations without owners, or get all owners by default. * */ public abstract class AssociationSelect extends BaseComponent { @InjectObject("spring:persistenceService") public abstract PersistenceService getPersistenceService(); @InjectObject("spring:descriptorService") public abstract DescriptorService getDescriptorService(); @InjectObject("spring:pageResolver") public abstract PageResolver getPageResolver(); public abstract IPropertySelectionModel getPropertySelectionModel(); public abstract void setPropertySelectionModel( IPropertySelectionModel PropertySelectionModel); public abstract DetachedCriteria getCriteria(); public abstract void setCriteria(DetachedCriteria Criteria); @Parameter(required = true, cache = true) public abstract Object getModel(); public abstract void setModel(Object bytes); @Persist public abstract Object getValue(); public abstract void setValue(Object value); @Parameter(required = true, cache = true) public abstract IPropertyDescriptor getPropertyDescriptor(); public abstract void setPropertyDescriptor(IPropertyDescriptor propertyDescriptor); @Parameter(required = true, cache = true) public abstract Object getOwner(); public abstract void setOwner(Object owner); @Parameter(required = true, cache = true) public abstract Object getAssociation(); public abstract void setAssociation(Object association); public abstract boolean isAllowNone(); public abstract void setAllowNone(boolean allowNone); public abstract String getNoneLabel(); public abstract void setNoneLabel(String noneLabel); public String getOwnerTypeName() { return getOwner().getClass().getName(); } public Class getOwnerType() { return getOwner().getClass(); } public String getAssociationTypeName() { return getPropertyDescriptor().getPropertyType().getCanonicalName(); } public Class getAssociationType() { return getPropertyDescriptor().getPropertyType().getClass(); } public AssociationSelect() { super(); } public IClassDescriptor getClassDescriptor() {
Re: OGNL expertise please... complicated question
if you post your widget It would be simpler to see the problem, ciao, kiuma On 5/11/07, Ken nashua <[EMAIL PROTECTED]> wrote: FYI, Yes this has to do with completing the development of a tapestry widget. The OGNL docs are trim... and no forum for OGNL. I thought this might be the bastian for OGNL folk. _ More photos, more messages, more storage—get 2GB with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL expertise please... complicated question
Ok, here is a more actual runtime model... Organization-<>---Director a hard OneToOne Each is named in OGNL space as organization and director Furthermore, each actual object has getter/setter Organization.getDirector() Director.getOrganization() This is what I am receiving so far... //Ognl.setValue("organization.director(#director)", model, newAssociation) //nosuchproperty //Ognl.setValue("organization(#director)", model, newAssociation) //InnappropriateExpressionException //Ognl.setValue("organization.director", model, newAssociation) //nosuchproperty //Ognl.setValue("organization", model, newAssociation) //nosuchproperty ? Any help is appreciated. _ More photos, more messages, more storageget 2GB with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL expertise please... complicated question
FYI, Yes this has to do with completing the development of a tapestry widget. The OGNL docs are trim... and no forum for OGNL. I thought this might be the bastian for OGNL folk. _ More photos, more messages, more storageget 2GB with Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_2G_0507 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: OGNL expertise please... complicated question
private Owner owner; private void executeOgnlExpression(String ognlExpression, Object newAssociation) { HashMap context = new HashMap(); context.put("member", newAssociation); Ognl.setValue("owner.association" + "(#member)", context, owner) Will this do it? I am receiving invalidognlexpresssionexception _ Catch suspicious messages before you open themwith Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HM_mini_protection_0507 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]