just to clarify ofbiz does not use objects but entities.
so you should use MyEntity

Malin Nicolas sent the following on 10/30/2008 1:20 AM:
> First, you need an event on request-map (controller) that match your
> sent uri
> After you define a java service.
> 
> If you know service and controller and if the engine of your service is
> java you can use this :
> 
> *****
> GenericValue myObject = delegator.findByPrimaryKey("MyObject",
> UtilMisc.toMap("id", id));
> if (UtilValidate.isNotEmpty(myObject)) return ServiceUtil.returnError(
> "id already exist");
> 
> myObject = delegator.makeValidValue("MyObject", context);
> myObject.create();
> ******
> 
> It's the greate line ;)
> 
> Nicolas
> 
> 
> BJ Freeman a écrit :
>> it is really important you look through the code to find these answers.
>> there are many examples.
>> it will also get you familiar with how ofbiz works.
>>
>> Vinayak Yadav sent the following on 10/29/2008 11:11 PM:
>>  
>>> hi, all
>>> I haved designed one student screen
>>> i can able to enter ID and Save it.
>>> now before saving the record i want to check that the ID is present or
>>> not (duplicate ID)
>>> and then i want to save it otherwise throw an error that 'Code
>>> already exists.'
>>> how to do this?
>>>
>>> Thanks
>>> Vinayak
>>>
>>>
>>>     
>>
>>   
> 
> 

Reply via email to