Search Results

Search found 4 results on 1 pages for 'sebajb'.

Page 1/1 | 1 

  • Fields_for dynamic label

    - by sebajb
    I have dynamic form which has a set of values. I created a partial which contains text fields which I display. Next to each of them I would like to display a label containing the title of the text. For instance First Name, and Last Name would not be known previously. How do I go about doing that? It seems that I cannot access the attributes directly. But when I use the label field, the variable name in the label is displayed not the actual value.

    Read the article

  • No unique bean of type [javax.persistence.EntityManager] is defined

    - by sebajb
    I am using JUnit 4 to test Dao Access with Spring (annotations) and JPA (hibernate). The datasource is configured through JNDI(Weblogic) with an ORacle(Backend). This persistence is configured with just the name and a RESOURCE_LOCAL transaction-type The application context file contains notations for annotations, JPA config, transactions, and default package and configuration for annotation detection. I am using Junit4 like so: ApplicationContext <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="workRequest"/> <property name="dataSource" ref="dataSource" /> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> <property name="databasePlatform" value="${database.target}"/> <property name="showSql" value="${database.showSql}" /> <property name="generateDdl" value="${database.generateDdl}" /> </bean> </property> </bean> <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName"> <value>workRequest</value> </property> <property name="jndiEnvironment"> <props> <prop key="java.naming.factory.initial">weblogic.jndi.WLInitialContextFactory</prop> <prop key="java.naming.provider.url">t3://localhost:7001</prop> </props> </property> </bean> <bean id="txManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <bean class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor"/> <bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor" /> JUnit TestCase @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:applicationContext.xml" }) public class AssignmentDaoTest { private AssignmentDao assignmentDao; @Test public void readAll() { assertNotNull("assignmentDao cannot be null", assignmentDao); List assignments = assignmentDao.findAll(); assertNotNull("There are no assignments yet", assignments); } } regardless of what changes I make I get: No unique bean of type [javax.persistence.EntityManager] is defined Any hint on what this could be. I am running the tests inside eclipse.

    Read the article

  • rails checkbox has_many is hunted

    - by sebajb
    check_box is hunted in rails; but I would like to select some objects and save the relationship to the database anyways. When I debug the code all I see is the value='on' instead of the value I want to save. Any Help or tutorial would be appreciated.

    Read the article

  • Two Persistence Units, Two entityManagerFactory(s), SPring, JPA, Hibernate

    - by sebajb
    I am using Two entityManagerFactory{1,2} based on two persistence units, autowired through spring, hibernate, with resource local. My DaoImpls are configured with the PersistenceUnit(unitName='...') according to the unit needed. I was under the impression that using them with the unitName specified would allow me to use x number of PUs without problem but I still get: expected single matching bean but found two: [emf1, emf2]. Am I missing some other configuration?

    Read the article

1